diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b84e173fe..cd7befe312 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: with: skip-go-installation: true - test: + unit: runs-on: ubuntu-latest steps: - name: Checkout diff --git a/README.md b/README.md index 238fb0d60e..0a78c9d7a8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Optimus helps your organization to build & manage data pipelines with ease. - Dry run query: Before SQL query is scheduled for transformation, during deployment query will be dry-run to make sure it passes basic sanity checks - - Sink BigQuery tables to Kafka [using additional hook] + - Sink BigQuery tables to Kafka [using additional plugins] - Extensibility to support Python transformation - Git based specification management - REST/GRPC based specification management diff --git a/api/handler/v1/adapter.go b/api/handler/v1/adapter.go index 0521a35f3a..f0c05d26ca 100644 --- a/api/handler/v1/adapter.go +++ b/api/handler/v1/adapter.go @@ -1,11 +1,12 @@ package v1 import ( - "context" "fmt" "strings" "time" + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/odpf/optimus/core/tree" "github.com/golang/protobuf/proto" @@ -18,8 +19,7 @@ import ( // Note: all config keys will be converted to upper case automatically type Adapter struct { - supportedTaskRepo models.TaskPluginRepository - supportedHookRepo models.HookRepo + pluginRepo models.PluginRepository supportedDatastoreRepo models.DatastoreRepo } @@ -51,7 +51,7 @@ func (adapt *Adapter) FromJobProto(spec *pb.JobSpecification) (models.JobSpec, e return models.JobSpec{}, err } - execUnit, err := adapt.supportedTaskRepo.GetByName(spec.TaskName) + execUnit, err := adapt.pluginRepo.GetByName(spec.TaskName) if err != nil { return models.JobSpec{}, err } @@ -149,14 +149,6 @@ func prepareWindow(windowSize, windowOffset, truncateTo string) (models.JobSpecT } func (adapt *Adapter) ToJobProto(spec models.JobSpec) (*pb.JobSpecification, error) { - if spec.Task.Unit == nil { - return nil, errors.New("task unit cannot be nil") - } - taskSchema, err := spec.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) - if err != nil { - return nil, err - } - adaptedHook, err := adapt.ToHookProto(spec.Hooks) if err != nil { return nil, err @@ -179,7 +171,7 @@ func (adapt *Adapter) ToJobProto(spec models.JobSpec) (*pb.JobSpecification, err StartDate: spec.Schedule.StartDate.Format(models.JobDatetimeLayout), DependsOnPast: spec.Behavior.DependsOnPast, CatchUp: spec.Behavior.CatchUp, - TaskName: taskSchema.Name, + TaskName: spec.Task.Unit.Info().Name, WindowSize: spec.Task.Window.SizeString(), WindowOffset: spec.Task.Window.OffsetString(), WindowTruncateTo: spec.Task.Window.TruncateTo, @@ -325,10 +317,7 @@ func (adapt *Adapter) ToInstanceProto(spec models.InstanceSpec) (*pb.InstanceSpe Type: pb.InstanceSpecData_Type(pb.InstanceSpecData_Type_value[strings.ToUpper(asset.Type)]), }) } - schdAt, err := ptypes.TimestampProto(spec.ScheduledAt) - if err != nil { - return nil, err - } + schdAt := timestamppb.New(spec.ScheduledAt) return &pb.InstanceSpec{ JobName: spec.Job.Name, ScheduledAt: schdAt, @@ -368,7 +357,7 @@ func (adapt *Adapter) FromInstanceProto(conf *pb.InstanceSpec) (models.InstanceS func (adapt *Adapter) FromHookProto(hooksProto []*pb.JobSpecHook) ([]models.JobSpecHook, error) { var hooks []models.JobSpecHook for _, hook := range hooksProto { - hookUnit, err := adapt.supportedHookRepo.GetByName(hook.Name) + hookUnit, err := adapt.pluginRepo.GetByName(hook.Name) if err != nil { return nil, err } @@ -399,12 +388,8 @@ func (adapt *Adapter) ToHookProto(hooks []models.JobSpecHook) (protoHooks []*pb. }) } - schema, err := hook.Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return nil, err - } protoHooks = append(protoHooks, &pb.JobSpecHook{ - Name: schema.Name, + Name: hook.Unit.Info().Name, Config: hookConfigs, }) } @@ -451,10 +436,7 @@ func (adapt *Adapter) ToReplayExecutionTreeNode(res *tree.TreeNode) (*pb.ReplayE } for _, run := range res.Runs.Values() { runTime := run.(time.Time) - timestampPb, err := ptypes.TimestampProto(runTime) - if err != nil { - return nil, err - } + timestampPb := timestamppb.New(runTime) response.Runs = append(response.Runs, timestampPb) } for _, dep := range res.Dependents { @@ -467,11 +449,9 @@ func (adapt *Adapter) ToReplayExecutionTreeNode(res *tree.TreeNode) (*pb.ReplayE return response, nil } -func NewAdapter(supportedTaskRepo models.TaskPluginRepository, - supportedHookRepo models.HookRepo, datastoreRepo models.DatastoreRepo) *Adapter { +func NewAdapter(pluginRepo models.PluginRepository, datastoreRepo models.DatastoreRepo) *Adapter { return &Adapter{ - supportedTaskRepo: supportedTaskRepo, - supportedHookRepo: supportedHookRepo, + pluginRepo: pluginRepo, supportedDatastoreRepo: datastoreRepo, } } diff --git a/api/handler/v1/adapter_test.go b/api/handler/v1/adapter_test.go index 87bd1f9c0b..3a32d31eee 100644 --- a/api/handler/v1/adapter_test.go +++ b/api/handler/v1/adapter_test.go @@ -1,7 +1,6 @@ package v1_test import ( - "context" "reflect" "testing" "time" @@ -31,25 +30,17 @@ func TestAdapter(t *testing.T) { assert.Equal(t, replayExecutionTreeNode.Dependents[0].JobName, "nested-job-name") }) t.Run("should successfully parse job spec to and from proto", func(t *testing.T) { - execUnit1 := new(mock.TaskPlugin) - execUnit1.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit1 := new(mock.BasePlugin) + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "sample-task", }, nil) defer execUnit1.AssertExpectations(t) - allTasksRepo := new(mock.SupportedTaskRepo) - allTasksRepo.On("GetByName", "sample-task").Return(execUnit1, nil) - defer allTasksRepo.AssertExpectations(t) - - hookUnit1 := new(mock.HookPlugin) - hookUnit1.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: "sample-hook", + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", "sample-task").Return(&models.Plugin{ + Base: execUnit1, }, nil) - defer hookUnit1.AssertExpectations(t) - - allHookRepo := new(mock.SupportedHookRepo) - allHookRepo.On("GetByName", "sample-hook").Return(hookUnit1, nil) - defer allHookRepo.AssertExpectations(t) + adapter := v1.NewAdapter(pluginRepo, nil) jobSpec := models.JobSpec{ Name: "test-job", @@ -76,7 +67,7 @@ func TestAdapter(t *testing.T) { }, }, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{Base: execUnit1}, Config: models.JobSpecConfigs{ { Name: "DO", @@ -106,12 +97,11 @@ func TestAdapter(t *testing.T) { Value: "this", }, }, - Unit: hookUnit1, + Unit: &models.Plugin{Base: execUnit1}, }, }, } - adapter := v1.NewAdapter(allTasksRepo, allHookRepo, nil) inProto, err := adapter.ToJobProto(jobSpec) assert.Nil(t, err) original, err := adapter.FromJobProto(inProto) diff --git a/api/handler/v1/runtime.go b/api/handler/v1/runtime.go index 49c9a13aab..2ad3713061 100644 --- a/api/handler/v1/runtime.go +++ b/api/handler/v1/runtime.go @@ -7,6 +7,8 @@ import ( "strings" "time" + "google.golang.org/protobuf/types/known/timestamppb" + "google.golang.org/protobuf/types/known/structpb" "github.com/odpf/optimus/core/tree" @@ -508,10 +510,7 @@ func (sv *RuntimeServiceServer) JobStatus(ctx context.Context, req *pb.JobStatus var adaptedJobStatus []*pb.JobStatus for _, jobStatus := range jobStatuses { - ts, err := ptypes.TimestampProto(jobStatus.ScheduledAt) - if err != nil { - return nil, status.Errorf(codes.Internal, "%s: failed to parse time for %s", err.Error(), req.GetJobName()) - } + ts := timestamppb.New(jobStatus.ScheduledAt) adaptedJobStatus = append(adaptedJobStatus, &pb.JobStatus{ State: jobStatus.State.String(), ScheduledAt: ts, @@ -574,11 +573,8 @@ func (sv *RuntimeServiceServer) GetWindow(ctx context.Context, req *pb.GetWindow return nil, status.Error(codes.Internal, err.Error()) } - windowStart, err1 := ptypes.TimestampProto(window.GetStart(scheduledTime)) - windowEnd, err2 := ptypes.TimestampProto(window.GetEnd(scheduledTime)) - if err1 != nil || err2 != nil { - return nil, status.Errorf(codes.Internal, "%s: failed to convert timestamp %s", err.Error(), scheduledTime) - } + windowStart := timestamppb.New(window.GetStart(scheduledTime)) + windowEnd := timestamppb.New(window.GetEnd(scheduledTime)) return &pb.GetWindowResponse{ Start: windowStart, diff --git a/api/handler/v1/runtime_test.go b/api/handler/v1/runtime_test.go index 3faeff0ba1..04883c92b8 100644 --- a/api/handler/v1/runtime_test.go +++ b/api/handler/v1/runtime_test.go @@ -9,13 +9,14 @@ import ( "testing" "time" - "github.com/odpf/optimus/job" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/structpb" "github.com/odpf/optimus/core/tree" + "github.com/odpf/optimus/job" "github.com/odpf/optimus/instance" @@ -68,7 +69,7 @@ func TestRuntimeServiceServer(t *testing.T) { mockedTimeNow := time.Now() scheduledAt := time.Date(2020, 11, 11, 0, 0, 0, 0, time.UTC) - scheduledAtTimestamp, _ := ptypes.TimestampProto(scheduledAt) + scheduledAtTimestamp := timestamppb.New(scheduledAt) projectSpec := models.ProjectSpec{ ID: uuid.Must(uuid.NewRandom()), @@ -86,17 +87,19 @@ func TestRuntimeServiceServer(t *testing.T) { }, } - execUnit1 := new(mock.TaskPlugin) - execUnit1.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + basePlugin1 := new(mock.BasePlugin) + basePlugin1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: taskName, }, nil) - defer execUnit1.AssertExpectations(t) + defer basePlugin1.AssertExpectations(t) jobSpec := models.JobSpec{ ID: uuid.Must(uuid.NewRandom()), Name: jobName, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{ + Base: basePlugin1, + }, Config: models.JobSpecConfigs{ { Name: "do", @@ -145,7 +148,6 @@ func TestRuntimeServiceServer(t *testing.T) { defer projectRepoFactory.AssertExpectations(t) jobService := new(mock.JobService) - //jobService.On("GetByName", jobName, projectSpec).Return(jobSpec, nil) jobService.On("GetByNameForProject", jobName, projectSpec).Return(jobSpec, namespaceSpec, nil) defer jobService.AssertExpectations(t) @@ -169,7 +171,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory, nil, nil, - v1.NewAdapter(models.TaskRegistry, nil, nil), + v1.NewAdapter(nil, nil), nil, instanceService, nil, @@ -183,7 +185,7 @@ func TestRuntimeServiceServer(t *testing.T) { resp, err := runtimeServiceServer.RegisterInstance(context.Background(), &versionRequest) assert.Nil(t, err) - adapter := v1.NewAdapter(models.TaskRegistry, nil, nil) + adapter := v1.NewAdapter(nil, nil) projectSpecProto := adapter.ToProjectProto(projectSpec) jobSpecProto, _ := adapter.ToJobProto(jobSpec) instanceSpecProto, _ := adapter.ToInstanceProto(instanceSpec) @@ -217,7 +219,7 @@ func TestRuntimeServiceServer(t *testing.T) { "BUCKET": "gs://some_folder", }, } - adapter := v1.NewAdapter(models.TaskRegistry, nil, nil) + adapter := v1.NewAdapter(nil, nil) projectRepository := new(mock.ProjectRepository) projectRepository.On("Save", projectSpec).Return(errors.New("a random error")) @@ -237,7 +239,7 @@ func TestRuntimeServiceServer(t *testing.T) { nil, nil, - v1.NewAdapter(models.TaskRegistry, nil, nil), + v1.NewAdapter(nil, nil), nil, nil, nil, @@ -257,7 +259,7 @@ func TestRuntimeServiceServer(t *testing.T) { "BUCKET": "gs://some_folder", }, } - adapter := v1.NewAdapter(models.TaskRegistry, nil, nil) + adapter := v1.NewAdapter(nil, nil) projectRepository := new(mock.ProjectRepository) projectRepository.On("Save", projectSpec).Return(nil) @@ -277,7 +279,7 @@ func TestRuntimeServiceServer(t *testing.T) { nil, nil, - v1.NewAdapter(models.TaskRegistry, nil, nil), + v1.NewAdapter(nil, nil), nil, nil, nil, @@ -306,7 +308,7 @@ func TestRuntimeServiceServer(t *testing.T) { Config: map[string]string{}, } - adapter := v1.NewAdapter(models.TaskRegistry, nil, nil) + adapter := v1.NewAdapter(nil, nil) projectRepository := new(mock.ProjectRepository) projectRepository.On("Save", projectSpec).Return(nil) @@ -335,7 +337,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory, namespaceRepoFact, nil, - v1.NewAdapter(models.TaskRegistry, nil, nil), + v1.NewAdapter(nil, nil), nil, nil, nil, @@ -370,7 +372,7 @@ func TestRuntimeServiceServer(t *testing.T) { Config: map[string]string{}, } - adapter := v1.NewAdapter(models.TaskRegistry, nil, nil) + adapter := v1.NewAdapter(nil, nil) projectRepository := new(mock.ProjectRepository) projectRepository.On("GetByName", projectSpec.Name).Return(projectSpec, nil) @@ -398,7 +400,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory, namespaceRepoFact, nil, - v1.NewAdapter(models.TaskRegistry, nil, nil), + v1.NewAdapter(nil, nil), nil, nil, nil, @@ -429,7 +431,7 @@ func TestRuntimeServiceServer(t *testing.T) { Name: "dev-test-namespace-1", } - adapter := v1.NewAdapter(models.TaskRegistry, nil, nil) + adapter := v1.NewAdapter(nil, nil) projectRepository := new(mock.ProjectRepository) projectRepository.On("GetByName", projectSpec.Name).Return(projectSpec, errors.New("project does not exist")) @@ -455,7 +457,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory, namespaceRepoFact, nil, - v1.NewAdapter(models.TaskRegistry, nil, nil), + v1.NewAdapter(nil, nil), nil, nil, nil, @@ -489,19 +491,25 @@ func TestRuntimeServiceServer(t *testing.T) { jobName := "my-job" taskName := "bq2bq" - execUnit1 := new(mock.TaskPlugin) - execUnit1.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit1 := new(mock.BasePlugin) + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: taskName, Image: "random-image", }, nil) - execUnit1.On("DefaultTaskAssets", context.Background(), mock2.Anything).Return(models.DefaultTaskAssetsResponse{}, nil) defer execUnit1.AssertExpectations(t) - _ = models.TaskRegistry.Add(execUnit1) + + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", taskName).Return(&models.Plugin{ + Base: execUnit1, + }, nil) + adapter := v1.NewAdapter(pluginRepo, nil) jobSpec := models.JobSpec{ Name: jobName, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{ + Base: execUnit1, + }, Config: models.JobSpecConfigs{ { Name: "DO", @@ -524,8 +532,6 @@ func TestRuntimeServiceServer(t *testing.T) { Dependencies: map[string]models.JobSpecDependency{}, } - adapter := v1.NewAdapter(models.TaskRegistry, nil, nil) - projectRepository := new(mock.ProjectRepository) projectRepository.On("GetByName", projectSpec.Name).Return(projectSpec, nil) defer projectRepository.AssertExpectations(t) @@ -555,7 +561,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory, namespaceRepoFact, nil, - v1.NewAdapter(models.TaskRegistry, nil, nil), + adapter, nil, nil, nil, @@ -586,7 +592,7 @@ func TestRuntimeServiceServer(t *testing.T) { "BUCKET": "gs://some_folder", }, } - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) projectRepository := new(mock.ProjectRepository) projectRepository.On("GetByName", projectSpec.Name).Return(projectSpec, nil) @@ -644,7 +650,7 @@ func TestRuntimeServiceServer(t *testing.T) { "BUCKET": "gs://some_folder", }, } - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) projectRepository := new(mock.ProjectRepository) projectRepository.On("GetByName", projectSpec.Name).Return(projectSpec, nil) @@ -718,8 +724,8 @@ func TestRuntimeServiceServer(t *testing.T) { ProjectSpec: projectSpec, } - execUnit1 := new(mock.TaskPlugin) - execUnit1.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit1 := new(mock.BasePlugin) + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: taskName, }, nil) defer execUnit1.AssertExpectations(t) @@ -728,7 +734,9 @@ func TestRuntimeServiceServer(t *testing.T) { { Name: jobName1, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{ + Base: execUnit1, + }, Config: models.JobSpecConfigs{ { Name: "do", @@ -760,9 +768,11 @@ func TestRuntimeServiceServer(t *testing.T) { jobSpecRepoFactory := new(mock.JobSpecRepoFactory) defer jobSpecRepoFactory.AssertExpectations(t) - allTasksRepo := new(mock.SupportedTaskRepo) - allTasksRepo.On("GetByName", taskName).Return(execUnit1, nil) - adapter := v1.NewAdapter(allTasksRepo, nil, nil) + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", taskName).Return(&models.Plugin{ + Base: execUnit1, + }, nil) + adapter := v1.NewAdapter(pluginRepo, nil) namespaceRepository := new(mock.NamespaceRepository) namespaceRepository.On("GetByName", namespaceSpec.Name).Return(namespaceSpec, nil) @@ -837,8 +847,8 @@ func TestRuntimeServiceServer(t *testing.T) { ProjectSpec: projectSpec, } - execUnit1 := new(mock.TaskPlugin) - execUnit1.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit1 := new(mock.BasePlugin) + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: taskName, }, nil) defer execUnit1.AssertExpectations(t) @@ -847,7 +857,9 @@ func TestRuntimeServiceServer(t *testing.T) { { Name: jobName1, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{ + Base: execUnit1, + }, Config: models.JobSpecConfigs{ { Name: "do", @@ -873,9 +885,9 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory.On("New").Return(projectRepository) defer projectRepoFactory.AssertExpectations(t) - allTasksRepo := new(mock.SupportedTaskRepo) + allTasksRepo := new(mock.SupportedPluginRepo) allTasksRepo.On("GetByName", taskName).Return(execUnit1, nil) - adapter := v1.NewAdapter(allTasksRepo, nil, nil) + adapter := v1.NewAdapter(allTasksRepo, nil) namespaceRepository := new(mock.NamespaceRepository) namespaceRepository.On("GetByName", namespaceSpec.Name).Return(namespaceSpec, nil) @@ -941,8 +953,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory.On("New").Return(projectRepository) defer projectRepoFactory.AssertExpectations(t) - allTasksRepo := new(mock.SupportedTaskRepo) - adapter := v1.NewAdapter(allTasksRepo, nil, nil) + adapter := v1.NewAdapter(nil, nil) namespaceRepository := new(mock.NamespaceRepository) namespaceRepository.On("GetAll").Return([]models.NamespaceSpec{namespaceSpec}, nil) @@ -1001,14 +1012,16 @@ func TestRuntimeServiceServer(t *testing.T) { ProjectSpec: projectSpec, } - execUnit1 := new(mock.TaskPlugin) + execUnit1 := new(mock.BasePlugin) defer execUnit1.AssertExpectations(t) jobSpecs := []models.JobSpec{ { Name: jobName1, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{ + Base: execUnit1, + }, Config: models.JobSpecConfigs{ { Name: "do", @@ -1034,9 +1047,11 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory.On("New").Return(projectRepository) defer projectRepoFactory.AssertExpectations(t) - allTasksRepo := new(mock.SupportedTaskRepo) - allTasksRepo.On("GetByName", taskName).Return(execUnit1, nil) - adapter := v1.NewAdapter(allTasksRepo, nil, nil) + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", taskName).Return(&models.Plugin{ + Base: execUnit1, + }, nil) + adapter := v1.NewAdapter(pluginRepo, nil) namespaceRepository := new(mock.NamespaceRepository) namespaceRepository.On("GetByName", namespaceSpec.Name).Return(namespaceSpec, nil) @@ -1100,7 +1115,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory.On("New").Return(projectRepository) defer projectRepoFactory.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) jobService := new(mock.JobService) jobService.On("GetByNameForProject", jobSpec.Name, projectSpec).Return(jobSpec, namespaceSpec, nil) @@ -1184,7 +1199,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory.On("New").Return(projectRepository) defer projectRepoFactory.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) namespaceRepository := new(mock.NamespaceRepository) namespaceRepository.On("GetByName", namespaceSpec.Name).Return(namespaceSpec, nil) @@ -1251,7 +1266,7 @@ func TestRuntimeServiceServer(t *testing.T) { nil, ) scheduledAt := time.Date(2020, 11, 11, 0, 0, 0, 0, time.UTC) - scheduledAtTimestamp, _ := ptypes.TimestampProto(scheduledAt) + scheduledAtTimestamp := timestamppb.New(scheduledAt) req := pb.GetWindowRequest{ ScheduledAt: scheduledAtTimestamp, Size: "24h", @@ -1279,7 +1294,7 @@ func TestRuntimeServiceServer(t *testing.T) { nil, ) scheduledAt := time.Date(2020, 11, 11, 0, 0, 0, 0, time.UTC) - scheduledAtTimestamp, _ := ptypes.TimestampProto(scheduledAt) + scheduledAtTimestamp := timestamppb.New(scheduledAt) req := pb.GetWindowRequest{ ScheduledAt: scheduledAtTimestamp, Size: "", @@ -1321,14 +1336,16 @@ func TestRuntimeServiceServer(t *testing.T) { Contents: []byte("content-of-dag"), } - execUnit1 := new(mock.TaskPlugin) - defer execUnit1.AssertExpectations(t) + baseUnit := new(mock.BasePlugin) + defer baseUnit.AssertExpectations(t) jobSpec := models.JobSpec{ ID: uuid.Must(uuid.NewRandom()), Name: jobName, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{ + Base: baseUnit, + }, Config: models.JobSpecConfigs{ { Name: "do", @@ -1394,7 +1411,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory, namespaceRepoFact, nil, - v1.NewAdapter(models.TaskRegistry, nil, nil), + v1.NewAdapter(nil, nil), nil, nil, nil, @@ -1498,7 +1515,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory, namespaceRepoFact, nil, - v1.NewAdapter(nil, nil, dsRepo), + v1.NewAdapter(nil, dsRepo), nil, nil, nil, @@ -1596,7 +1613,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory, namespaceRepoFact, nil, - v1.NewAdapter(nil, nil, dsRepo), + v1.NewAdapter(nil, dsRepo), nil, nil, nil, @@ -1681,7 +1698,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", jobService, nil, @@ -1733,7 +1750,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", jobService, @@ -1789,7 +1806,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", jobService, @@ -1885,7 +1902,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", jobService, @@ -1926,7 +1943,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", nil, @@ -1981,7 +1998,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", jobService, @@ -2018,7 +2035,7 @@ func TestRuntimeServiceServer(t *testing.T) { projectRepoFactory.On("New").Return(projectRepository) defer projectRepoFactory.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", nil, @@ -2066,7 +2083,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", jobService, @@ -2121,7 +2138,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", jobService, @@ -2177,7 +2194,7 @@ func TestRuntimeServiceServer(t *testing.T) { namespaceRepoFact := new(mock.NamespaceRepoFactory) namespaceRepoFact.On("New", projectSpec).Return(namespaceRepository) defer namespaceRepoFact.AssertExpectations(t) - adapter := v1.NewAdapter(nil, nil, nil) + adapter := v1.NewAdapter(nil, nil) runtimeServiceServer := v1.NewRuntimeServiceServer( "Version", jobService, diff --git a/api/proto/odpf/optimus/hook_plugin.pb.go b/api/proto/odpf/optimus/hook_plugin.pb.go deleted file mode 100644 index c233c1db9b..0000000000 --- a/api/proto/odpf/optimus/hook_plugin.pb.go +++ /dev/null @@ -1,1434 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.13.0 -// source: odpf/optimus/hook_plugin.proto - -package optimus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetHookSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetHookSchema) Reset() { - *x = GetHookSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetHookSchema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetHookSchema) ProtoMessage() {} - -func (x *GetHookSchema) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[0] - 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 GetHookSchema.ProtoReflect.Descriptor instead. -func (*GetHookSchema) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{0} -} - -type GetHookQuestions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetHookQuestions) Reset() { - *x = GetHookQuestions{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetHookQuestions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetHookQuestions) ProtoMessage() {} - -func (x *GetHookQuestions) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[1] - 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 GetHookQuestions.ProtoReflect.Descriptor instead. -func (*GetHookQuestions) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{1} -} - -type ValidateHookQuestion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ValidateHookQuestion) Reset() { - *x = ValidateHookQuestion{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateHookQuestion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateHookQuestion) ProtoMessage() {} - -func (x *ValidateHookQuestion) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[2] - 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 ValidateHookQuestion.ProtoReflect.Descriptor instead. -func (*ValidateHookQuestion) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{2} -} - -type HookConfigs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Configs []*HookConfigs_Config `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` -} - -func (x *HookConfigs) Reset() { - *x = HookConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HookConfigs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HookConfigs) ProtoMessage() {} - -func (x *HookConfigs) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[3] - 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 HookConfigs.ProtoReflect.Descriptor instead. -func (*HookConfigs) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{3} -} - -func (x *HookConfigs) GetConfigs() []*HookConfigs_Config { - if x != nil { - return x.Configs - } - return nil -} - -type DefaultHookConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DefaultHookConfig) Reset() { - *x = DefaultHookConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultHookConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultHookConfig) ProtoMessage() {} - -func (x *DefaultHookConfig) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[4] - 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 DefaultHookConfig.ProtoReflect.Descriptor instead. -func (*DefaultHookConfig) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{4} -} - -type HookAssets struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Assets []*HookAssets_Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` -} - -func (x *HookAssets) Reset() { - *x = HookAssets{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HookAssets) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HookAssets) ProtoMessage() {} - -func (x *HookAssets) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[5] - 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 HookAssets.ProtoReflect.Descriptor instead. -func (*HookAssets) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{5} -} - -func (x *HookAssets) GetAssets() []*HookAssets_Asset { - if x != nil { - return x.Assets - } - return nil -} - -type DefaultHookAssets struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DefaultHookAssets) Reset() { - *x = DefaultHookAssets{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultHookAssets) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultHookAssets) ProtoMessage() {} - -func (x *DefaultHookAssets) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[6] - 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 DefaultHookAssets.ProtoReflect.Descriptor instead. -func (*DefaultHookAssets) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{6} -} - -type GetHookSchema_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetHookSchema_Request) Reset() { - *x = GetHookSchema_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetHookSchema_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetHookSchema_Request) ProtoMessage() {} - -func (x *GetHookSchema_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_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 GetHookSchema_Request.ProtoReflect.Descriptor instead. -func (*GetHookSchema_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{0, 0} -} - -type GetHookSchema_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` - Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` - DependsOn []string `protobuf:"bytes,5,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty"` - // will be mounted inside the container as volume - SecretPath string `protobuf:"bytes,6,opt,name=secret_path,json=secretPath,proto3" json:"secret_path,omitempty"` -} - -func (x *GetHookSchema_Response) Reset() { - *x = GetHookSchema_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetHookSchema_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetHookSchema_Response) ProtoMessage() {} - -func (x *GetHookSchema_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_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 GetHookSchema_Response.ProtoReflect.Descriptor instead. -func (*GetHookSchema_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *GetHookSchema_Response) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GetHookSchema_Response) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *GetHookSchema_Response) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *GetHookSchema_Response) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *GetHookSchema_Response) GetDependsOn() []string { - if x != nil { - return x.DependsOn - } - return nil -} - -func (x *GetHookSchema_Response) GetSecretPath() string { - if x != nil { - return x.SecretPath - } - return "" -} - -type GetHookQuestions_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JobName string `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *GetHookQuestions_Request) Reset() { - *x = GetHookQuestions_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetHookQuestions_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetHookQuestions_Request) ProtoMessage() {} - -func (x *GetHookQuestions_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[9] - 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 GetHookQuestions_Request.ProtoReflect.Descriptor instead. -func (*GetHookQuestions_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *GetHookQuestions_Request) GetJobName() string { - if x != nil { - return x.JobName - } - return "" -} - -func (x *GetHookQuestions_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type GetHookQuestions_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Questions []*PluginQuestion `protobuf:"bytes,1,rep,name=questions,proto3" json:"questions,omitempty"` -} - -func (x *GetHookQuestions_Response) Reset() { - *x = GetHookQuestions_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetHookQuestions_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetHookQuestions_Response) ProtoMessage() {} - -func (x *GetHookQuestions_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[10] - 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 GetHookQuestions_Response.ProtoReflect.Descriptor instead. -func (*GetHookQuestions_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{1, 1} -} - -func (x *GetHookQuestions_Response) GetQuestions() []*PluginQuestion { - if x != nil { - return x.Questions - } - return nil -} - -type ValidateHookQuestion_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Answer *PluginAnswer `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *ValidateHookQuestion_Request) Reset() { - *x = ValidateHookQuestion_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateHookQuestion_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateHookQuestion_Request) ProtoMessage() {} - -func (x *ValidateHookQuestion_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[11] - 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 ValidateHookQuestion_Request.ProtoReflect.Descriptor instead. -func (*ValidateHookQuestion_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *ValidateHookQuestion_Request) GetAnswer() *PluginAnswer { - if x != nil { - return x.Answer - } - return nil -} - -func (x *ValidateHookQuestion_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type ValidateHookQuestion_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *ValidateHookQuestion_Response) Reset() { - *x = ValidateHookQuestion_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateHookQuestion_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateHookQuestion_Response) ProtoMessage() {} - -func (x *ValidateHookQuestion_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[12] - 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 ValidateHookQuestion_Response.ProtoReflect.Descriptor instead. -func (*ValidateHookQuestion_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{2, 1} -} - -func (x *ValidateHookQuestion_Response) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *ValidateHookQuestion_Response) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type HookConfigs_Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *HookConfigs_Config) Reset() { - *x = HookConfigs_Config{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HookConfigs_Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HookConfigs_Config) ProtoMessage() {} - -func (x *HookConfigs_Config) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[13] - 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 HookConfigs_Config.ProtoReflect.Descriptor instead. -func (*HookConfigs_Config) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *HookConfigs_Config) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HookConfigs_Config) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type DefaultHookConfig_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Answers []*PluginAnswer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"` - TaskConfigs *TaskConfigs `protobuf:"bytes,2,opt,name=task_configs,json=taskConfigs,proto3" json:"task_configs,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *DefaultHookConfig_Request) Reset() { - *x = DefaultHookConfig_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultHookConfig_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultHookConfig_Request) ProtoMessage() {} - -func (x *DefaultHookConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[14] - 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 DefaultHookConfig_Request.ProtoReflect.Descriptor instead. -func (*DefaultHookConfig_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *DefaultHookConfig_Request) GetAnswers() []*PluginAnswer { - if x != nil { - return x.Answers - } - return nil -} - -func (x *DefaultHookConfig_Request) GetTaskConfigs() *TaskConfigs { - if x != nil { - return x.TaskConfigs - } - return nil -} - -func (x *DefaultHookConfig_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type DefaultHookConfig_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Config *HookConfigs `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *DefaultHookConfig_Response) Reset() { - *x = DefaultHookConfig_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultHookConfig_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultHookConfig_Response) ProtoMessage() {} - -func (x *DefaultHookConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[15] - 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 DefaultHookConfig_Response.ProtoReflect.Descriptor instead. -func (*DefaultHookConfig_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{4, 1} -} - -func (x *DefaultHookConfig_Response) GetConfig() *HookConfigs { - if x != nil { - return x.Config - } - return nil -} - -type HookAssets_Asset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *HookAssets_Asset) Reset() { - *x = HookAssets_Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HookAssets_Asset) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HookAssets_Asset) ProtoMessage() {} - -func (x *HookAssets_Asset) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[16] - 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 HookAssets_Asset.ProtoReflect.Descriptor instead. -func (*HookAssets_Asset) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *HookAssets_Asset) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *HookAssets_Asset) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type DefaultHookAssets_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Answers []*PluginAnswer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"` - TaskConfigs *TaskConfigs `protobuf:"bytes,2,opt,name=task_configs,json=taskConfigs,proto3" json:"task_configs,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *DefaultHookAssets_Request) Reset() { - *x = DefaultHookAssets_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultHookAssets_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultHookAssets_Request) ProtoMessage() {} - -func (x *DefaultHookAssets_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[17] - 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 DefaultHookAssets_Request.ProtoReflect.Descriptor instead. -func (*DefaultHookAssets_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *DefaultHookAssets_Request) GetAnswers() []*PluginAnswer { - if x != nil { - return x.Answers - } - return nil -} - -func (x *DefaultHookAssets_Request) GetTaskConfigs() *TaskConfigs { - if x != nil { - return x.TaskConfigs - } - return nil -} - -func (x *DefaultHookAssets_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type DefaultHookAssets_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Assets *HookAssets `protobuf:"bytes,1,opt,name=assets,proto3" json:"assets,omitempty"` -} - -func (x *DefaultHookAssets_Response) Reset() { - *x = DefaultHookAssets_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultHookAssets_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultHookAssets_Response) ProtoMessage() {} - -func (x *DefaultHookAssets_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_hook_plugin_proto_msgTypes[18] - 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 DefaultHookAssets_Response.ProtoReflect.Descriptor instead. -func (*DefaultHookAssets_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_hook_plugin_proto_rawDescGZIP(), []int{6, 1} -} - -func (x *DefaultHookAssets_Response) GetAssets() *HookAssets { - if x != nil { - return x.Assets - } - return nil -} - -var File_odpf_optimus_hook_plugin_proto protoreflect.FileDescriptor - -var file_odpf_optimus_hook_plugin_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x68, - 0x6f, 0x6f, 0x6b, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0c, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x1a, 0x1e, - 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, - 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x1a, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0xaa, 0x01, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0xb7, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, - 0x48, 0x6f, 0x6f, 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x5b, 0x0a, - 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x46, 0x0a, 0x08, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x51, - 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x48, - 0x6f, 0x6f, 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x74, 0x0a, 0x07, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, 0x6e, 0x73, 0x77, - 0x65, 0x72, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x3a, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7d, 0x0a, - 0x0b, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x48, 0x6f, 0x6f, - 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x32, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 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, 0x22, 0x89, 0x02, 0x0a, - 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x1a, 0xb4, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, - 0x0a, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x07, 0x61, 0x6e, 0x73, - 0x77, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3d, 0x0a, 0x08, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x77, 0x0a, 0x0a, 0x48, 0x6f, 0x6f, 0x6b, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x31, - 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 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, 0x22, 0x88, 0x02, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x6f, - 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0xb4, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, - 0x52, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, - 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x32, 0x8e, 0x04, 0x0a, - 0x0a, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x5a, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x23, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x48, - 0x6f, 0x6f, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x48, 0x6f, - 0x6f, 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x6f, - 0x6f, 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x14, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x51, 0x75, 0x65, 0x73, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, - 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x6f, 0x6b, 0x51, 0x75, 0x65, 0x73, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, - 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x27, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, - 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x48, 0x6f, 0x6f, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x6f, 0x6b, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4d, 0x0a, - 0x16, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x42, 0x11, 0x48, 0x6f, 0x6f, 0x6b, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_optimus_hook_plugin_proto_rawDescOnce sync.Once - file_odpf_optimus_hook_plugin_proto_rawDescData = file_odpf_optimus_hook_plugin_proto_rawDesc -) - -func file_odpf_optimus_hook_plugin_proto_rawDescGZIP() []byte { - file_odpf_optimus_hook_plugin_proto_rawDescOnce.Do(func() { - file_odpf_optimus_hook_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_optimus_hook_plugin_proto_rawDescData) - }) - return file_odpf_optimus_hook_plugin_proto_rawDescData -} - -var file_odpf_optimus_hook_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 19) -var file_odpf_optimus_hook_plugin_proto_goTypes = []interface{}{ - (*GetHookSchema)(nil), // 0: odpf.optimus.GetHookSchema - (*GetHookQuestions)(nil), // 1: odpf.optimus.GetHookQuestions - (*ValidateHookQuestion)(nil), // 2: odpf.optimus.ValidateHookQuestion - (*HookConfigs)(nil), // 3: odpf.optimus.HookConfigs - (*DefaultHookConfig)(nil), // 4: odpf.optimus.DefaultHookConfig - (*HookAssets)(nil), // 5: odpf.optimus.HookAssets - (*DefaultHookAssets)(nil), // 6: odpf.optimus.DefaultHookAssets - (*GetHookSchema_Request)(nil), // 7: odpf.optimus.GetHookSchema.Request - (*GetHookSchema_Response)(nil), // 8: odpf.optimus.GetHookSchema.Response - (*GetHookQuestions_Request)(nil), // 9: odpf.optimus.GetHookQuestions.Request - (*GetHookQuestions_Response)(nil), // 10: odpf.optimus.GetHookQuestions.Response - (*ValidateHookQuestion_Request)(nil), // 11: odpf.optimus.ValidateHookQuestion.Request - (*ValidateHookQuestion_Response)(nil), // 12: odpf.optimus.ValidateHookQuestion.Response - (*HookConfigs_Config)(nil), // 13: odpf.optimus.HookConfigs.Config - (*DefaultHookConfig_Request)(nil), // 14: odpf.optimus.DefaultHookConfig.Request - (*DefaultHookConfig_Response)(nil), // 15: odpf.optimus.DefaultHookConfig.Response - (*HookAssets_Asset)(nil), // 16: odpf.optimus.HookAssets.Asset - (*DefaultHookAssets_Request)(nil), // 17: odpf.optimus.DefaultHookAssets.Request - (*DefaultHookAssets_Response)(nil), // 18: odpf.optimus.DefaultHookAssets.Response - (*PluginOptions)(nil), // 19: odpf.optimus.PluginOptions - (*PluginQuestion)(nil), // 20: odpf.optimus.PluginQuestion - (*PluginAnswer)(nil), // 21: odpf.optimus.PluginAnswer - (*TaskConfigs)(nil), // 22: odpf.optimus.TaskConfigs -} -var file_odpf_optimus_hook_plugin_proto_depIdxs = []int32{ - 13, // 0: odpf.optimus.HookConfigs.configs:type_name -> odpf.optimus.HookConfigs.Config - 16, // 1: odpf.optimus.HookAssets.assets:type_name -> odpf.optimus.HookAssets.Asset - 19, // 2: odpf.optimus.GetHookQuestions.Request.options:type_name -> odpf.optimus.PluginOptions - 20, // 3: odpf.optimus.GetHookQuestions.Response.questions:type_name -> odpf.optimus.PluginQuestion - 21, // 4: odpf.optimus.ValidateHookQuestion.Request.answer:type_name -> odpf.optimus.PluginAnswer - 19, // 5: odpf.optimus.ValidateHookQuestion.Request.options:type_name -> odpf.optimus.PluginOptions - 21, // 6: odpf.optimus.DefaultHookConfig.Request.answers:type_name -> odpf.optimus.PluginAnswer - 22, // 7: odpf.optimus.DefaultHookConfig.Request.task_configs:type_name -> odpf.optimus.TaskConfigs - 19, // 8: odpf.optimus.DefaultHookConfig.Request.options:type_name -> odpf.optimus.PluginOptions - 3, // 9: odpf.optimus.DefaultHookConfig.Response.config:type_name -> odpf.optimus.HookConfigs - 21, // 10: odpf.optimus.DefaultHookAssets.Request.answers:type_name -> odpf.optimus.PluginAnswer - 22, // 11: odpf.optimus.DefaultHookAssets.Request.task_configs:type_name -> odpf.optimus.TaskConfigs - 19, // 12: odpf.optimus.DefaultHookAssets.Request.options:type_name -> odpf.optimus.PluginOptions - 5, // 13: odpf.optimus.DefaultHookAssets.Response.assets:type_name -> odpf.optimus.HookAssets - 7, // 14: odpf.optimus.HookPlugin.GetHookSchema:input_type -> odpf.optimus.GetHookSchema.Request - 9, // 15: odpf.optimus.HookPlugin.GetHookQuestions:input_type -> odpf.optimus.GetHookQuestions.Request - 11, // 16: odpf.optimus.HookPlugin.ValidateHookQuestion:input_type -> odpf.optimus.ValidateHookQuestion.Request - 14, // 17: odpf.optimus.HookPlugin.DefaultHookConfig:input_type -> odpf.optimus.DefaultHookConfig.Request - 17, // 18: odpf.optimus.HookPlugin.DefaultHookAssets:input_type -> odpf.optimus.DefaultHookAssets.Request - 8, // 19: odpf.optimus.HookPlugin.GetHookSchema:output_type -> odpf.optimus.GetHookSchema.Response - 10, // 20: odpf.optimus.HookPlugin.GetHookQuestions:output_type -> odpf.optimus.GetHookQuestions.Response - 12, // 21: odpf.optimus.HookPlugin.ValidateHookQuestion:output_type -> odpf.optimus.ValidateHookQuestion.Response - 15, // 22: odpf.optimus.HookPlugin.DefaultHookConfig:output_type -> odpf.optimus.DefaultHookConfig.Response - 18, // 23: odpf.optimus.HookPlugin.DefaultHookAssets:output_type -> odpf.optimus.DefaultHookAssets.Response - 19, // [19:24] is the sub-list for method output_type - 14, // [14:19] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name -} - -func init() { file_odpf_optimus_hook_plugin_proto_init() } -func file_odpf_optimus_hook_plugin_proto_init() { - if File_odpf_optimus_hook_plugin_proto != nil { - return - } - file_odpf_optimus_task_plugin_proto_init() - if !protoimpl.UnsafeEnabled { - file_odpf_optimus_hook_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHookSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHookQuestions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateHookQuestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HookConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultHookConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HookAssets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultHookAssets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHookSchema_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHookSchema_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHookQuestions_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHookQuestions_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateHookQuestion_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateHookQuestion_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HookConfigs_Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultHookConfig_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultHookConfig_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HookAssets_Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultHookAssets_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_hook_plugin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultHookAssets_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_optimus_hook_plugin_proto_rawDesc, - NumEnums: 0, - NumMessages: 19, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_odpf_optimus_hook_plugin_proto_goTypes, - DependencyIndexes: file_odpf_optimus_hook_plugin_proto_depIdxs, - MessageInfos: file_odpf_optimus_hook_plugin_proto_msgTypes, - }.Build() - File_odpf_optimus_hook_plugin_proto = out.File - file_odpf_optimus_hook_plugin_proto_rawDesc = nil - file_odpf_optimus_hook_plugin_proto_goTypes = nil - file_odpf_optimus_hook_plugin_proto_depIdxs = nil -} diff --git a/api/proto/odpf/optimus/hook_plugin_grpc.pb.go b/api/proto/odpf/optimus/hook_plugin_grpc.pb.go deleted file mode 100644 index c04a3d8c4e..0000000000 --- a/api/proto/odpf/optimus/hook_plugin_grpc.pb.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package optimus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// HookPluginClient is the client API for HookPlugin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type HookPluginClient interface { - // GetHookSchema provides basic working details for this hook - GetHookSchema(ctx context.Context, in *GetHookSchema_Request, opts ...grpc.CallOption) (*GetHookSchema_Response, error) - // GetHookQuestions list down all the cli inputs required to generate spec files - // name used for question will be directly mapped to DefaultHookConfig() parameters - GetHookQuestions(ctx context.Context, in *GetHookQuestions_Request, opts ...grpc.CallOption) (*GetHookQuestions_Response, error) - ValidateHookQuestion(ctx context.Context, in *ValidateHookQuestion_Request, opts ...grpc.CallOption) (*ValidateHookQuestion_Response, error) - // DefaultHookConfig are a set of configuration which will be embedded in job - // specification. These configs can be requested by the docker container before - // execution - // It will be generated based on results of GetHookQuestions, it also inherit - // its parent task config - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultHookConfig(ctx context.Context, in *DefaultHookConfig_Request, opts ...grpc.CallOption) (*DefaultHookConfig_Response, error) - // DefaultHookAssets are a set of files which will be embedded in job - // specification in assets folder. These configs can be requested by the - // docker container before execution. - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultHookAssets(ctx context.Context, in *DefaultHookAssets_Request, opts ...grpc.CallOption) (*DefaultHookAssets_Response, error) -} - -type hookPluginClient struct { - cc grpc.ClientConnInterface -} - -func NewHookPluginClient(cc grpc.ClientConnInterface) HookPluginClient { - return &hookPluginClient{cc} -} - -func (c *hookPluginClient) GetHookSchema(ctx context.Context, in *GetHookSchema_Request, opts ...grpc.CallOption) (*GetHookSchema_Response, error) { - out := new(GetHookSchema_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.HookPlugin/GetHookSchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hookPluginClient) GetHookQuestions(ctx context.Context, in *GetHookQuestions_Request, opts ...grpc.CallOption) (*GetHookQuestions_Response, error) { - out := new(GetHookQuestions_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.HookPlugin/GetHookQuestions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hookPluginClient) ValidateHookQuestion(ctx context.Context, in *ValidateHookQuestion_Request, opts ...grpc.CallOption) (*ValidateHookQuestion_Response, error) { - out := new(ValidateHookQuestion_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.HookPlugin/ValidateHookQuestion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hookPluginClient) DefaultHookConfig(ctx context.Context, in *DefaultHookConfig_Request, opts ...grpc.CallOption) (*DefaultHookConfig_Response, error) { - out := new(DefaultHookConfig_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.HookPlugin/DefaultHookConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *hookPluginClient) DefaultHookAssets(ctx context.Context, in *DefaultHookAssets_Request, opts ...grpc.CallOption) (*DefaultHookAssets_Response, error) { - out := new(DefaultHookAssets_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.HookPlugin/DefaultHookAssets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HookPluginServer is the server API for HookPlugin service. -// All implementations must embed UnimplementedHookPluginServer -// for forward compatibility -type HookPluginServer interface { - // GetHookSchema provides basic working details for this hook - GetHookSchema(context.Context, *GetHookSchema_Request) (*GetHookSchema_Response, error) - // GetHookQuestions list down all the cli inputs required to generate spec files - // name used for question will be directly mapped to DefaultHookConfig() parameters - GetHookQuestions(context.Context, *GetHookQuestions_Request) (*GetHookQuestions_Response, error) - ValidateHookQuestion(context.Context, *ValidateHookQuestion_Request) (*ValidateHookQuestion_Response, error) - // DefaultHookConfig are a set of configuration which will be embedded in job - // specification. These configs can be requested by the docker container before - // execution - // It will be generated based on results of GetHookQuestions, it also inherit - // its parent task config - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultHookConfig(context.Context, *DefaultHookConfig_Request) (*DefaultHookConfig_Response, error) - // DefaultHookAssets are a set of files which will be embedded in job - // specification in assets folder. These configs can be requested by the - // docker container before execution. - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultHookAssets(context.Context, *DefaultHookAssets_Request) (*DefaultHookAssets_Response, error) - mustEmbedUnimplementedHookPluginServer() -} - -// UnimplementedHookPluginServer must be embedded to have forward compatible implementations. -type UnimplementedHookPluginServer struct { -} - -func (UnimplementedHookPluginServer) GetHookSchema(context.Context, *GetHookSchema_Request) (*GetHookSchema_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHookSchema not implemented") -} -func (UnimplementedHookPluginServer) GetHookQuestions(context.Context, *GetHookQuestions_Request) (*GetHookQuestions_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHookQuestions not implemented") -} -func (UnimplementedHookPluginServer) ValidateHookQuestion(context.Context, *ValidateHookQuestion_Request) (*ValidateHookQuestion_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateHookQuestion not implemented") -} -func (UnimplementedHookPluginServer) DefaultHookConfig(context.Context, *DefaultHookConfig_Request) (*DefaultHookConfig_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method DefaultHookConfig not implemented") -} -func (UnimplementedHookPluginServer) DefaultHookAssets(context.Context, *DefaultHookAssets_Request) (*DefaultHookAssets_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method DefaultHookAssets not implemented") -} -func (UnimplementedHookPluginServer) mustEmbedUnimplementedHookPluginServer() {} - -// UnsafeHookPluginServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to HookPluginServer will -// result in compilation errors. -type UnsafeHookPluginServer interface { - mustEmbedUnimplementedHookPluginServer() -} - -func RegisterHookPluginServer(s grpc.ServiceRegistrar, srv HookPluginServer) { - s.RegisterService(&HookPlugin_ServiceDesc, srv) -} - -func _HookPlugin_GetHookSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetHookSchema_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HookPluginServer).GetHookSchema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.HookPlugin/GetHookSchema", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HookPluginServer).GetHookSchema(ctx, req.(*GetHookSchema_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _HookPlugin_GetHookQuestions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetHookQuestions_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HookPluginServer).GetHookQuestions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.HookPlugin/GetHookQuestions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HookPluginServer).GetHookQuestions(ctx, req.(*GetHookQuestions_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _HookPlugin_ValidateHookQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateHookQuestion_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HookPluginServer).ValidateHookQuestion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.HookPlugin/ValidateHookQuestion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HookPluginServer).ValidateHookQuestion(ctx, req.(*ValidateHookQuestion_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _HookPlugin_DefaultHookConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DefaultHookConfig_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HookPluginServer).DefaultHookConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.HookPlugin/DefaultHookConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HookPluginServer).DefaultHookConfig(ctx, req.(*DefaultHookConfig_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _HookPlugin_DefaultHookAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DefaultHookAssets_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HookPluginServer).DefaultHookAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.HookPlugin/DefaultHookAssets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HookPluginServer).DefaultHookAssets(ctx, req.(*DefaultHookAssets_Request)) - } - return interceptor(ctx, in, info, handler) -} - -// HookPlugin_ServiceDesc is the grpc.ServiceDesc for HookPlugin service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var HookPlugin_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "odpf.optimus.HookPlugin", - HandlerType: (*HookPluginServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetHookSchema", - Handler: _HookPlugin_GetHookSchema_Handler, - }, - { - MethodName: "GetHookQuestions", - Handler: _HookPlugin_GetHookQuestions_Handler, - }, - { - MethodName: "ValidateHookQuestion", - Handler: _HookPlugin_ValidateHookQuestion_Handler, - }, - { - MethodName: "DefaultHookConfig", - Handler: _HookPlugin_DefaultHookConfig_Handler, - }, - { - MethodName: "DefaultHookAssets", - Handler: _HookPlugin_DefaultHookAssets_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "odpf/optimus/hook_plugin.proto", -} diff --git a/api/proto/odpf/optimus/plugins/base.pb.go b/api/proto/odpf/optimus/plugins/base.pb.go new file mode 100644 index 0000000000..dae7eff93e --- /dev/null +++ b/api/proto/odpf/optimus/plugins/base.pb.go @@ -0,0 +1,553 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.13.0 +// source: odpf/optimus/plugins/base.proto + +package optimus + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// PluginType enumerates the type of plugins Optimus supports +type PluginType int32 + +const ( + PluginType_PluginType_UNKNOWN PluginType = 0 + PluginType_PluginType_TASK PluginType = 1 + PluginType_PluginType_HOOK PluginType = 2 +) + +// Enum value maps for PluginType. +var ( + PluginType_name = map[int32]string{ + 0: "PluginType_UNKNOWN", + 1: "PluginType_TASK", + 2: "PluginType_HOOK", + } + PluginType_value = map[string]int32{ + "PluginType_UNKNOWN": 0, + "PluginType_TASK": 1, + "PluginType_HOOK": 2, + } +) + +func (x PluginType) Enum() *PluginType { + p := new(PluginType) + *p = x + return p +} + +func (x PluginType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PluginType) Descriptor() protoreflect.EnumDescriptor { + return file_odpf_optimus_plugins_base_proto_enumTypes[0].Descriptor() +} + +func (PluginType) Type() protoreflect.EnumType { + return &file_odpf_optimus_plugins_base_proto_enumTypes[0] +} + +func (x PluginType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PluginType.Descriptor instead. +func (PluginType) EnumDescriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_base_proto_rawDescGZIP(), []int{0} +} + +// PluginMod enumerates the type of mods this plugin supports +type PluginMod int32 + +const ( + PluginMod_PluginMod_UNKNOWN PluginMod = 0 + PluginMod_PluginMod_CLI PluginMod = 1 + PluginMod_PluginMod_DEPENDENCYRESOLVER PluginMod = 2 +) + +// Enum value maps for PluginMod. +var ( + PluginMod_name = map[int32]string{ + 0: "PluginMod_UNKNOWN", + 1: "PluginMod_CLI", + 2: "PluginMod_DEPENDENCYRESOLVER", + } + PluginMod_value = map[string]int32{ + "PluginMod_UNKNOWN": 0, + "PluginMod_CLI": 1, + "PluginMod_DEPENDENCYRESOLVER": 2, + } +) + +func (x PluginMod) Enum() *PluginMod { + p := new(PluginMod) + *p = x + return p +} + +func (x PluginMod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PluginMod) Descriptor() protoreflect.EnumDescriptor { + return file_odpf_optimus_plugins_base_proto_enumTypes[1].Descriptor() +} + +func (PluginMod) Type() protoreflect.EnumType { + return &file_odpf_optimus_plugins_base_proto_enumTypes[1] +} + +func (x PluginMod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PluginMod.Descriptor instead. +func (PluginMod) EnumDescriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_base_proto_rawDescGZIP(), []int{1} +} + +// HookType enumerates the type of hook Optimus supports +type HookType int32 + +const ( + HookType_HookType_UNKNOWN HookType = 0 + HookType_HookType_PRE HookType = 1 + HookType_HookType_POST HookType = 2 + HookType_HookType_FAIL HookType = 3 +) + +// Enum value maps for HookType. +var ( + HookType_name = map[int32]string{ + 0: "HookType_UNKNOWN", + 1: "HookType_PRE", + 2: "HookType_POST", + 3: "HookType_FAIL", + } + HookType_value = map[string]int32{ + "HookType_UNKNOWN": 0, + "HookType_PRE": 1, + "HookType_POST": 2, + "HookType_FAIL": 3, + } +) + +func (x HookType) Enum() *HookType { + p := new(HookType) + *p = x + return p +} + +func (x HookType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HookType) Descriptor() protoreflect.EnumDescriptor { + return file_odpf_optimus_plugins_base_proto_enumTypes[2].Descriptor() +} + +func (HookType) Type() protoreflect.EnumType { + return &file_odpf_optimus_plugins_base_proto_enumTypes[2] +} + +func (x HookType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HookType.Descriptor instead. +func (HookType) EnumDescriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_base_proto_rawDescGZIP(), []int{2} +} + +type PluginInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PluginInfoRequest) Reset() { + *x = PluginInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_base_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PluginInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PluginInfoRequest) ProtoMessage() {} + +func (x *PluginInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_base_proto_msgTypes[0] + 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 PluginInfoRequest.ProtoReflect.Descriptor instead. +func (*PluginInfoRequest) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_base_proto_rawDescGZIP(), []int{0} +} + +type PluginInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + PluginType PluginType `protobuf:"varint,3,opt,name=plugin_type,json=pluginType,proto3,enum=odpf.optimus.plugins.PluginType" json:"plugin_type,omitempty"` + PluginMods []PluginMod `protobuf:"varint,4,rep,packed,name=plugin_mods,json=pluginMods,proto3,enum=odpf.optimus.plugins.PluginMod" json:"plugin_mods,omitempty"` + // plugin_version is the semver version of this individual plugin + PluginVersion string `protobuf:"bytes,5,opt,name=plugin_version,json=pluginVersion,proto3" json:"plugin_version,omitempty"` + // api_versions indicates the versions of the Optimus Plugin API + // this plugin supports + ApiVersion []string `protobuf:"bytes,6,rep,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` + // docker image including version if this executes a docker image + Image string `protobuf:"bytes,10,opt,name=image,proto3" json:"image,omitempty"` + // HOOK specific + // name of hooks on which this should depend on before executing + DependsOn []string `protobuf:"bytes,20,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty"` + HookType HookType `protobuf:"varint,21,opt,name=hook_type,json=hookType,proto3,enum=odpf.optimus.plugins.HookType" json:"hook_type,omitempty"` + // Experimental + // will be mounted inside the container as volume + SecretPath string `protobuf:"bytes,30,opt,name=secret_path,json=secretPath,proto3" json:"secret_path,omitempty"` +} + +func (x *PluginInfoResponse) Reset() { + *x = PluginInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_base_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PluginInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PluginInfoResponse) ProtoMessage() {} + +func (x *PluginInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_base_proto_msgTypes[1] + 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 PluginInfoResponse.ProtoReflect.Descriptor instead. +func (*PluginInfoResponse) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_base_proto_rawDescGZIP(), []int{1} +} + +func (x *PluginInfoResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PluginInfoResponse) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *PluginInfoResponse) GetPluginType() PluginType { + if x != nil { + return x.PluginType + } + return PluginType_PluginType_UNKNOWN +} + +func (x *PluginInfoResponse) GetPluginMods() []PluginMod { + if x != nil { + return x.PluginMods + } + return nil +} + +func (x *PluginInfoResponse) GetPluginVersion() string { + if x != nil { + return x.PluginVersion + } + return "" +} + +func (x *PluginInfoResponse) GetApiVersion() []string { + if x != nil { + return x.ApiVersion + } + return nil +} + +func (x *PluginInfoResponse) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *PluginInfoResponse) GetDependsOn() []string { + if x != nil { + return x.DependsOn + } + return nil +} + +func (x *PluginInfoResponse) GetHookType() HookType { + if x != nil { + return x.HookType + } + return HookType_HookType_UNKNOWN +} + +func (x *PluginInfoResponse) GetSecretPath() string { + if x != nil { + return x.SecretPath + } + return "" +} + +type PluginOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DryRun bool `protobuf:"varint,1,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` +} + +func (x *PluginOptions) Reset() { + *x = PluginOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_base_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PluginOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PluginOptions) ProtoMessage() {} + +func (x *PluginOptions) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_base_proto_msgTypes[2] + 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 PluginOptions.ProtoReflect.Descriptor instead. +func (*PluginOptions) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_base_proto_rawDescGZIP(), []int{2} +} + +func (x *PluginOptions) GetDryRun() bool { + if x != nil { + return x.DryRun + } + return false +} + +var File_odpf_optimus_plugins_base_proto protoreflect.FileDescriptor + +var file_odpf_optimus_plugins_base_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x14, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x13, 0x0a, 0x11, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xaa, 0x03, 0x0a, + 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0b, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, + 0x6f, 0x64, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x3b, 0x0a, 0x09, 0x68, + 0x6f, 0x6f, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x48, 0x6f, 0x6f, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, + 0x68, 0x6f, 0x6f, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x28, 0x0a, 0x0d, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, + 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, + 0x52, 0x75, 0x6e, 0x2a, 0x4e, 0x0a, 0x0a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x13, + 0x0a, 0x0f, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x48, 0x4f, 0x4f, + 0x4b, 0x10, 0x02, 0x2a, 0x57, 0x0a, 0x09, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, + 0x12, 0x15, 0x0a, 0x11, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x4d, 0x6f, 0x64, 0x5f, 0x43, 0x4c, 0x49, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x5f, 0x44, 0x45, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x4e, + 0x43, 0x59, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x58, 0x0a, 0x08, + 0x48, 0x6f, 0x6f, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x48, 0x6f, 0x6f, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, + 0x0a, 0x0c, 0x48, 0x6f, 0x6f, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x52, 0x45, 0x10, 0x01, + 0x12, 0x11, 0x0a, 0x0d, 0x48, 0x6f, 0x6f, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x4f, 0x53, + 0x54, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x48, 0x6f, 0x6f, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x10, 0x03, 0x32, 0x67, 0x0a, 0x04, 0x42, 0x61, 0x73, 0x65, 0x12, 0x5f, + 0x0a, 0x0a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x27, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x53, 0x0a, 0x1e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x73, 0x42, 0x0f, 0x42, 0x61, 0x73, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_optimus_plugins_base_proto_rawDescOnce sync.Once + file_odpf_optimus_plugins_base_proto_rawDescData = file_odpf_optimus_plugins_base_proto_rawDesc +) + +func file_odpf_optimus_plugins_base_proto_rawDescGZIP() []byte { + file_odpf_optimus_plugins_base_proto_rawDescOnce.Do(func() { + file_odpf_optimus_plugins_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_optimus_plugins_base_proto_rawDescData) + }) + return file_odpf_optimus_plugins_base_proto_rawDescData +} + +var file_odpf_optimus_plugins_base_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_odpf_optimus_plugins_base_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_odpf_optimus_plugins_base_proto_goTypes = []interface{}{ + (PluginType)(0), // 0: odpf.optimus.plugins.PluginType + (PluginMod)(0), // 1: odpf.optimus.plugins.PluginMod + (HookType)(0), // 2: odpf.optimus.plugins.HookType + (*PluginInfoRequest)(nil), // 3: odpf.optimus.plugins.PluginInfoRequest + (*PluginInfoResponse)(nil), // 4: odpf.optimus.plugins.PluginInfoResponse + (*PluginOptions)(nil), // 5: odpf.optimus.plugins.PluginOptions +} +var file_odpf_optimus_plugins_base_proto_depIdxs = []int32{ + 0, // 0: odpf.optimus.plugins.PluginInfoResponse.plugin_type:type_name -> odpf.optimus.plugins.PluginType + 1, // 1: odpf.optimus.plugins.PluginInfoResponse.plugin_mods:type_name -> odpf.optimus.plugins.PluginMod + 2, // 2: odpf.optimus.plugins.PluginInfoResponse.hook_type:type_name -> odpf.optimus.plugins.HookType + 3, // 3: odpf.optimus.plugins.Base.PluginInfo:input_type -> odpf.optimus.plugins.PluginInfoRequest + 4, // 4: odpf.optimus.plugins.Base.PluginInfo:output_type -> odpf.optimus.plugins.PluginInfoResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_odpf_optimus_plugins_base_proto_init() } +func file_odpf_optimus_plugins_base_proto_init() { + if File_odpf_optimus_plugins_base_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_optimus_plugins_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_optimus_plugins_base_proto_rawDesc, + NumEnums: 3, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_odpf_optimus_plugins_base_proto_goTypes, + DependencyIndexes: file_odpf_optimus_plugins_base_proto_depIdxs, + EnumInfos: file_odpf_optimus_plugins_base_proto_enumTypes, + MessageInfos: file_odpf_optimus_plugins_base_proto_msgTypes, + }.Build() + File_odpf_optimus_plugins_base_proto = out.File + file_odpf_optimus_plugins_base_proto_rawDesc = nil + file_odpf_optimus_plugins_base_proto_goTypes = nil + file_odpf_optimus_plugins_base_proto_depIdxs = nil +} diff --git a/api/proto/odpf/optimus/plugins/base_grpc.pb.go b/api/proto/odpf/optimus/plugins/base_grpc.pb.go new file mode 100644 index 0000000000..f819309626 --- /dev/null +++ b/api/proto/odpf/optimus/plugins/base_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package optimus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// BaseClient is the client API for Base service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BaseClient interface { + // PluginInfo provides basic details for this plugin + PluginInfo(ctx context.Context, in *PluginInfoRequest, opts ...grpc.CallOption) (*PluginInfoResponse, error) +} + +type baseClient struct { + cc grpc.ClientConnInterface +} + +func NewBaseClient(cc grpc.ClientConnInterface) BaseClient { + return &baseClient{cc} +} + +func (c *baseClient) PluginInfo(ctx context.Context, in *PluginInfoRequest, opts ...grpc.CallOption) (*PluginInfoResponse, error) { + out := new(PluginInfoResponse) + err := c.cc.Invoke(ctx, "/odpf.optimus.plugins.Base/PluginInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BaseServer is the server API for Base service. +// All implementations must embed UnimplementedBaseServer +// for forward compatibility +type BaseServer interface { + // PluginInfo provides basic details for this plugin + PluginInfo(context.Context, *PluginInfoRequest) (*PluginInfoResponse, error) + mustEmbedUnimplementedBaseServer() +} + +// UnimplementedBaseServer must be embedded to have forward compatible implementations. +type UnimplementedBaseServer struct { +} + +func (UnimplementedBaseServer) PluginInfo(context.Context, *PluginInfoRequest) (*PluginInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PluginInfo not implemented") +} +func (UnimplementedBaseServer) mustEmbedUnimplementedBaseServer() {} + +// UnsafeBaseServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BaseServer will +// result in compilation errors. +type UnsafeBaseServer interface { + mustEmbedUnimplementedBaseServer() +} + +func RegisterBaseServer(s grpc.ServiceRegistrar, srv BaseServer) { + s.RegisterService(&Base_ServiceDesc, srv) +} + +func _Base_PluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PluginInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BaseServer).PluginInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/odpf.optimus.plugins.Base/PluginInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BaseServer).PluginInfo(ctx, req.(*PluginInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Base_ServiceDesc is the grpc.ServiceDesc for Base service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Base_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "odpf.optimus.plugins.Base", + HandlerType: (*BaseServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PluginInfo", + Handler: _Base_PluginInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "odpf/optimus/plugins/base.proto", +} diff --git a/api/proto/odpf/optimus/plugins/cli.pb.go b/api/proto/odpf/optimus/plugins/cli.pb.go new file mode 100644 index 0000000000..3e5c58b990 --- /dev/null +++ b/api/proto/odpf/optimus/plugins/cli.pb.go @@ -0,0 +1,1465 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.13.0 +// source: odpf/optimus/plugins/cli.proto + +package optimus + +import ( + timestamp "github.com/golang/protobuf/ptypes/timestamp" + optimus "github.com/odpf/optimus/api/proto/odpf/optimus" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PluginQuestion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Prompt string `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"` + Help string `protobuf:"bytes,3,opt,name=help,proto3" json:"help,omitempty"` + Default string `protobuf:"bytes,4,opt,name=default,proto3" json:"default,omitempty"` + Multiselect []string `protobuf:"bytes,5,rep,name=multiselect,proto3" json:"multiselect,omitempty"` + SubQuestions []*PluginQuestion_SubQuestion `protobuf:"bytes,6,rep,name=sub_questions,json=subQuestions,proto3" json:"sub_questions,omitempty"` +} + +func (x *PluginQuestion) Reset() { + *x = PluginQuestion{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PluginQuestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PluginQuestion) ProtoMessage() {} + +func (x *PluginQuestion) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[0] + 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 PluginQuestion.ProtoReflect.Descriptor instead. +func (*PluginQuestion) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{0} +} + +func (x *PluginQuestion) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PluginQuestion) GetPrompt() string { + if x != nil { + return x.Prompt + } + return "" +} + +func (x *PluginQuestion) GetHelp() string { + if x != nil { + return x.Help + } + return "" +} + +func (x *PluginQuestion) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *PluginQuestion) GetMultiselect() []string { + if x != nil { + return x.Multiselect + } + return nil +} + +func (x *PluginQuestion) GetSubQuestions() []*PluginQuestion_SubQuestion { + if x != nil { + return x.SubQuestions + } + return nil +} + +type PluginAnswer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Question *PluginQuestion `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *PluginAnswer) Reset() { + *x = PluginAnswer{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PluginAnswer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PluginAnswer) ProtoMessage() {} + +func (x *PluginAnswer) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[1] + 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 PluginAnswer.ProtoReflect.Descriptor instead. +func (*PluginAnswer) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{1} +} + +func (x *PluginAnswer) GetQuestion() *PluginQuestion { + if x != nil { + return x.Question + } + return nil +} + +func (x *PluginAnswer) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type GetQuestionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobName string `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` + Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *GetQuestionsRequest) Reset() { + *x = GetQuestionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuestionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuestionsRequest) ProtoMessage() {} + +func (x *GetQuestionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[2] + 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 GetQuestionsRequest.ProtoReflect.Descriptor instead. +func (*GetQuestionsRequest) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{2} +} + +func (x *GetQuestionsRequest) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +func (x *GetQuestionsRequest) GetOptions() *PluginOptions { + if x != nil { + return x.Options + } + return nil +} + +type GetQuestionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Questions []*PluginQuestion `protobuf:"bytes,1,rep,name=questions,proto3" json:"questions,omitempty"` +} + +func (x *GetQuestionsResponse) Reset() { + *x = GetQuestionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetQuestionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetQuestionsResponse) ProtoMessage() {} + +func (x *GetQuestionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[3] + 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 GetQuestionsResponse.ProtoReflect.Descriptor instead. +func (*GetQuestionsResponse) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{3} +} + +func (x *GetQuestionsResponse) GetQuestions() []*PluginQuestion { + if x != nil { + return x.Questions + } + return nil +} + +type ValidateQuestionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Answer *PluginAnswer `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"` + Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *ValidateQuestionRequest) Reset() { + *x = ValidateQuestionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateQuestionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateQuestionRequest) ProtoMessage() {} + +func (x *ValidateQuestionRequest) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[4] + 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 ValidateQuestionRequest.ProtoReflect.Descriptor instead. +func (*ValidateQuestionRequest) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{4} +} + +func (x *ValidateQuestionRequest) GetAnswer() *PluginAnswer { + if x != nil { + return x.Answer + } + return nil +} + +func (x *ValidateQuestionRequest) GetOptions() *PluginOptions { + if x != nil { + return x.Options + } + return nil +} + +type ValidateQuestionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *ValidateQuestionResponse) Reset() { + *x = ValidateQuestionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateQuestionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateQuestionResponse) ProtoMessage() {} + +func (x *ValidateQuestionResponse) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[5] + 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 ValidateQuestionResponse.ProtoReflect.Descriptor instead. +func (*ValidateQuestionResponse) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{5} +} + +func (x *ValidateQuestionResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *ValidateQuestionResponse) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type Configs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Configs []*Configs_Config `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` +} + +func (x *Configs) Reset() { + *x = Configs{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Configs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Configs) ProtoMessage() {} + +func (x *Configs) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[6] + 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 Configs.ProtoReflect.Descriptor instead. +func (*Configs) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{6} +} + +func (x *Configs) GetConfigs() []*Configs_Config { + if x != nil { + return x.Configs + } + return nil +} + +type DefaultConfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Answers []*PluginAnswer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"` + Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *DefaultConfigRequest) Reset() { + *x = DefaultConfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DefaultConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DefaultConfigRequest) ProtoMessage() {} + +func (x *DefaultConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_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 DefaultConfigRequest.ProtoReflect.Descriptor instead. +func (*DefaultConfigRequest) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{7} +} + +func (x *DefaultConfigRequest) GetAnswers() []*PluginAnswer { + if x != nil { + return x.Answers + } + return nil +} + +func (x *DefaultConfigRequest) GetOptions() *PluginOptions { + if x != nil { + return x.Options + } + return nil +} + +type DefaultConfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *Configs `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *DefaultConfigResponse) Reset() { + *x = DefaultConfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DefaultConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DefaultConfigResponse) ProtoMessage() {} + +func (x *DefaultConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_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 DefaultConfigResponse.ProtoReflect.Descriptor instead. +func (*DefaultConfigResponse) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{8} +} + +func (x *DefaultConfigResponse) GetConfig() *Configs { + if x != nil { + return x.Config + } + return nil +} + +type Assets struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Assets []*Assets_Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` +} + +func (x *Assets) Reset() { + *x = Assets{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Assets) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Assets) ProtoMessage() {} + +func (x *Assets) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[9] + 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 Assets.ProtoReflect.Descriptor instead. +func (*Assets) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{9} +} + +func (x *Assets) GetAssets() []*Assets_Asset { + if x != nil { + return x.Assets + } + return nil +} + +type DefaultAssetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Answers []*PluginAnswer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"` + Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *DefaultAssetsRequest) Reset() { + *x = DefaultAssetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DefaultAssetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DefaultAssetsRequest) ProtoMessage() {} + +func (x *DefaultAssetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[10] + 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 DefaultAssetsRequest.ProtoReflect.Descriptor instead. +func (*DefaultAssetsRequest) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{10} +} + +func (x *DefaultAssetsRequest) GetAnswers() []*PluginAnswer { + if x != nil { + return x.Answers + } + return nil +} + +func (x *DefaultAssetsRequest) GetOptions() *PluginOptions { + if x != nil { + return x.Options + } + return nil +} + +type DefaultAssetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Assets *Assets `protobuf:"bytes,1,opt,name=assets,proto3" json:"assets,omitempty"` +} + +func (x *DefaultAssetsResponse) Reset() { + *x = DefaultAssetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DefaultAssetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DefaultAssetsResponse) ProtoMessage() {} + +func (x *DefaultAssetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[11] + 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 DefaultAssetsResponse.ProtoReflect.Descriptor instead. +func (*DefaultAssetsResponse) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{11} +} + +func (x *DefaultAssetsResponse) GetAssets() *Assets { + if x != nil { + return x.Assets + } + return nil +} + +type CompileAssetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Configs *Configs `protobuf:"bytes,1,opt,name=configs,proto3" json:"configs,omitempty"` + Assets *Assets `protobuf:"bytes,2,opt,name=assets,proto3" json:"assets,omitempty"` + Window *optimus.TaskWindow `protobuf:"bytes,3,opt,name=window,proto3" json:"window,omitempty"` + InstanceSchedule *timestamp.Timestamp `protobuf:"bytes,4,opt,name=instance_schedule,json=instanceSchedule,proto3" json:"instance_schedule,omitempty"` + InstanceData []*optimus.InstanceSpecData `protobuf:"bytes,5,rep,name=instance_data,json=instanceData,proto3" json:"instance_data,omitempty"` + Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *CompileAssetsRequest) Reset() { + *x = CompileAssetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompileAssetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompileAssetsRequest) ProtoMessage() {} + +func (x *CompileAssetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[12] + 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 CompileAssetsRequest.ProtoReflect.Descriptor instead. +func (*CompileAssetsRequest) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{12} +} + +func (x *CompileAssetsRequest) GetConfigs() *Configs { + if x != nil { + return x.Configs + } + return nil +} + +func (x *CompileAssetsRequest) GetAssets() *Assets { + if x != nil { + return x.Assets + } + return nil +} + +func (x *CompileAssetsRequest) GetWindow() *optimus.TaskWindow { + if x != nil { + return x.Window + } + return nil +} + +func (x *CompileAssetsRequest) GetInstanceSchedule() *timestamp.Timestamp { + if x != nil { + return x.InstanceSchedule + } + return nil +} + +func (x *CompileAssetsRequest) GetInstanceData() []*optimus.InstanceSpecData { + if x != nil { + return x.InstanceData + } + return nil +} + +func (x *CompileAssetsRequest) GetOptions() *PluginOptions { + if x != nil { + return x.Options + } + return nil +} + +type CompileAssetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Assets *Assets `protobuf:"bytes,1,opt,name=assets,proto3" json:"assets,omitempty"` +} + +func (x *CompileAssetsResponse) Reset() { + *x = CompileAssetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompileAssetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompileAssetsResponse) ProtoMessage() {} + +func (x *CompileAssetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[13] + 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 CompileAssetsResponse.ProtoReflect.Descriptor instead. +func (*CompileAssetsResponse) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{13} +} + +func (x *CompileAssetsResponse) GetAssets() *Assets { + if x != nil { + return x.Assets + } + return nil +} + +type PluginQuestion_SubQuestion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IfValue string `protobuf:"bytes,1,opt,name=if_value,json=ifValue,proto3" json:"if_value,omitempty"` + Questions []*PluginQuestion `protobuf:"bytes,2,rep,name=questions,proto3" json:"questions,omitempty"` +} + +func (x *PluginQuestion_SubQuestion) Reset() { + *x = PluginQuestion_SubQuestion{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PluginQuestion_SubQuestion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PluginQuestion_SubQuestion) ProtoMessage() {} + +func (x *PluginQuestion_SubQuestion) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[14] + 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 PluginQuestion_SubQuestion.ProtoReflect.Descriptor instead. +func (*PluginQuestion_SubQuestion) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *PluginQuestion_SubQuestion) GetIfValue() string { + if x != nil { + return x.IfValue + } + return "" +} + +func (x *PluginQuestion_SubQuestion) GetQuestions() []*PluginQuestion { + if x != nil { + return x.Questions + } + return nil +} + +type Configs_Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Configs_Config) Reset() { + *x = Configs_Config{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Configs_Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Configs_Config) ProtoMessage() {} + +func (x *Configs_Config) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[15] + 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 Configs_Config.ProtoReflect.Descriptor instead. +func (*Configs_Config) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *Configs_Config) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Configs_Config) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Assets_Asset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Assets_Asset) Reset() { + *x = Assets_Asset{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Assets_Asset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Assets_Asset) ProtoMessage() {} + +func (x *Assets_Asset) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_cli_proto_msgTypes[16] + 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 Assets_Asset.ProtoReflect.Descriptor instead. +func (*Assets_Asset) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_cli_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *Assets_Asset) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Assets_Asset) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +var File_odpf_optimus_plugins_cli_proto protoreflect.FileDescriptor + +var file_odpf_optimus_plugins_cli_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x14, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x02, 0x0a, + 0x0e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x65, 0x6c, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0d, 0x73, + 0x75, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x51, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x1a, 0x6c, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x66, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x42, 0x0a, 0x09, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, + 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x66, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, + 0x12, 0x40, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x6f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x51, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5a, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x42, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, + 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x3d, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4a, 0x0a, 0x18, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7d, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x1a, 0x32, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x22, 0x93, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, + 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x12, 0x3d, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4e, 0x0a, + 0x15, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x77, 0x0a, + 0x06, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x1a, 0x31, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 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, 0x22, 0x93, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3c, 0x0a, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, 0x6e, + 0x73, 0x77, 0x65, 0x72, 0x52, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4d, 0x0a, 0x15, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x84, 0x03, 0x0a, 0x14, + 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x34, 0x0a, + 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x06, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x47, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 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, 0x10, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x43, + 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x4d, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x32, 0xa0, 0x04, 0x0a, 0x06, 0x43, 0x4c, 0x49, 0x4d, 0x6f, 0x64, 0x12, 0x65, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x51, + 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0d, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x68, 0x0a, 0x0d, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x12, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0d, 0x43, 0x6f, + 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x2a, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4f, 0x0a, 0x1e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x42, 0x0b, 0x43, 0x4c, 0x49, 0x4d, 0x6f, 0x64, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_optimus_plugins_cli_proto_rawDescOnce sync.Once + file_odpf_optimus_plugins_cli_proto_rawDescData = file_odpf_optimus_plugins_cli_proto_rawDesc +) + +func file_odpf_optimus_plugins_cli_proto_rawDescGZIP() []byte { + file_odpf_optimus_plugins_cli_proto_rawDescOnce.Do(func() { + file_odpf_optimus_plugins_cli_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_optimus_plugins_cli_proto_rawDescData) + }) + return file_odpf_optimus_plugins_cli_proto_rawDescData +} + +var file_odpf_optimus_plugins_cli_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_odpf_optimus_plugins_cli_proto_goTypes = []interface{}{ + (*PluginQuestion)(nil), // 0: odpf.optimus.plugins.PluginQuestion + (*PluginAnswer)(nil), // 1: odpf.optimus.plugins.PluginAnswer + (*GetQuestionsRequest)(nil), // 2: odpf.optimus.plugins.GetQuestionsRequest + (*GetQuestionsResponse)(nil), // 3: odpf.optimus.plugins.GetQuestionsResponse + (*ValidateQuestionRequest)(nil), // 4: odpf.optimus.plugins.ValidateQuestionRequest + (*ValidateQuestionResponse)(nil), // 5: odpf.optimus.plugins.ValidateQuestionResponse + (*Configs)(nil), // 6: odpf.optimus.plugins.Configs + (*DefaultConfigRequest)(nil), // 7: odpf.optimus.plugins.DefaultConfigRequest + (*DefaultConfigResponse)(nil), // 8: odpf.optimus.plugins.DefaultConfigResponse + (*Assets)(nil), // 9: odpf.optimus.plugins.Assets + (*DefaultAssetsRequest)(nil), // 10: odpf.optimus.plugins.DefaultAssetsRequest + (*DefaultAssetsResponse)(nil), // 11: odpf.optimus.plugins.DefaultAssetsResponse + (*CompileAssetsRequest)(nil), // 12: odpf.optimus.plugins.CompileAssetsRequest + (*CompileAssetsResponse)(nil), // 13: odpf.optimus.plugins.CompileAssetsResponse + (*PluginQuestion_SubQuestion)(nil), // 14: odpf.optimus.plugins.PluginQuestion.SubQuestion + (*Configs_Config)(nil), // 15: odpf.optimus.plugins.Configs.Config + (*Assets_Asset)(nil), // 16: odpf.optimus.plugins.Assets.Asset + (*PluginOptions)(nil), // 17: odpf.optimus.plugins.PluginOptions + (*optimus.TaskWindow)(nil), // 18: odpf.optimus.TaskWindow + (*timestamp.Timestamp)(nil), // 19: google.protobuf.Timestamp + (*optimus.InstanceSpecData)(nil), // 20: odpf.optimus.InstanceSpecData +} +var file_odpf_optimus_plugins_cli_proto_depIdxs = []int32{ + 14, // 0: odpf.optimus.plugins.PluginQuestion.sub_questions:type_name -> odpf.optimus.plugins.PluginQuestion.SubQuestion + 0, // 1: odpf.optimus.plugins.PluginAnswer.question:type_name -> odpf.optimus.plugins.PluginQuestion + 17, // 2: odpf.optimus.plugins.GetQuestionsRequest.options:type_name -> odpf.optimus.plugins.PluginOptions + 0, // 3: odpf.optimus.plugins.GetQuestionsResponse.questions:type_name -> odpf.optimus.plugins.PluginQuestion + 1, // 4: odpf.optimus.plugins.ValidateQuestionRequest.answer:type_name -> odpf.optimus.plugins.PluginAnswer + 17, // 5: odpf.optimus.plugins.ValidateQuestionRequest.options:type_name -> odpf.optimus.plugins.PluginOptions + 15, // 6: odpf.optimus.plugins.Configs.configs:type_name -> odpf.optimus.plugins.Configs.Config + 1, // 7: odpf.optimus.plugins.DefaultConfigRequest.answers:type_name -> odpf.optimus.plugins.PluginAnswer + 17, // 8: odpf.optimus.plugins.DefaultConfigRequest.options:type_name -> odpf.optimus.plugins.PluginOptions + 6, // 9: odpf.optimus.plugins.DefaultConfigResponse.config:type_name -> odpf.optimus.plugins.Configs + 16, // 10: odpf.optimus.plugins.Assets.assets:type_name -> odpf.optimus.plugins.Assets.Asset + 1, // 11: odpf.optimus.plugins.DefaultAssetsRequest.answers:type_name -> odpf.optimus.plugins.PluginAnswer + 17, // 12: odpf.optimus.plugins.DefaultAssetsRequest.options:type_name -> odpf.optimus.plugins.PluginOptions + 9, // 13: odpf.optimus.plugins.DefaultAssetsResponse.assets:type_name -> odpf.optimus.plugins.Assets + 6, // 14: odpf.optimus.plugins.CompileAssetsRequest.configs:type_name -> odpf.optimus.plugins.Configs + 9, // 15: odpf.optimus.plugins.CompileAssetsRequest.assets:type_name -> odpf.optimus.plugins.Assets + 18, // 16: odpf.optimus.plugins.CompileAssetsRequest.window:type_name -> odpf.optimus.TaskWindow + 19, // 17: odpf.optimus.plugins.CompileAssetsRequest.instance_schedule:type_name -> google.protobuf.Timestamp + 20, // 18: odpf.optimus.plugins.CompileAssetsRequest.instance_data:type_name -> odpf.optimus.InstanceSpecData + 17, // 19: odpf.optimus.plugins.CompileAssetsRequest.options:type_name -> odpf.optimus.plugins.PluginOptions + 9, // 20: odpf.optimus.plugins.CompileAssetsResponse.assets:type_name -> odpf.optimus.plugins.Assets + 0, // 21: odpf.optimus.plugins.PluginQuestion.SubQuestion.questions:type_name -> odpf.optimus.plugins.PluginQuestion + 2, // 22: odpf.optimus.plugins.CLIMod.GetQuestions:input_type -> odpf.optimus.plugins.GetQuestionsRequest + 4, // 23: odpf.optimus.plugins.CLIMod.ValidateQuestion:input_type -> odpf.optimus.plugins.ValidateQuestionRequest + 7, // 24: odpf.optimus.plugins.CLIMod.DefaultConfig:input_type -> odpf.optimus.plugins.DefaultConfigRequest + 10, // 25: odpf.optimus.plugins.CLIMod.DefaultAssets:input_type -> odpf.optimus.plugins.DefaultAssetsRequest + 12, // 26: odpf.optimus.plugins.CLIMod.CompileAssets:input_type -> odpf.optimus.plugins.CompileAssetsRequest + 3, // 27: odpf.optimus.plugins.CLIMod.GetQuestions:output_type -> odpf.optimus.plugins.GetQuestionsResponse + 5, // 28: odpf.optimus.plugins.CLIMod.ValidateQuestion:output_type -> odpf.optimus.plugins.ValidateQuestionResponse + 8, // 29: odpf.optimus.plugins.CLIMod.DefaultConfig:output_type -> odpf.optimus.plugins.DefaultConfigResponse + 11, // 30: odpf.optimus.plugins.CLIMod.DefaultAssets:output_type -> odpf.optimus.plugins.DefaultAssetsResponse + 13, // 31: odpf.optimus.plugins.CLIMod.CompileAssets:output_type -> odpf.optimus.plugins.CompileAssetsResponse + 27, // [27:32] is the sub-list for method output_type + 22, // [22:27] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_odpf_optimus_plugins_cli_proto_init() } +func file_odpf_optimus_plugins_cli_proto_init() { + if File_odpf_optimus_plugins_cli_proto != nil { + return + } + file_odpf_optimus_plugins_base_proto_init() + if !protoimpl.UnsafeEnabled { + file_odpf_optimus_plugins_cli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginQuestion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginAnswer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuestionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetQuestionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateQuestionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateQuestionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Configs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DefaultConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DefaultConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Assets); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DefaultAssetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DefaultAssetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompileAssetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompileAssetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginQuestion_SubQuestion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Configs_Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_cli_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Assets_Asset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_optimus_plugins_cli_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_odpf_optimus_plugins_cli_proto_goTypes, + DependencyIndexes: file_odpf_optimus_plugins_cli_proto_depIdxs, + MessageInfos: file_odpf_optimus_plugins_cli_proto_msgTypes, + }.Build() + File_odpf_optimus_plugins_cli_proto = out.File + file_odpf_optimus_plugins_cli_proto_rawDesc = nil + file_odpf_optimus_plugins_cli_proto_goTypes = nil + file_odpf_optimus_plugins_cli_proto_depIdxs = nil +} diff --git a/api/proto/odpf/optimus/plugins/cli_grpc.pb.go b/api/proto/odpf/optimus/plugins/cli_grpc.pb.go new file mode 100644 index 0000000000..0d63b4a283 --- /dev/null +++ b/api/proto/odpf/optimus/plugins/cli_grpc.pb.go @@ -0,0 +1,271 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package optimus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// CLIModClient is the client API for CLIMod service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CLIModClient interface { + // GetQuestions list down all the cli inputs required to generate spec files + // name used for question will be directly mapped to DefaultConfig() parameters + GetQuestions(ctx context.Context, in *GetQuestionsRequest, opts ...grpc.CallOption) (*GetQuestionsResponse, error) + ValidateQuestion(ctx context.Context, in *ValidateQuestionRequest, opts ...grpc.CallOption) (*ValidateQuestionResponse, error) + // DefaultConfig are a set of configuration which will be embedded in job + // specification. These configs can be requested by the docker container before + // execution + // It will be generated based on results of GetQuestions from user, it also inherit + // its parent config if any + // if DryRun is true in PluginOptions, should not throw error for missing inputs + DefaultConfig(ctx context.Context, in *DefaultConfigRequest, opts ...grpc.CallOption) (*DefaultConfigResponse, error) + // DefaultAssets are a set of files which will be embedded in job + // specification in assets folder. These configs can be requested by the + // docker container before execution. + // if DryRun is true in PluginOptions, should not throw error for missing inputs + DefaultAssets(ctx context.Context, in *DefaultAssetsRequest, opts ...grpc.CallOption) (*DefaultAssetsResponse, error) + // CompileAssets overrides the default asset compilation behaviour + CompileAssets(ctx context.Context, in *CompileAssetsRequest, opts ...grpc.CallOption) (*CompileAssetsResponse, error) +} + +type cLIModClient struct { + cc grpc.ClientConnInterface +} + +func NewCLIModClient(cc grpc.ClientConnInterface) CLIModClient { + return &cLIModClient{cc} +} + +func (c *cLIModClient) GetQuestions(ctx context.Context, in *GetQuestionsRequest, opts ...grpc.CallOption) (*GetQuestionsResponse, error) { + out := new(GetQuestionsResponse) + err := c.cc.Invoke(ctx, "/odpf.optimus.plugins.CLIMod/GetQuestions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cLIModClient) ValidateQuestion(ctx context.Context, in *ValidateQuestionRequest, opts ...grpc.CallOption) (*ValidateQuestionResponse, error) { + out := new(ValidateQuestionResponse) + err := c.cc.Invoke(ctx, "/odpf.optimus.plugins.CLIMod/ValidateQuestion", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cLIModClient) DefaultConfig(ctx context.Context, in *DefaultConfigRequest, opts ...grpc.CallOption) (*DefaultConfigResponse, error) { + out := new(DefaultConfigResponse) + err := c.cc.Invoke(ctx, "/odpf.optimus.plugins.CLIMod/DefaultConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cLIModClient) DefaultAssets(ctx context.Context, in *DefaultAssetsRequest, opts ...grpc.CallOption) (*DefaultAssetsResponse, error) { + out := new(DefaultAssetsResponse) + err := c.cc.Invoke(ctx, "/odpf.optimus.plugins.CLIMod/DefaultAssets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cLIModClient) CompileAssets(ctx context.Context, in *CompileAssetsRequest, opts ...grpc.CallOption) (*CompileAssetsResponse, error) { + out := new(CompileAssetsResponse) + err := c.cc.Invoke(ctx, "/odpf.optimus.plugins.CLIMod/CompileAssets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CLIModServer is the server API for CLIMod service. +// All implementations must embed UnimplementedCLIModServer +// for forward compatibility +type CLIModServer interface { + // GetQuestions list down all the cli inputs required to generate spec files + // name used for question will be directly mapped to DefaultConfig() parameters + GetQuestions(context.Context, *GetQuestionsRequest) (*GetQuestionsResponse, error) + ValidateQuestion(context.Context, *ValidateQuestionRequest) (*ValidateQuestionResponse, error) + // DefaultConfig are a set of configuration which will be embedded in job + // specification. These configs can be requested by the docker container before + // execution + // It will be generated based on results of GetQuestions from user, it also inherit + // its parent config if any + // if DryRun is true in PluginOptions, should not throw error for missing inputs + DefaultConfig(context.Context, *DefaultConfigRequest) (*DefaultConfigResponse, error) + // DefaultAssets are a set of files which will be embedded in job + // specification in assets folder. These configs can be requested by the + // docker container before execution. + // if DryRun is true in PluginOptions, should not throw error for missing inputs + DefaultAssets(context.Context, *DefaultAssetsRequest) (*DefaultAssetsResponse, error) + // CompileAssets overrides the default asset compilation behaviour + CompileAssets(context.Context, *CompileAssetsRequest) (*CompileAssetsResponse, error) + mustEmbedUnimplementedCLIModServer() +} + +// UnimplementedCLIModServer must be embedded to have forward compatible implementations. +type UnimplementedCLIModServer struct { +} + +func (UnimplementedCLIModServer) GetQuestions(context.Context, *GetQuestionsRequest) (*GetQuestionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetQuestions not implemented") +} +func (UnimplementedCLIModServer) ValidateQuestion(context.Context, *ValidateQuestionRequest) (*ValidateQuestionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateQuestion not implemented") +} +func (UnimplementedCLIModServer) DefaultConfig(context.Context, *DefaultConfigRequest) (*DefaultConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DefaultConfig not implemented") +} +func (UnimplementedCLIModServer) DefaultAssets(context.Context, *DefaultAssetsRequest) (*DefaultAssetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DefaultAssets not implemented") +} +func (UnimplementedCLIModServer) CompileAssets(context.Context, *CompileAssetsRequest) (*CompileAssetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompileAssets not implemented") +} +func (UnimplementedCLIModServer) mustEmbedUnimplementedCLIModServer() {} + +// UnsafeCLIModServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CLIModServer will +// result in compilation errors. +type UnsafeCLIModServer interface { + mustEmbedUnimplementedCLIModServer() +} + +func RegisterCLIModServer(s grpc.ServiceRegistrar, srv CLIModServer) { + s.RegisterService(&CLIMod_ServiceDesc, srv) +} + +func _CLIMod_GetQuestions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetQuestionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CLIModServer).GetQuestions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/odpf.optimus.plugins.CLIMod/GetQuestions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CLIModServer).GetQuestions(ctx, req.(*GetQuestionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CLIMod_ValidateQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateQuestionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CLIModServer).ValidateQuestion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/odpf.optimus.plugins.CLIMod/ValidateQuestion", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CLIModServer).ValidateQuestion(ctx, req.(*ValidateQuestionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CLIMod_DefaultConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DefaultConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CLIModServer).DefaultConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/odpf.optimus.plugins.CLIMod/DefaultConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CLIModServer).DefaultConfig(ctx, req.(*DefaultConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CLIMod_DefaultAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DefaultAssetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CLIModServer).DefaultAssets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/odpf.optimus.plugins.CLIMod/DefaultAssets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CLIModServer).DefaultAssets(ctx, req.(*DefaultAssetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CLIMod_CompileAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CompileAssetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CLIModServer).CompileAssets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/odpf.optimus.plugins.CLIMod/CompileAssets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CLIModServer).CompileAssets(ctx, req.(*CompileAssetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CLIMod_ServiceDesc is the grpc.ServiceDesc for CLIMod service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CLIMod_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "odpf.optimus.plugins.CLIMod", + HandlerType: (*CLIModServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetQuestions", + Handler: _CLIMod_GetQuestions_Handler, + }, + { + MethodName: "ValidateQuestion", + Handler: _CLIMod_ValidateQuestion_Handler, + }, + { + MethodName: "DefaultConfig", + Handler: _CLIMod_DefaultConfig_Handler, + }, + { + MethodName: "DefaultAssets", + Handler: _CLIMod_DefaultAssets_Handler, + }, + { + MethodName: "CompileAssets", + Handler: _CLIMod_CompileAssets_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "odpf/optimus/plugins/cli.proto", +} diff --git a/api/proto/odpf/optimus/plugins/dependency_resolver.pb.go b/api/proto/odpf/optimus/plugins/dependency_resolver.pb.go new file mode 100644 index 0000000000..56093a91f5 --- /dev/null +++ b/api/proto/odpf/optimus/plugins/dependency_resolver.pb.go @@ -0,0 +1,470 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.13.0 +// source: odpf/optimus/plugins/dependency_resolver.proto + +package optimus + +import ( + optimus "github.com/odpf/optimus/api/proto/odpf/optimus" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GenerateDestinationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *Configs `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + Assets *Assets `protobuf:"bytes,2,opt,name=assets,proto3" json:"assets,omitempty"` + Project *optimus.ProjectSpecification `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"` + Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *GenerateDestinationRequest) Reset() { + *x = GenerateDestinationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenerateDestinationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateDestinationRequest) ProtoMessage() {} + +func (x *GenerateDestinationRequest) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[0] + 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 GenerateDestinationRequest.ProtoReflect.Descriptor instead. +func (*GenerateDestinationRequest) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_dependency_resolver_proto_rawDescGZIP(), []int{0} +} + +func (x *GenerateDestinationRequest) GetConfig() *Configs { + if x != nil { + return x.Config + } + return nil +} + +func (x *GenerateDestinationRequest) GetAssets() *Assets { + if x != nil { + return x.Assets + } + return nil +} + +func (x *GenerateDestinationRequest) GetProject() *optimus.ProjectSpecification { + if x != nil { + return x.Project + } + return nil +} + +func (x *GenerateDestinationRequest) GetOptions() *PluginOptions { + if x != nil { + return x.Options + } + return nil +} + +type GenerateDestinationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + DestinationType string `protobuf:"bytes,2,opt,name=destination_type,json=destinationType,proto3" json:"destination_type,omitempty"` +} + +func (x *GenerateDestinationResponse) Reset() { + *x = GenerateDestinationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenerateDestinationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateDestinationResponse) ProtoMessage() {} + +func (x *GenerateDestinationResponse) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[1] + 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 GenerateDestinationResponse.ProtoReflect.Descriptor instead. +func (*GenerateDestinationResponse) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_dependency_resolver_proto_rawDescGZIP(), []int{1} +} + +func (x *GenerateDestinationResponse) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *GenerateDestinationResponse) GetDestinationType() string { + if x != nil { + return x.DestinationType + } + return "" +} + +type GenerateDependenciesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *Configs `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + Assets *Assets `protobuf:"bytes,2,opt,name=assets,proto3" json:"assets,omitempty"` + Project *optimus.ProjectSpecification `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"` + Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *GenerateDependenciesRequest) Reset() { + *x = GenerateDependenciesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenerateDependenciesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateDependenciesRequest) ProtoMessage() {} + +func (x *GenerateDependenciesRequest) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[2] + 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 GenerateDependenciesRequest.ProtoReflect.Descriptor instead. +func (*GenerateDependenciesRequest) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_dependency_resolver_proto_rawDescGZIP(), []int{2} +} + +func (x *GenerateDependenciesRequest) GetConfig() *Configs { + if x != nil { + return x.Config + } + return nil +} + +func (x *GenerateDependenciesRequest) GetAssets() *Assets { + if x != nil { + return x.Assets + } + return nil +} + +func (x *GenerateDependenciesRequest) GetProject() *optimus.ProjectSpecification { + if x != nil { + return x.Project + } + return nil +} + +func (x *GenerateDependenciesRequest) GetOptions() *PluginOptions { + if x != nil { + return x.Options + } + return nil +} + +type GenerateDependenciesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Dependencies []string `protobuf:"bytes,1,rep,name=dependencies,proto3" json:"dependencies,omitempty"` +} + +func (x *GenerateDependenciesResponse) Reset() { + *x = GenerateDependenciesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenerateDependenciesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateDependenciesResponse) ProtoMessage() {} + +func (x *GenerateDependenciesResponse) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[3] + 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 GenerateDependenciesResponse.ProtoReflect.Descriptor instead. +func (*GenerateDependenciesResponse) Descriptor() ([]byte, []int) { + return file_odpf_optimus_plugins_dependency_resolver_proto_rawDescGZIP(), []int{3} +} + +func (x *GenerateDependenciesResponse) GetDependencies() []string { + if x != nil { + return x.Dependencies + } + return nil +} + +var File_odpf_optimus_plugins_dependency_resolver_proto protoreflect.FileDescriptor + +var file_odpf_optimus_plugins_dependency_resolver_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x79, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x14, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x1a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x02, 0x0a, 0x1a, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6a, 0x0a, 0x1b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x87, 0x02, 0x0a, 0x1b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, + 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3c, 0x0a, + 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x42, 0x0a, 0x1c, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x32, 0x92, + 0x02, 0x0a, 0x15, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x12, 0x7a, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x30, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x14, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x32, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0x5e, 0x0a, 0x1e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x42, 0x1a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_optimus_plugins_dependency_resolver_proto_rawDescOnce sync.Once + file_odpf_optimus_plugins_dependency_resolver_proto_rawDescData = file_odpf_optimus_plugins_dependency_resolver_proto_rawDesc +) + +func file_odpf_optimus_plugins_dependency_resolver_proto_rawDescGZIP() []byte { + file_odpf_optimus_plugins_dependency_resolver_proto_rawDescOnce.Do(func() { + file_odpf_optimus_plugins_dependency_resolver_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_optimus_plugins_dependency_resolver_proto_rawDescData) + }) + return file_odpf_optimus_plugins_dependency_resolver_proto_rawDescData +} + +var file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_odpf_optimus_plugins_dependency_resolver_proto_goTypes = []interface{}{ + (*GenerateDestinationRequest)(nil), // 0: odpf.optimus.plugins.GenerateDestinationRequest + (*GenerateDestinationResponse)(nil), // 1: odpf.optimus.plugins.GenerateDestinationResponse + (*GenerateDependenciesRequest)(nil), // 2: odpf.optimus.plugins.GenerateDependenciesRequest + (*GenerateDependenciesResponse)(nil), // 3: odpf.optimus.plugins.GenerateDependenciesResponse + (*Configs)(nil), // 4: odpf.optimus.plugins.Configs + (*Assets)(nil), // 5: odpf.optimus.plugins.Assets + (*optimus.ProjectSpecification)(nil), // 6: odpf.optimus.ProjectSpecification + (*PluginOptions)(nil), // 7: odpf.optimus.plugins.PluginOptions +} +var file_odpf_optimus_plugins_dependency_resolver_proto_depIdxs = []int32{ + 4, // 0: odpf.optimus.plugins.GenerateDestinationRequest.config:type_name -> odpf.optimus.plugins.Configs + 5, // 1: odpf.optimus.plugins.GenerateDestinationRequest.assets:type_name -> odpf.optimus.plugins.Assets + 6, // 2: odpf.optimus.plugins.GenerateDestinationRequest.project:type_name -> odpf.optimus.ProjectSpecification + 7, // 3: odpf.optimus.plugins.GenerateDestinationRequest.options:type_name -> odpf.optimus.plugins.PluginOptions + 4, // 4: odpf.optimus.plugins.GenerateDependenciesRequest.config:type_name -> odpf.optimus.plugins.Configs + 5, // 5: odpf.optimus.plugins.GenerateDependenciesRequest.assets:type_name -> odpf.optimus.plugins.Assets + 6, // 6: odpf.optimus.plugins.GenerateDependenciesRequest.project:type_name -> odpf.optimus.ProjectSpecification + 7, // 7: odpf.optimus.plugins.GenerateDependenciesRequest.options:type_name -> odpf.optimus.plugins.PluginOptions + 0, // 8: odpf.optimus.plugins.DependencyResolverMod.GenerateDestination:input_type -> odpf.optimus.plugins.GenerateDestinationRequest + 2, // 9: odpf.optimus.plugins.DependencyResolverMod.GenerateDependencies:input_type -> odpf.optimus.plugins.GenerateDependenciesRequest + 1, // 10: odpf.optimus.plugins.DependencyResolverMod.GenerateDestination:output_type -> odpf.optimus.plugins.GenerateDestinationResponse + 3, // 11: odpf.optimus.plugins.DependencyResolverMod.GenerateDependencies:output_type -> odpf.optimus.plugins.GenerateDependenciesResponse + 10, // [10:12] is the sub-list for method output_type + 8, // [8:10] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_odpf_optimus_plugins_dependency_resolver_proto_init() } +func file_odpf_optimus_plugins_dependency_resolver_proto_init() { + if File_odpf_optimus_plugins_dependency_resolver_proto != nil { + return + } + file_odpf_optimus_plugins_cli_proto_init() + file_odpf_optimus_plugins_base_proto_init() + if !protoimpl.UnsafeEnabled { + file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateDestinationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateDestinationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateDependenciesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateDependenciesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_optimus_plugins_dependency_resolver_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_odpf_optimus_plugins_dependency_resolver_proto_goTypes, + DependencyIndexes: file_odpf_optimus_plugins_dependency_resolver_proto_depIdxs, + MessageInfos: file_odpf_optimus_plugins_dependency_resolver_proto_msgTypes, + }.Build() + File_odpf_optimus_plugins_dependency_resolver_proto = out.File + file_odpf_optimus_plugins_dependency_resolver_proto_rawDesc = nil + file_odpf_optimus_plugins_dependency_resolver_proto_goTypes = nil + file_odpf_optimus_plugins_dependency_resolver_proto_depIdxs = nil +} diff --git a/api/proto/odpf/optimus/plugins/dependency_resolver_grpc.pb.go b/api/proto/odpf/optimus/plugins/dependency_resolver_grpc.pb.go new file mode 100644 index 0000000000..67a2d2e092 --- /dev/null +++ b/api/proto/odpf/optimus/plugins/dependency_resolver_grpc.pb.go @@ -0,0 +1,143 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package optimus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// DependencyResolverModClient is the client API for DependencyResolverMod service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DependencyResolverModClient interface { + // GenerateDestination derive destination from config and assets + GenerateDestination(ctx context.Context, in *GenerateDestinationRequest, opts ...grpc.CallOption) (*GenerateDestinationResponse, error) + // GenerateDependencies return names of job destination on which this unit + // is dependent on + GenerateDependencies(ctx context.Context, in *GenerateDependenciesRequest, opts ...grpc.CallOption) (*GenerateDependenciesResponse, error) +} + +type dependencyResolverModClient struct { + cc grpc.ClientConnInterface +} + +func NewDependencyResolverModClient(cc grpc.ClientConnInterface) DependencyResolverModClient { + return &dependencyResolverModClient{cc} +} + +func (c *dependencyResolverModClient) GenerateDestination(ctx context.Context, in *GenerateDestinationRequest, opts ...grpc.CallOption) (*GenerateDestinationResponse, error) { + out := new(GenerateDestinationResponse) + err := c.cc.Invoke(ctx, "/odpf.optimus.plugins.DependencyResolverMod/GenerateDestination", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dependencyResolverModClient) GenerateDependencies(ctx context.Context, in *GenerateDependenciesRequest, opts ...grpc.CallOption) (*GenerateDependenciesResponse, error) { + out := new(GenerateDependenciesResponse) + err := c.cc.Invoke(ctx, "/odpf.optimus.plugins.DependencyResolverMod/GenerateDependencies", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DependencyResolverModServer is the server API for DependencyResolverMod service. +// All implementations must embed UnimplementedDependencyResolverModServer +// for forward compatibility +type DependencyResolverModServer interface { + // GenerateDestination derive destination from config and assets + GenerateDestination(context.Context, *GenerateDestinationRequest) (*GenerateDestinationResponse, error) + // GenerateDependencies return names of job destination on which this unit + // is dependent on + GenerateDependencies(context.Context, *GenerateDependenciesRequest) (*GenerateDependenciesResponse, error) + mustEmbedUnimplementedDependencyResolverModServer() +} + +// UnimplementedDependencyResolverModServer must be embedded to have forward compatible implementations. +type UnimplementedDependencyResolverModServer struct { +} + +func (UnimplementedDependencyResolverModServer) GenerateDestination(context.Context, *GenerateDestinationRequest) (*GenerateDestinationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateDestination not implemented") +} +func (UnimplementedDependencyResolverModServer) GenerateDependencies(context.Context, *GenerateDependenciesRequest) (*GenerateDependenciesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GenerateDependencies not implemented") +} +func (UnimplementedDependencyResolverModServer) mustEmbedUnimplementedDependencyResolverModServer() {} + +// UnsafeDependencyResolverModServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DependencyResolverModServer will +// result in compilation errors. +type UnsafeDependencyResolverModServer interface { + mustEmbedUnimplementedDependencyResolverModServer() +} + +func RegisterDependencyResolverModServer(s grpc.ServiceRegistrar, srv DependencyResolverModServer) { + s.RegisterService(&DependencyResolverMod_ServiceDesc, srv) +} + +func _DependencyResolverMod_GenerateDestination_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateDestinationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DependencyResolverModServer).GenerateDestination(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/odpf.optimus.plugins.DependencyResolverMod/GenerateDestination", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DependencyResolverModServer).GenerateDestination(ctx, req.(*GenerateDestinationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DependencyResolverMod_GenerateDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GenerateDependenciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DependencyResolverModServer).GenerateDependencies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/odpf.optimus.plugins.DependencyResolverMod/GenerateDependencies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DependencyResolverModServer).GenerateDependencies(ctx, req.(*GenerateDependenciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// DependencyResolverMod_ServiceDesc is the grpc.ServiceDesc for DependencyResolverMod service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DependencyResolverMod_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "odpf.optimus.plugins.DependencyResolverMod", + HandlerType: (*DependencyResolverModServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GenerateDestination", + Handler: _DependencyResolverMod_GenerateDestination_Handler, + }, + { + MethodName: "GenerateDependencies", + Handler: _DependencyResolverMod_GenerateDependencies_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "odpf/optimus/plugins/dependency_resolver.proto", +} diff --git a/api/proto/odpf/optimus/runtime_service.pb.go b/api/proto/odpf/optimus/runtime_service.pb.go index 745aa0824f..0a33f64cc1 100644 --- a/api/proto/odpf/optimus/runtime_service.pb.go +++ b/api/proto/odpf/optimus/runtime_service.pb.go @@ -28,7 +28,7 @@ const ( type InstanceSpec_Type int32 const ( - InstanceSpec_INVALID InstanceSpec_Type = 0 + InstanceSpec_UNKNOWN InstanceSpec_Type = 0 InstanceSpec_TASK InstanceSpec_Type = 1 InstanceSpec_HOOK InstanceSpec_Type = 2 ) @@ -36,12 +36,12 @@ const ( // Enum value maps for InstanceSpec_Type. var ( InstanceSpec_Type_name = map[int32]string{ - 0: "INVALID", + 0: "UNKNOWN", 1: "TASK", 2: "HOOK", } InstanceSpec_Type_value = map[string]int32{ - "INVALID": 0, + "UNKNOWN": 0, "TASK": 1, "HOOK": 2, } @@ -78,7 +78,7 @@ func (InstanceSpec_Type) EnumDescriptor() ([]byte, []int) { type InstanceSpecData_Type int32 const ( - InstanceSpecData_INVALID InstanceSpecData_Type = 0 + InstanceSpecData_UNKNOWN InstanceSpecData_Type = 0 InstanceSpecData_ENV InstanceSpecData_Type = 1 InstanceSpecData_FILE InstanceSpecData_Type = 2 ) @@ -86,12 +86,12 @@ const ( // Enum value maps for InstanceSpecData_Type. var ( InstanceSpecData_Type_name = map[int32]string{ - 0: "INVALID", + 0: "UNKNOWN", 1: "ENV", 2: "FILE", } InstanceSpecData_Type_value = map[string]int32{ - "INVALID": 0, + "UNKNOWN": 0, "ENV": 1, "FILE": 2, } @@ -127,7 +127,7 @@ func (InstanceSpecData_Type) EnumDescriptor() ([]byte, []int) { type JobEvent_Type int32 const ( - JobEvent_INVALID JobEvent_Type = 0 + JobEvent_UNKNOWN JobEvent_Type = 0 JobEvent_SLA_MISS JobEvent_Type = 1 JobEvent_FAILURE JobEvent_Type = 2 JobEvent_SUCCESS JobEvent_Type = 3 @@ -136,13 +136,13 @@ const ( // Enum value maps for JobEvent_Type. var ( JobEvent_Type_name = map[int32]string{ - 0: "INVALID", + 0: "UNKNOWN", 1: "SLA_MISS", 2: "FAILURE", 3: "SUCCESS", } JobEvent_Type_value = map[string]int32{ - "INVALID": 0, + "UNKNOWN": 0, "SLA_MISS": 1, "FAILURE": 2, "SUCCESS": 3, @@ -781,7 +781,7 @@ func (x *InstanceSpecData) GetType() InstanceSpecData_Type { if x != nil { return x.Type } - return InstanceSpecData_INVALID + return InstanceSpecData_UNKNOWN } type InstanceContext struct { @@ -939,7 +939,7 @@ func (x *JobEvent) GetType() JobEvent_Type { if x != nil { return x.Type } - return JobEvent_INVALID + return JobEvent_UNKNOWN } func (x *JobEvent) GetValue() *_struct.Struct { @@ -949,6 +949,69 @@ func (x *JobEvent) GetValue() *_struct.Struct { return nil } +type TaskWindow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Size *duration.Duration `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` + Offset *duration.Duration `protobuf:"bytes,2,opt,name=offset,proto3" json:"offset,omitempty"` + TruncateTo string `protobuf:"bytes,3,opt,name=truncate_to,json=truncateTo,proto3" json:"truncate_to,omitempty"` +} + +func (x *TaskWindow) Reset() { + *x = TaskWindow{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskWindow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskWindow) ProtoMessage() {} + +func (x *TaskWindow) ProtoReflect() protoreflect.Message { + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[11] + 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 TaskWindow.ProtoReflect.Descriptor instead. +func (*TaskWindow) Descriptor() ([]byte, []int) { + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{11} +} + +func (x *TaskWindow) GetSize() *duration.Duration { + if x != nil { + return x.Size + } + return nil +} + +func (x *TaskWindow) GetOffset() *duration.Duration { + if x != nil { + return x.Offset + } + return nil +} + +func (x *TaskWindow) GetTruncateTo() string { + if x != nil { + return x.TruncateTo + } + return "" +} + // ResourceSpecification are datastore specification representation of a resource type ResourceSpecification struct { state protoimpl.MessageState @@ -966,7 +1029,7 @@ type ResourceSpecification struct { func (x *ResourceSpecification) Reset() { *x = ResourceSpecification{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[11] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -979,7 +1042,7 @@ func (x *ResourceSpecification) String() string { func (*ResourceSpecification) ProtoMessage() {} func (x *ResourceSpecification) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[11] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -992,7 +1055,7 @@ func (x *ResourceSpecification) ProtoReflect() protoreflect.Message { // Deprecated: Use ResourceSpecification.ProtoReflect.Descriptor instead. func (*ResourceSpecification) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{11} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{12} } func (x *ResourceSpecification) GetVersion() int32 { @@ -1048,7 +1111,7 @@ type VersionRequest struct { func (x *VersionRequest) Reset() { *x = VersionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[12] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1061,7 +1124,7 @@ func (x *VersionRequest) String() string { func (*VersionRequest) ProtoMessage() {} func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[12] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1074,7 +1137,7 @@ func (x *VersionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{12} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{13} } func (x *VersionRequest) GetClient() string { @@ -1095,7 +1158,7 @@ type VersionResponse struct { func (x *VersionResponse) Reset() { *x = VersionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[13] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1108,7 +1171,7 @@ func (x *VersionResponse) String() string { func (*VersionResponse) ProtoMessage() {} func (x *VersionResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[13] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1121,7 +1184,7 @@ func (x *VersionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead. func (*VersionResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{13} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{14} } func (x *VersionResponse) GetServer() string { @@ -1144,7 +1207,7 @@ type DeployJobSpecificationRequest struct { func (x *DeployJobSpecificationRequest) Reset() { *x = DeployJobSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[14] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1157,7 +1220,7 @@ func (x *DeployJobSpecificationRequest) String() string { func (*DeployJobSpecificationRequest) ProtoMessage() {} func (x *DeployJobSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[14] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1170,7 +1233,7 @@ func (x *DeployJobSpecificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeployJobSpecificationRequest.ProtoReflect.Descriptor instead. func (*DeployJobSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{14} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{15} } func (x *DeployJobSpecificationRequest) GetProjectName() string { @@ -1210,7 +1273,7 @@ type DeployJobSpecificationResponse struct { func (x *DeployJobSpecificationResponse) Reset() { *x = DeployJobSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[15] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1223,7 +1286,7 @@ func (x *DeployJobSpecificationResponse) String() string { func (*DeployJobSpecificationResponse) ProtoMessage() {} func (x *DeployJobSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[15] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1236,7 +1299,7 @@ func (x *DeployJobSpecificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeployJobSpecificationResponse.ProtoReflect.Descriptor instead. func (*DeployJobSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{15} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{16} } func (x *DeployJobSpecificationResponse) GetSuccess() bool { @@ -1279,7 +1342,7 @@ type ListJobSpecificationRequest struct { func (x *ListJobSpecificationRequest) Reset() { *x = ListJobSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[16] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1292,7 +1355,7 @@ func (x *ListJobSpecificationRequest) String() string { func (*ListJobSpecificationRequest) ProtoMessage() {} func (x *ListJobSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[16] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1305,7 +1368,7 @@ func (x *ListJobSpecificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListJobSpecificationRequest.ProtoReflect.Descriptor instead. func (*ListJobSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{16} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{17} } func (x *ListJobSpecificationRequest) GetProjectName() string { @@ -1333,7 +1396,7 @@ type ListJobSpecificationResponse struct { func (x *ListJobSpecificationResponse) Reset() { *x = ListJobSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[17] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1346,7 +1409,7 @@ func (x *ListJobSpecificationResponse) String() string { func (*ListJobSpecificationResponse) ProtoMessage() {} func (x *ListJobSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[17] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1359,7 +1422,7 @@ func (x *ListJobSpecificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListJobSpecificationResponse.ProtoReflect.Descriptor instead. func (*ListJobSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{17} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{18} } func (x *ListJobSpecificationResponse) GetJobs() []*JobSpecification { @@ -1382,7 +1445,7 @@ type DumpJobSpecificationRequest struct { func (x *DumpJobSpecificationRequest) Reset() { *x = DumpJobSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[18] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1395,7 +1458,7 @@ func (x *DumpJobSpecificationRequest) String() string { func (*DumpJobSpecificationRequest) ProtoMessage() {} func (x *DumpJobSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[18] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1408,7 +1471,7 @@ func (x *DumpJobSpecificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DumpJobSpecificationRequest.ProtoReflect.Descriptor instead. func (*DumpJobSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{18} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{19} } func (x *DumpJobSpecificationRequest) GetProjectName() string { @@ -1444,7 +1507,7 @@ type DumpJobSpecificationResponse struct { func (x *DumpJobSpecificationResponse) Reset() { *x = DumpJobSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[19] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1457,7 +1520,7 @@ func (x *DumpJobSpecificationResponse) String() string { func (*DumpJobSpecificationResponse) ProtoMessage() {} func (x *DumpJobSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[19] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1470,7 +1533,7 @@ func (x *DumpJobSpecificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DumpJobSpecificationResponse.ProtoReflect.Descriptor instead. func (*DumpJobSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{19} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{20} } func (x *DumpJobSpecificationResponse) GetSuccess() bool { @@ -1500,7 +1563,7 @@ type CheckJobSpecificationRequest struct { func (x *CheckJobSpecificationRequest) Reset() { *x = CheckJobSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[20] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1513,7 +1576,7 @@ func (x *CheckJobSpecificationRequest) String() string { func (*CheckJobSpecificationRequest) ProtoMessage() {} func (x *CheckJobSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[20] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1526,7 +1589,7 @@ func (x *CheckJobSpecificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckJobSpecificationRequest.ProtoReflect.Descriptor instead. func (*CheckJobSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{20} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{21} } func (x *CheckJobSpecificationRequest) GetProjectName() string { @@ -1561,7 +1624,7 @@ type CheckJobSpecificationResponse struct { func (x *CheckJobSpecificationResponse) Reset() { *x = CheckJobSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[21] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1574,7 +1637,7 @@ func (x *CheckJobSpecificationResponse) String() string { func (*CheckJobSpecificationResponse) ProtoMessage() {} func (x *CheckJobSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[21] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1587,7 +1650,7 @@ func (x *CheckJobSpecificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckJobSpecificationResponse.ProtoReflect.Descriptor instead. func (*CheckJobSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{21} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{22} } func (x *CheckJobSpecificationResponse) GetSuccess() bool { @@ -1610,7 +1673,7 @@ type CheckJobSpecificationsRequest struct { func (x *CheckJobSpecificationsRequest) Reset() { *x = CheckJobSpecificationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[22] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1623,7 +1686,7 @@ func (x *CheckJobSpecificationsRequest) String() string { func (*CheckJobSpecificationsRequest) ProtoMessage() {} func (x *CheckJobSpecificationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[22] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1636,7 +1699,7 @@ func (x *CheckJobSpecificationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckJobSpecificationsRequest.ProtoReflect.Descriptor instead. func (*CheckJobSpecificationsRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{22} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{23} } func (x *CheckJobSpecificationsRequest) GetProjectName() string { @@ -1676,7 +1739,7 @@ type CheckJobSpecificationsResponse struct { func (x *CheckJobSpecificationsResponse) Reset() { *x = CheckJobSpecificationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[23] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1689,7 +1752,7 @@ func (x *CheckJobSpecificationsResponse) String() string { func (*CheckJobSpecificationsResponse) ProtoMessage() {} func (x *CheckJobSpecificationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[23] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1702,7 +1765,7 @@ func (x *CheckJobSpecificationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckJobSpecificationsResponse.ProtoReflect.Descriptor instead. func (*CheckJobSpecificationsResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{23} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{24} } func (x *CheckJobSpecificationsResponse) GetSuccess() bool { @@ -1745,7 +1808,7 @@ type RegisterProjectRequest struct { func (x *RegisterProjectRequest) Reset() { *x = RegisterProjectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[24] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1758,7 +1821,7 @@ func (x *RegisterProjectRequest) String() string { func (*RegisterProjectRequest) ProtoMessage() {} func (x *RegisterProjectRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[24] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1771,7 +1834,7 @@ func (x *RegisterProjectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterProjectRequest.ProtoReflect.Descriptor instead. func (*RegisterProjectRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{24} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{25} } func (x *RegisterProjectRequest) GetProject() *ProjectSpecification { @@ -1800,7 +1863,7 @@ type RegisterProjectResponse struct { func (x *RegisterProjectResponse) Reset() { *x = RegisterProjectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[25] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1813,7 +1876,7 @@ func (x *RegisterProjectResponse) String() string { func (*RegisterProjectResponse) ProtoMessage() {} func (x *RegisterProjectResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[25] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1826,7 +1889,7 @@ func (x *RegisterProjectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterProjectResponse.ProtoReflect.Descriptor instead. func (*RegisterProjectResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{25} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{26} } func (x *RegisterProjectResponse) GetSuccess() bool { @@ -1855,7 +1918,7 @@ type RegisterProjectNamespaceRequest struct { func (x *RegisterProjectNamespaceRequest) Reset() { *x = RegisterProjectNamespaceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[26] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1868,7 +1931,7 @@ func (x *RegisterProjectNamespaceRequest) String() string { func (*RegisterProjectNamespaceRequest) ProtoMessage() {} func (x *RegisterProjectNamespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[26] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1881,7 +1944,7 @@ func (x *RegisterProjectNamespaceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterProjectNamespaceRequest.ProtoReflect.Descriptor instead. func (*RegisterProjectNamespaceRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{26} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{27} } func (x *RegisterProjectNamespaceRequest) GetProjectName() string { @@ -1910,7 +1973,7 @@ type RegisterProjectNamespaceResponse struct { func (x *RegisterProjectNamespaceResponse) Reset() { *x = RegisterProjectNamespaceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[27] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1923,7 +1986,7 @@ func (x *RegisterProjectNamespaceResponse) String() string { func (*RegisterProjectNamespaceResponse) ProtoMessage() {} func (x *RegisterProjectNamespaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[27] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1936,7 +1999,7 @@ func (x *RegisterProjectNamespaceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterProjectNamespaceResponse.ProtoReflect.Descriptor instead. func (*RegisterProjectNamespaceResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{27} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{28} } func (x *RegisterProjectNamespaceResponse) GetSuccess() bool { @@ -1966,7 +2029,7 @@ type CreateJobSpecificationRequest struct { func (x *CreateJobSpecificationRequest) Reset() { *x = CreateJobSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[28] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1979,7 +2042,7 @@ func (x *CreateJobSpecificationRequest) String() string { func (*CreateJobSpecificationRequest) ProtoMessage() {} func (x *CreateJobSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[28] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1992,7 +2055,7 @@ func (x *CreateJobSpecificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateJobSpecificationRequest.ProtoReflect.Descriptor instead. func (*CreateJobSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{28} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{29} } func (x *CreateJobSpecificationRequest) GetProjectName() string { @@ -2028,7 +2091,7 @@ type CreateJobSpecificationResponse struct { func (x *CreateJobSpecificationResponse) Reset() { *x = CreateJobSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[29] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2041,7 +2104,7 @@ func (x *CreateJobSpecificationResponse) String() string { func (*CreateJobSpecificationResponse) ProtoMessage() {} func (x *CreateJobSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[29] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2054,7 +2117,7 @@ func (x *CreateJobSpecificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateJobSpecificationResponse.ProtoReflect.Descriptor instead. func (*CreateJobSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{29} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{30} } func (x *CreateJobSpecificationResponse) GetSuccess() bool { @@ -2084,7 +2147,7 @@ type ReadJobSpecificationRequest struct { func (x *ReadJobSpecificationRequest) Reset() { *x = ReadJobSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[30] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2097,7 +2160,7 @@ func (x *ReadJobSpecificationRequest) String() string { func (*ReadJobSpecificationRequest) ProtoMessage() {} func (x *ReadJobSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[30] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2110,7 +2173,7 @@ func (x *ReadJobSpecificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadJobSpecificationRequest.ProtoReflect.Descriptor instead. func (*ReadJobSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{30} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{31} } func (x *ReadJobSpecificationRequest) GetProjectName() string { @@ -2145,7 +2208,7 @@ type ReadJobSpecificationResponse struct { func (x *ReadJobSpecificationResponse) Reset() { *x = ReadJobSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[31] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2158,7 +2221,7 @@ func (x *ReadJobSpecificationResponse) String() string { func (*ReadJobSpecificationResponse) ProtoMessage() {} func (x *ReadJobSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[31] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2171,7 +2234,7 @@ func (x *ReadJobSpecificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadJobSpecificationResponse.ProtoReflect.Descriptor instead. func (*ReadJobSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{31} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{32} } func (x *ReadJobSpecificationResponse) GetSpec() *JobSpecification { @@ -2194,7 +2257,7 @@ type DeleteJobSpecificationRequest struct { func (x *DeleteJobSpecificationRequest) Reset() { *x = DeleteJobSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[32] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2207,7 +2270,7 @@ func (x *DeleteJobSpecificationRequest) String() string { func (*DeleteJobSpecificationRequest) ProtoMessage() {} func (x *DeleteJobSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[32] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2220,7 +2283,7 @@ func (x *DeleteJobSpecificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteJobSpecificationRequest.ProtoReflect.Descriptor instead. func (*DeleteJobSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{32} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{33} } func (x *DeleteJobSpecificationRequest) GetProjectName() string { @@ -2256,7 +2319,7 @@ type DeleteJobSpecificationResponse struct { func (x *DeleteJobSpecificationResponse) Reset() { *x = DeleteJobSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[33] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2269,7 +2332,7 @@ func (x *DeleteJobSpecificationResponse) String() string { func (*DeleteJobSpecificationResponse) ProtoMessage() {} func (x *DeleteJobSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[33] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2282,7 +2345,7 @@ func (x *DeleteJobSpecificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteJobSpecificationResponse.ProtoReflect.Descriptor instead. func (*DeleteJobSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{33} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{34} } func (x *DeleteJobSpecificationResponse) GetSuccess() bool { @@ -2312,7 +2375,7 @@ type RegisterSecretRequest struct { func (x *RegisterSecretRequest) Reset() { *x = RegisterSecretRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[34] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2325,7 +2388,7 @@ func (x *RegisterSecretRequest) String() string { func (*RegisterSecretRequest) ProtoMessage() {} func (x *RegisterSecretRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[34] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2338,7 +2401,7 @@ func (x *RegisterSecretRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterSecretRequest.ProtoReflect.Descriptor instead. func (*RegisterSecretRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{34} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{35} } func (x *RegisterSecretRequest) GetProjectName() string { @@ -2374,7 +2437,7 @@ type RegisterSecretResponse struct { func (x *RegisterSecretResponse) Reset() { *x = RegisterSecretResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[35] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2387,7 +2450,7 @@ func (x *RegisterSecretResponse) String() string { func (*RegisterSecretResponse) ProtoMessage() {} func (x *RegisterSecretResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[35] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2400,7 +2463,7 @@ func (x *RegisterSecretResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterSecretResponse.ProtoReflect.Descriptor instead. func (*RegisterSecretResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{35} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{36} } func (x *RegisterSecretResponse) GetSuccess() bool { @@ -2426,7 +2489,7 @@ type ListProjectsRequest struct { func (x *ListProjectsRequest) Reset() { *x = ListProjectsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[36] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2439,7 +2502,7 @@ func (x *ListProjectsRequest) String() string { func (*ListProjectsRequest) ProtoMessage() {} func (x *ListProjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[36] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2452,7 +2515,7 @@ func (x *ListProjectsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListProjectsRequest.ProtoReflect.Descriptor instead. func (*ListProjectsRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{36} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{37} } type ListProjectsResponse struct { @@ -2466,7 +2529,7 @@ type ListProjectsResponse struct { func (x *ListProjectsResponse) Reset() { *x = ListProjectsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[37] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2479,7 +2542,7 @@ func (x *ListProjectsResponse) String() string { func (*ListProjectsResponse) ProtoMessage() {} func (x *ListProjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[37] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2492,7 +2555,7 @@ func (x *ListProjectsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListProjectsResponse.ProtoReflect.Descriptor instead. func (*ListProjectsResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{37} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{38} } func (x *ListProjectsResponse) GetProjects() []*ProjectSpecification { @@ -2513,7 +2576,7 @@ type ListProjectNamespacesRequest struct { func (x *ListProjectNamespacesRequest) Reset() { *x = ListProjectNamespacesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[38] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2526,7 +2589,7 @@ func (x *ListProjectNamespacesRequest) String() string { func (*ListProjectNamespacesRequest) ProtoMessage() {} func (x *ListProjectNamespacesRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[38] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2539,7 +2602,7 @@ func (x *ListProjectNamespacesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListProjectNamespacesRequest.ProtoReflect.Descriptor instead. func (*ListProjectNamespacesRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{38} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{39} } func (x *ListProjectNamespacesRequest) GetProjectName() string { @@ -2560,7 +2623,7 @@ type ListProjectNamespacesResponse struct { func (x *ListProjectNamespacesResponse) Reset() { *x = ListProjectNamespacesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[39] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2573,7 +2636,7 @@ func (x *ListProjectNamespacesResponse) String() string { func (*ListProjectNamespacesResponse) ProtoMessage() {} func (x *ListProjectNamespacesResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[39] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2586,7 +2649,7 @@ func (x *ListProjectNamespacesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListProjectNamespacesResponse.ProtoReflect.Descriptor instead. func (*ListProjectNamespacesResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{39} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{40} } func (x *ListProjectNamespacesResponse) GetNamespaces() []*NamespaceSpecification { @@ -2611,7 +2674,7 @@ type RegisterInstanceRequest struct { func (x *RegisterInstanceRequest) Reset() { *x = RegisterInstanceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[40] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2624,7 +2687,7 @@ func (x *RegisterInstanceRequest) String() string { func (*RegisterInstanceRequest) ProtoMessage() {} func (x *RegisterInstanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[40] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2637,7 +2700,7 @@ func (x *RegisterInstanceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterInstanceRequest.ProtoReflect.Descriptor instead. func (*RegisterInstanceRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{40} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{41} } func (x *RegisterInstanceRequest) GetProjectName() string { @@ -2672,7 +2735,7 @@ func (x *RegisterInstanceRequest) GetInstanceType() InstanceSpec_Type { if x != nil { return x.InstanceType } - return InstanceSpec_INVALID + return InstanceSpec_UNKNOWN } type RegisterInstanceResponse struct { @@ -2690,7 +2753,7 @@ type RegisterInstanceResponse struct { func (x *RegisterInstanceResponse) Reset() { *x = RegisterInstanceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[41] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2703,7 +2766,7 @@ func (x *RegisterInstanceResponse) String() string { func (*RegisterInstanceResponse) ProtoMessage() {} func (x *RegisterInstanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[41] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2716,7 +2779,7 @@ func (x *RegisterInstanceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterInstanceResponse.ProtoReflect.Descriptor instead. func (*RegisterInstanceResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{41} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{42} } func (x *RegisterInstanceResponse) GetProject() *ProjectSpecification { @@ -2766,7 +2829,7 @@ type JobStatusRequest struct { func (x *JobStatusRequest) Reset() { *x = JobStatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[42] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2779,7 +2842,7 @@ func (x *JobStatusRequest) String() string { func (*JobStatusRequest) ProtoMessage() {} func (x *JobStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[42] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2792,7 +2855,7 @@ func (x *JobStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use JobStatusRequest.ProtoReflect.Descriptor instead. func (*JobStatusRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{42} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{43} } func (x *JobStatusRequest) GetProjectName() string { @@ -2820,7 +2883,7 @@ type JobStatusResponse struct { func (x *JobStatusResponse) Reset() { *x = JobStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[43] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2833,7 +2896,7 @@ func (x *JobStatusResponse) String() string { func (*JobStatusResponse) ProtoMessage() {} func (x *JobStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[43] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2846,7 +2909,7 @@ func (x *JobStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use JobStatusResponse.ProtoReflect.Descriptor instead. func (*JobStatusResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{43} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{44} } func (x *JobStatusResponse) GetStatuses() []*JobStatus { @@ -2870,7 +2933,7 @@ type GetWindowRequest struct { func (x *GetWindowRequest) Reset() { *x = GetWindowRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[44] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2883,7 +2946,7 @@ func (x *GetWindowRequest) String() string { func (*GetWindowRequest) ProtoMessage() {} func (x *GetWindowRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[44] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2896,7 +2959,7 @@ func (x *GetWindowRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWindowRequest.ProtoReflect.Descriptor instead. func (*GetWindowRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{44} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{45} } func (x *GetWindowRequest) GetScheduledAt() *timestamp.Timestamp { @@ -2939,7 +3002,7 @@ type GetWindowResponse struct { func (x *GetWindowResponse) Reset() { *x = GetWindowResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[45] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2952,7 +3015,7 @@ func (x *GetWindowResponse) String() string { func (*GetWindowResponse) ProtoMessage() {} func (x *GetWindowResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[45] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2965,7 +3028,7 @@ func (x *GetWindowResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWindowResponse.ProtoReflect.Descriptor instead. func (*GetWindowResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{45} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{46} } func (x *GetWindowResponse) GetStart() *timestamp.Timestamp { @@ -2996,7 +3059,7 @@ type DeployResourceSpecificationRequest struct { func (x *DeployResourceSpecificationRequest) Reset() { *x = DeployResourceSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[46] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3009,7 +3072,7 @@ func (x *DeployResourceSpecificationRequest) String() string { func (*DeployResourceSpecificationRequest) ProtoMessage() {} func (x *DeployResourceSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[46] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3022,7 +3085,7 @@ func (x *DeployResourceSpecificationRequest) ProtoReflect() protoreflect.Message // Deprecated: Use DeployResourceSpecificationRequest.ProtoReflect.Descriptor instead. func (*DeployResourceSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{46} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{47} } func (x *DeployResourceSpecificationRequest) GetProjectName() string { @@ -3069,7 +3132,7 @@ type DeployResourceSpecificationResponse struct { func (x *DeployResourceSpecificationResponse) Reset() { *x = DeployResourceSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[47] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3082,7 +3145,7 @@ func (x *DeployResourceSpecificationResponse) String() string { func (*DeployResourceSpecificationResponse) ProtoMessage() {} func (x *DeployResourceSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[47] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3095,7 +3158,7 @@ func (x *DeployResourceSpecificationResponse) ProtoReflect() protoreflect.Messag // Deprecated: Use DeployResourceSpecificationResponse.ProtoReflect.Descriptor instead. func (*DeployResourceSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{47} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{48} } func (x *DeployResourceSpecificationResponse) GetSuccess() bool { @@ -3140,7 +3203,7 @@ type ListResourceSpecificationRequest struct { func (x *ListResourceSpecificationRequest) Reset() { *x = ListResourceSpecificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[48] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3153,7 +3216,7 @@ func (x *ListResourceSpecificationRequest) String() string { func (*ListResourceSpecificationRequest) ProtoMessage() {} func (x *ListResourceSpecificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[48] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3166,7 +3229,7 @@ func (x *ListResourceSpecificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListResourceSpecificationRequest.ProtoReflect.Descriptor instead. func (*ListResourceSpecificationRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{48} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{49} } func (x *ListResourceSpecificationRequest) GetProjectName() string { @@ -3201,7 +3264,7 @@ type ListResourceSpecificationResponse struct { func (x *ListResourceSpecificationResponse) Reset() { *x = ListResourceSpecificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[49] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3214,7 +3277,7 @@ func (x *ListResourceSpecificationResponse) String() string { func (*ListResourceSpecificationResponse) ProtoMessage() {} func (x *ListResourceSpecificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[49] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3227,7 +3290,7 @@ func (x *ListResourceSpecificationResponse) ProtoReflect() protoreflect.Message // Deprecated: Use ListResourceSpecificationResponse.ProtoReflect.Descriptor instead. func (*ListResourceSpecificationResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{49} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{50} } func (x *ListResourceSpecificationResponse) GetResources() []*ResourceSpecification { @@ -3251,7 +3314,7 @@ type CreateResourceRequest struct { func (x *CreateResourceRequest) Reset() { *x = CreateResourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[50] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3264,7 +3327,7 @@ func (x *CreateResourceRequest) String() string { func (*CreateResourceRequest) ProtoMessage() {} func (x *CreateResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[50] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3277,7 +3340,7 @@ func (x *CreateResourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateResourceRequest.ProtoReflect.Descriptor instead. func (*CreateResourceRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{50} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{51} } func (x *CreateResourceRequest) GetProjectName() string { @@ -3320,7 +3383,7 @@ type CreateResourceResponse struct { func (x *CreateResourceResponse) Reset() { *x = CreateResourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[51] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3333,7 +3396,7 @@ func (x *CreateResourceResponse) String() string { func (*CreateResourceResponse) ProtoMessage() {} func (x *CreateResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[51] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3346,7 +3409,7 @@ func (x *CreateResourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateResourceResponse.ProtoReflect.Descriptor instead. func (*CreateResourceResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{51} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{52} } func (x *CreateResourceResponse) GetSuccess() bool { @@ -3377,7 +3440,7 @@ type ReadResourceRequest struct { func (x *ReadResourceRequest) Reset() { *x = ReadResourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[52] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3390,7 +3453,7 @@ func (x *ReadResourceRequest) String() string { func (*ReadResourceRequest) ProtoMessage() {} func (x *ReadResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[52] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3403,7 +3466,7 @@ func (x *ReadResourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadResourceRequest.ProtoReflect.Descriptor instead. func (*ReadResourceRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{52} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{53} } func (x *ReadResourceRequest) GetProjectName() string { @@ -3447,7 +3510,7 @@ type ReadResourceResponse struct { func (x *ReadResourceResponse) Reset() { *x = ReadResourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[53] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3460,7 +3523,7 @@ func (x *ReadResourceResponse) String() string { func (*ReadResourceResponse) ProtoMessage() {} func (x *ReadResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[53] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3473,7 +3536,7 @@ func (x *ReadResourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadResourceResponse.ProtoReflect.Descriptor instead. func (*ReadResourceResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{53} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{54} } func (x *ReadResourceResponse) GetSuccess() bool { @@ -3511,7 +3574,7 @@ type UpdateResourceRequest struct { func (x *UpdateResourceRequest) Reset() { *x = UpdateResourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[54] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3524,7 +3587,7 @@ func (x *UpdateResourceRequest) String() string { func (*UpdateResourceRequest) ProtoMessage() {} func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[54] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3537,7 +3600,7 @@ func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateResourceRequest.ProtoReflect.Descriptor instead. func (*UpdateResourceRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{54} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{55} } func (x *UpdateResourceRequest) GetProjectName() string { @@ -3580,7 +3643,7 @@ type UpdateResourceResponse struct { func (x *UpdateResourceResponse) Reset() { *x = UpdateResourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[55] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3593,7 +3656,7 @@ func (x *UpdateResourceResponse) String() string { func (*UpdateResourceResponse) ProtoMessage() {} func (x *UpdateResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[55] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3606,7 +3669,7 @@ func (x *UpdateResourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateResourceResponse.ProtoReflect.Descriptor instead. func (*UpdateResourceResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{55} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{56} } func (x *UpdateResourceResponse) GetSuccess() bool { @@ -3639,7 +3702,7 @@ type ReplayRequest struct { func (x *ReplayRequest) Reset() { *x = ReplayRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[56] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3652,7 +3715,7 @@ func (x *ReplayRequest) String() string { func (*ReplayRequest) ProtoMessage() {} func (x *ReplayRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[56] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3665,7 +3728,7 @@ func (x *ReplayRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReplayRequest.ProtoReflect.Descriptor instead. func (*ReplayRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{56} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{57} } func (x *ReplayRequest) GetProjectName() string { @@ -3722,7 +3785,7 @@ type ReplayDryRunResponse struct { func (x *ReplayDryRunResponse) Reset() { *x = ReplayDryRunResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[57] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3735,7 +3798,7 @@ func (x *ReplayDryRunResponse) String() string { func (*ReplayDryRunResponse) ProtoMessage() {} func (x *ReplayDryRunResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[57] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3748,7 +3811,7 @@ func (x *ReplayDryRunResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReplayDryRunResponse.ProtoReflect.Descriptor instead. func (*ReplayDryRunResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{57} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{58} } func (x *ReplayDryRunResponse) GetSuccess() bool { @@ -3778,7 +3841,7 @@ type ReplayExecutionTreeNode struct { func (x *ReplayExecutionTreeNode) Reset() { *x = ReplayExecutionTreeNode{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[58] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3791,7 +3854,7 @@ func (x *ReplayExecutionTreeNode) String() string { func (*ReplayExecutionTreeNode) ProtoMessage() {} func (x *ReplayExecutionTreeNode) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[58] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3804,7 +3867,7 @@ func (x *ReplayExecutionTreeNode) ProtoReflect() protoreflect.Message { // Deprecated: Use ReplayExecutionTreeNode.ProtoReflect.Descriptor instead. func (*ReplayExecutionTreeNode) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{58} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{59} } func (x *ReplayExecutionTreeNode) GetJobName() string { @@ -3839,7 +3902,7 @@ type ReplayResponse struct { func (x *ReplayResponse) Reset() { *x = ReplayResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[59] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3852,7 +3915,7 @@ func (x *ReplayResponse) String() string { func (*ReplayResponse) ProtoMessage() {} func (x *ReplayResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[59] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[60] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3865,7 +3928,7 @@ func (x *ReplayResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReplayResponse.ProtoReflect.Descriptor instead. func (*ReplayResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{59} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{60} } func (x *ReplayResponse) GetId() string { @@ -3889,7 +3952,7 @@ type RegisterJobEventRequest struct { func (x *RegisterJobEventRequest) Reset() { *x = RegisterJobEventRequest{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[60] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3902,7 +3965,7 @@ func (x *RegisterJobEventRequest) String() string { func (*RegisterJobEventRequest) ProtoMessage() {} func (x *RegisterJobEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[60] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[61] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3915,7 +3978,7 @@ func (x *RegisterJobEventRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterJobEventRequest.ProtoReflect.Descriptor instead. func (*RegisterJobEventRequest) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{60} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{61} } func (x *RegisterJobEventRequest) GetProjectName() string { @@ -3955,7 +4018,7 @@ type RegisterJobEventResponse struct { func (x *RegisterJobEventResponse) Reset() { *x = RegisterJobEventResponse{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[61] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3968,7 +4031,7 @@ func (x *RegisterJobEventResponse) String() string { func (*RegisterJobEventResponse) ProtoMessage() {} func (x *RegisterJobEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[61] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3981,7 +4044,7 @@ func (x *RegisterJobEventResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterJobEventResponse.ProtoReflect.Descriptor instead. func (*RegisterJobEventResponse) Descriptor() ([]byte, []int) { - return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{61} + return file_odpf_optimus_runtime_service_proto_rawDescGZIP(), []int{62} } type ProjectSpecification_ProjectSecret struct { @@ -3996,7 +4059,7 @@ type ProjectSpecification_ProjectSecret struct { func (x *ProjectSpecification_ProjectSecret) Reset() { *x = ProjectSpecification_ProjectSecret{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[63] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4009,7 +4072,7 @@ func (x *ProjectSpecification_ProjectSecret) String() string { func (*ProjectSpecification_ProjectSecret) ProtoMessage() {} func (x *ProjectSpecification_ProjectSecret) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[63] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[64] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4051,7 +4114,7 @@ type JobSpecification_Behavior struct { func (x *JobSpecification_Behavior) Reset() { *x = JobSpecification_Behavior{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[67] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4064,7 +4127,7 @@ func (x *JobSpecification_Behavior) String() string { func (*JobSpecification_Behavior) ProtoMessage() {} func (x *JobSpecification_Behavior) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[67] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[68] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4108,7 +4171,7 @@ type JobSpecification_Behavior_Retry struct { func (x *JobSpecification_Behavior_Retry) Reset() { *x = JobSpecification_Behavior_Retry{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[68] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4121,7 +4184,7 @@ func (x *JobSpecification_Behavior_Retry) String() string { func (*JobSpecification_Behavior_Retry) ProtoMessage() {} func (x *JobSpecification_Behavior_Retry) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[68] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[69] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4172,7 +4235,7 @@ type JobSpecification_Behavior_Notifiers struct { func (x *JobSpecification_Behavior_Notifiers) Reset() { *x = JobSpecification_Behavior_Notifiers{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[69] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4185,7 +4248,7 @@ func (x *JobSpecification_Behavior_Notifiers) String() string { func (*JobSpecification_Behavior_Notifiers) ProtoMessage() {} func (x *JobSpecification_Behavior_Notifiers) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_runtime_service_proto_msgTypes[69] + mi := &file_odpf_optimus_runtime_service_proto_msgTypes[70] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4205,7 +4268,7 @@ func (x *JobSpecification_Behavior_Notifiers) GetOn() JobEvent_Type { if x != nil { return x.On } - return JobEvent_INVALID + return JobEvent_UNKNOWN } func (x *JobSpecification_Behavior_Notifiers) GetChannels() []string { @@ -4387,7 +4450,7 @@ var file_odpf_optimus_runtime_service_proto_rawDesc = []byte{ 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x27, 0x0a, 0x04, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, + 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x4f, 0x4b, 0x10, 0x02, 0x22, 0xa9, 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, @@ -4397,7 +4460,7 @@ var file_odpf_optimus_runtime_service_proto_rawDesc = []byte{ 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 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, 0x26, 0x0a, 0x04, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x4e, 0x56, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x81, 0x02, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, @@ -4429,670 +4492,674 @@ var file_odpf_optimus_runtime_service_proto_rawDesc = []byte{ 0x74, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, - 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4c, 0x41, 0x5f, + 0x6c, 0x75, 0x65, 0x22, 0x3b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4c, 0x41, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, - 0x22, 0x94, 0x03, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x04, - 0x73, 0x70, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x47, 0x0a, 0x06, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x12, 0x47, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, - 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x41, - 0x73, 0x73, 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, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 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, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x28, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x22, 0x29, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x94, 0x01, 0x0a, - 0x1d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x32, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, - 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x1e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4a, 0x6f, - 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, - 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x4a, - 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x4a, - 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x22, 0x79, 0x0a, 0x1b, 0x44, - 0x75, 0x6d, 0x70, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x0a, 0x1c, 0x44, 0x75, 0x6d, 0x70, 0x4a, 0x6f, - 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x1c, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 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, 0x30, - 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6a, 0x6f, 0x62, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x39, - 0x0a, 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x1d, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 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, 0x32, - 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6a, 0x6f, - 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x22, 0x81, 0x01, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, - 0x03, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x63, 0x6b, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3c, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x42, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x4d, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x22, 0x88, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x42, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x56, 0x0a, 0x20, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, - 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x54, 0x0a, 0x1e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x22, 0x79, 0x0a, 0x1b, 0x52, 0x65, 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x1c, 0x52, - 0x65, 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x73, - 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, - 0x7b, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, + 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, 0x22, 0x94, 0x03, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x47, 0x0a, 0x06, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, + 0x0b, 0x41, 0x73, 0x73, 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, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 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, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x28, 0x0a, 0x0e, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x22, 0x29, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x94, + 0x01, 0x0a, 0x1d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x1e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0x71, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 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, 0x1f, - 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x56, 0x0a, 0x14, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x22, 0x41, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x22, 0x65, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x87, 0x02, 0x0a, - 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, + 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x1e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x03, 0x61, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, + 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x1b, 0x4c, 0x69, 0x73, + 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 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, 0x3d, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 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, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xbf, 0x02, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x30, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, - 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, - 0x6a, 0x6f, 0x62, 0x12, 0x36, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x37, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x56, 0x0a, 0x10, 0x4a, 0x6f, 0x62, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x0a, 0x1c, 0x4c, 0x69, 0x73, + 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x6a, 0x6f, 0x62, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x22, 0x79, 0x0a, + 0x1b, 0x44, 0x75, 0x6d, 0x70, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 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, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, - 0x22, 0x48, 0x0a, 0x11, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3d, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x01, 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, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, - 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x22, 0x73, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 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, 0x74, 0x61, - 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 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, 0x03, 0x65, 0x6e, 0x64, - 0x22, 0xcf, 0x01, 0x0a, 0x22, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x0a, 0x1c, 0x44, 0x75, 0x6d, 0x70, + 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, + 0x1c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x30, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, + 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6a, + 0x6f, 0x62, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x22, 0x39, 0x0a, 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x1d, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 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, 0x32, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, + 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, + 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x63, + 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6a, + 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, + 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3c, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x42, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x22, 0x4d, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x42, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x56, 0x0a, + 0x20, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x25, 0x0a, 0x0e, 0x64, 0x61, - 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x41, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x23, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x03, 0x61, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 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, 0x25, 0x0a, - 0x0e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x54, 0x0a, 0x1e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x79, 0x0a, 0x1b, 0x52, 0x65, 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x22, 0x66, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x15, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, + 0x1c, 0x52, 0x65, 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0x7b, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x54, + 0x0a, 0x1e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x71, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 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, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x56, 0x0a, 0x14, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3f, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x65, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x87, + 0x02, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 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, 0x3d, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 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, 0x0b, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xbf, 0x02, 0x0a, 0x18, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x36, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x42, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x37, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x56, 0x0a, 0x10, 0x4a, 0x6f, + 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 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, 0x4a, 0x04, 0x08, 0x03, + 0x10, 0x04, 0x22, 0x48, 0x0a, 0x11, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x22, 0x9e, 0x01, 0x0a, + 0x10, 0x47, 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x01, 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, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x22, 0x73, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 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, + 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 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, 0x03, 0x65, + 0x6e, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x22, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 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, 0x25, 0x0a, 0x0e, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x23, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x4c, 0x0a, - 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x13, - 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x22, 0x8b, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x61, 0x74, 0x69, 0x6f, 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, + 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x22, 0x66, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0xc0, 0x01, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, + 0x4c, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3f, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xc0, - 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 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, 0x25, 0x0a, 0x0e, 0x64, - 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa2, 0x01, + 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0xbb, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 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, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x73, 0x0a, - 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x64, 0x65, 0x70, - 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x70, - 0x6c, 0x61, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, - 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 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, 0x04, 0x72, 0x75, 0x6e, 0x73, - 0x22, 0x20, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0xa3, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4a, - 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x98, 0x1f, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, - 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x77, 0x0a, 0x16, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, - 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x30, 0x01, 0x12, 0xb8, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, - 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3d, 0x22, 0x38, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x3a, 0x01, 0x2a, 0x12, - 0xba, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x12, 0x43, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x6a, 0x6f, - 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xc0, 0x01, 0x0a, - 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, - 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x2a, 0x43, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 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, 0x7d, - 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, - 0x99, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x53, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x12, 0xa9, 0x01, 0x0a, 0x14, - 0x44, 0x75, 0x6d, 0x70, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x75, 0x6d, 0x70, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, - 0x75, 0x6d, 0x70, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x64, 0x75, 0x6d, 0x70, 0x12, 0xa2, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2a, 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x77, 0x0a, 0x16, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x7a, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x0f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x01, - 0x2a, 0x12, 0xae, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2d, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x22, 0xc0, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 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, 0x25, 0x0a, + 0x0e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 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, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x19, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, + 0x73, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x64, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, + 0x65, 0x70, 0x6c, 0x61, 0x79, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, + 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 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, 0x04, 0x72, 0x75, + 0x6e, 0x73, 0x22, 0x20, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0xa3, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x05, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbf, 0x1e, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x07, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x77, 0x0a, 0x16, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x30, 0x01, 0x12, 0xb4, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, + 0x22, 0x34, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x3a, 0x01, 0x2a, 0x12, 0xb6, 0x01, 0x0a, 0x14, 0x52, 0x65, + 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x41, 0x12, 0x3f, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, + 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, + 0x2a, 0x3f, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, + 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 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, 0x3a, - 0x01, 0x2a, 0x12, 0x9b, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x12, 0xa5, 0x01, 0x0a, 0x14, 0x44, 0x75, + 0x6d, 0x70, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x44, 0x75, 0x6d, 0x70, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x75, 0x6d, + 0x70, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x30, 0x12, 0x2e, 0x2f, 0x76, 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, 0x64, 0x75, 0x6d, + 0x70, 0x12, 0x9e, 0x01, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x24, 0x2f, 0x76, 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, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2f, - 0x7b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, - 0x12, 0x6e, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x12, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, - 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0xa2, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x6f, 0x64, 0x70, + 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x12, 0x77, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, + 0x62, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x76, 0x0a, 0x0f, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x10, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x3a, 0x01, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x2d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x76, 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, 0x3a, 0x01, 0x2a, + 0x12, 0x97, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x22, 0x2f, 0x2f, 0x76, 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, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2f, 0x7b, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x0c, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x9e, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x12, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x26, 0x12, 0x24, 0x2f, 0x76, 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, 0x12, 0xa0, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x37, 0x22, 0x32, 0x2f, 0x76, 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, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x86, 0x01, 0x0a, 0x09, 0x4a, + 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x32, 0x12, 0x30, 0x2f, 0x76, 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, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0xb3, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 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, + 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 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, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x22, + 0x45, 0x2f, 0x76, 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, 0x12, 0xa4, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x3b, 0x22, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8a, 0x01, 0x0a, - 0x09, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x10, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 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, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 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, 0x54, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x22, 0x49, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, - 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x3a, 0x01, 0x2a, 0x12, 0x64, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, - 0x12, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x86, 0x01, 0x0a, 0x1b, 0x44, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x64, + 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x60, 0x0a, 0x09, 0x47, 0x65, 0x74, + 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, + 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x86, 0x01, 0x0a, 0x1b, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x30, 0x01, 0x12, 0xde, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x12, 0x58, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 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, 0x7d, 0x2f, - 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0xc0, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x63, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x22, 0x58, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 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, 0x7d, 0x2f, - 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xc7, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6a, 0x12, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x64, 0x61, 0x74, - 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x12, 0xc0, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5d, 0x1a, 0x58, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x64, 0x61, 0x74, - 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x3a, 0x01, 0x2a, 0x12, 0x95, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x72, - 0x79, 0x52, 0x75, 0x6e, 0x12, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 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, 0x65, 0x70, - 0x6c, 0x61, 0x79, 0x2d, 0x64, 0x72, 0x79, 0x2d, 0x72, 0x75, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x06, - 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x30, 0x01, 0x12, 0xda, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x56, 0x12, 0x54, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0xbc, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x5f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, 0x22, 0x54, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x01, 0x2a, + 0x12, 0xc3, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x66, + 0x12, 0x64, 0x2f, 0x76, 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, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x59, 0x1a, 0x54, 0x2f, 0x76, + 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, 0x7d, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, + 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x34, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 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, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x42, - 0x70, 0x0a, 0x16, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x42, 0x15, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x92, 0x41, 0x1c, 0x12, 0x05, 0x32, 0x03, 0x30, 0x2e, 0x31, 0x2a, 0x01, 0x01, 0x72, - 0x10, 0x0a, 0x0e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, + 0x38, 0x2f, 0x76, 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, 0x65, 0x70, 0x6c, 0x61, + 0x79, 0x2d, 0x64, 0x72, 0x79, 0x2d, 0x72, 0x75, 0x6e, 0x12, 0x7d, 0x0a, 0x06, 0x52, 0x65, 0x70, + 0x6c, 0x61, 0x79, 0x12, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x30, 0x2f, 0x76, 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, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x42, 0x70, 0x0a, 0x16, 0x69, 0x6f, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x42, 0x15, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x92, 0x41, 0x1c, 0x12, 0x05, + 0x32, 0x03, 0x30, 0x2e, 0x31, 0x2a, 0x01, 0x01, 0x72, 0x10, 0x0a, 0x0e, 0x4f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -5108,7 +5175,7 @@ func file_odpf_optimus_runtime_service_proto_rawDescGZIP() []byte { } var file_odpf_optimus_runtime_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_odpf_optimus_runtime_service_proto_msgTypes = make([]protoimpl.MessageInfo, 75) +var file_odpf_optimus_runtime_service_proto_msgTypes = make([]protoimpl.MessageInfo, 76) var file_odpf_optimus_runtime_service_proto_goTypes = []interface{}{ (InstanceSpec_Type)(0), // 0: odpf.optimus.InstanceSpec.Type (InstanceSpecData_Type)(0), // 1: odpf.optimus.InstanceSpecData.Type @@ -5124,187 +5191,190 @@ var file_odpf_optimus_runtime_service_proto_goTypes = []interface{}{ (*InstanceContext)(nil), // 11: odpf.optimus.InstanceContext (*JobStatus)(nil), // 12: odpf.optimus.JobStatus (*JobEvent)(nil), // 13: odpf.optimus.JobEvent - (*ResourceSpecification)(nil), // 14: odpf.optimus.ResourceSpecification - (*VersionRequest)(nil), // 15: odpf.optimus.VersionRequest - (*VersionResponse)(nil), // 16: odpf.optimus.VersionResponse - (*DeployJobSpecificationRequest)(nil), // 17: odpf.optimus.DeployJobSpecificationRequest - (*DeployJobSpecificationResponse)(nil), // 18: odpf.optimus.DeployJobSpecificationResponse - (*ListJobSpecificationRequest)(nil), // 19: odpf.optimus.ListJobSpecificationRequest - (*ListJobSpecificationResponse)(nil), // 20: odpf.optimus.ListJobSpecificationResponse - (*DumpJobSpecificationRequest)(nil), // 21: odpf.optimus.DumpJobSpecificationRequest - (*DumpJobSpecificationResponse)(nil), // 22: odpf.optimus.DumpJobSpecificationResponse - (*CheckJobSpecificationRequest)(nil), // 23: odpf.optimus.CheckJobSpecificationRequest - (*CheckJobSpecificationResponse)(nil), // 24: odpf.optimus.CheckJobSpecificationResponse - (*CheckJobSpecificationsRequest)(nil), // 25: odpf.optimus.CheckJobSpecificationsRequest - (*CheckJobSpecificationsResponse)(nil), // 26: odpf.optimus.CheckJobSpecificationsResponse - (*RegisterProjectRequest)(nil), // 27: odpf.optimus.RegisterProjectRequest - (*RegisterProjectResponse)(nil), // 28: odpf.optimus.RegisterProjectResponse - (*RegisterProjectNamespaceRequest)(nil), // 29: odpf.optimus.RegisterProjectNamespaceRequest - (*RegisterProjectNamespaceResponse)(nil), // 30: odpf.optimus.RegisterProjectNamespaceResponse - (*CreateJobSpecificationRequest)(nil), // 31: odpf.optimus.CreateJobSpecificationRequest - (*CreateJobSpecificationResponse)(nil), // 32: odpf.optimus.CreateJobSpecificationResponse - (*ReadJobSpecificationRequest)(nil), // 33: odpf.optimus.ReadJobSpecificationRequest - (*ReadJobSpecificationResponse)(nil), // 34: odpf.optimus.ReadJobSpecificationResponse - (*DeleteJobSpecificationRequest)(nil), // 35: odpf.optimus.DeleteJobSpecificationRequest - (*DeleteJobSpecificationResponse)(nil), // 36: odpf.optimus.DeleteJobSpecificationResponse - (*RegisterSecretRequest)(nil), // 37: odpf.optimus.RegisterSecretRequest - (*RegisterSecretResponse)(nil), // 38: odpf.optimus.RegisterSecretResponse - (*ListProjectsRequest)(nil), // 39: odpf.optimus.ListProjectsRequest - (*ListProjectsResponse)(nil), // 40: odpf.optimus.ListProjectsResponse - (*ListProjectNamespacesRequest)(nil), // 41: odpf.optimus.ListProjectNamespacesRequest - (*ListProjectNamespacesResponse)(nil), // 42: odpf.optimus.ListProjectNamespacesResponse - (*RegisterInstanceRequest)(nil), // 43: odpf.optimus.RegisterInstanceRequest - (*RegisterInstanceResponse)(nil), // 44: odpf.optimus.RegisterInstanceResponse - (*JobStatusRequest)(nil), // 45: odpf.optimus.JobStatusRequest - (*JobStatusResponse)(nil), // 46: odpf.optimus.JobStatusResponse - (*GetWindowRequest)(nil), // 47: odpf.optimus.GetWindowRequest - (*GetWindowResponse)(nil), // 48: odpf.optimus.GetWindowResponse - (*DeployResourceSpecificationRequest)(nil), // 49: odpf.optimus.DeployResourceSpecificationRequest - (*DeployResourceSpecificationResponse)(nil), // 50: odpf.optimus.DeployResourceSpecificationResponse - (*ListResourceSpecificationRequest)(nil), // 51: odpf.optimus.ListResourceSpecificationRequest - (*ListResourceSpecificationResponse)(nil), // 52: odpf.optimus.ListResourceSpecificationResponse - (*CreateResourceRequest)(nil), // 53: odpf.optimus.CreateResourceRequest - (*CreateResourceResponse)(nil), // 54: odpf.optimus.CreateResourceResponse - (*ReadResourceRequest)(nil), // 55: odpf.optimus.ReadResourceRequest - (*ReadResourceResponse)(nil), // 56: odpf.optimus.ReadResourceResponse - (*UpdateResourceRequest)(nil), // 57: odpf.optimus.UpdateResourceRequest - (*UpdateResourceResponse)(nil), // 58: odpf.optimus.UpdateResourceResponse - (*ReplayRequest)(nil), // 59: odpf.optimus.ReplayRequest - (*ReplayDryRunResponse)(nil), // 60: odpf.optimus.ReplayDryRunResponse - (*ReplayExecutionTreeNode)(nil), // 61: odpf.optimus.ReplayExecutionTreeNode - (*ReplayResponse)(nil), // 62: odpf.optimus.ReplayResponse - (*RegisterJobEventRequest)(nil), // 63: odpf.optimus.RegisterJobEventRequest - (*RegisterJobEventResponse)(nil), // 64: odpf.optimus.RegisterJobEventResponse - nil, // 65: odpf.optimus.ProjectSpecification.ConfigEntry - (*ProjectSpecification_ProjectSecret)(nil), // 66: odpf.optimus.ProjectSpecification.ProjectSecret - nil, // 67: odpf.optimus.NamespaceSpecification.ConfigEntry - nil, // 68: odpf.optimus.JobSpecification.AssetsEntry - nil, // 69: odpf.optimus.JobSpecification.LabelsEntry - (*JobSpecification_Behavior)(nil), // 70: odpf.optimus.JobSpecification.Behavior - (*JobSpecification_Behavior_Retry)(nil), // 71: odpf.optimus.JobSpecification.Behavior.Retry - (*JobSpecification_Behavior_Notifiers)(nil), // 72: odpf.optimus.JobSpecification.Behavior.Notifiers - nil, // 73: odpf.optimus.JobSpecification.Behavior.Notifiers.ConfigEntry - nil, // 74: odpf.optimus.InstanceContext.EnvsEntry - nil, // 75: odpf.optimus.InstanceContext.FilesEntry - nil, // 76: odpf.optimus.ResourceSpecification.AssetsEntry - nil, // 77: odpf.optimus.ResourceSpecification.LabelsEntry - (*timestamp.Timestamp)(nil), // 78: google.protobuf.Timestamp - (*_struct.Struct)(nil), // 79: google.protobuf.Struct - (*duration.Duration)(nil), // 80: google.protobuf.Duration + (*TaskWindow)(nil), // 14: odpf.optimus.TaskWindow + (*ResourceSpecification)(nil), // 15: odpf.optimus.ResourceSpecification + (*VersionRequest)(nil), // 16: odpf.optimus.VersionRequest + (*VersionResponse)(nil), // 17: odpf.optimus.VersionResponse + (*DeployJobSpecificationRequest)(nil), // 18: odpf.optimus.DeployJobSpecificationRequest + (*DeployJobSpecificationResponse)(nil), // 19: odpf.optimus.DeployJobSpecificationResponse + (*ListJobSpecificationRequest)(nil), // 20: odpf.optimus.ListJobSpecificationRequest + (*ListJobSpecificationResponse)(nil), // 21: odpf.optimus.ListJobSpecificationResponse + (*DumpJobSpecificationRequest)(nil), // 22: odpf.optimus.DumpJobSpecificationRequest + (*DumpJobSpecificationResponse)(nil), // 23: odpf.optimus.DumpJobSpecificationResponse + (*CheckJobSpecificationRequest)(nil), // 24: odpf.optimus.CheckJobSpecificationRequest + (*CheckJobSpecificationResponse)(nil), // 25: odpf.optimus.CheckJobSpecificationResponse + (*CheckJobSpecificationsRequest)(nil), // 26: odpf.optimus.CheckJobSpecificationsRequest + (*CheckJobSpecificationsResponse)(nil), // 27: odpf.optimus.CheckJobSpecificationsResponse + (*RegisterProjectRequest)(nil), // 28: odpf.optimus.RegisterProjectRequest + (*RegisterProjectResponse)(nil), // 29: odpf.optimus.RegisterProjectResponse + (*RegisterProjectNamespaceRequest)(nil), // 30: odpf.optimus.RegisterProjectNamespaceRequest + (*RegisterProjectNamespaceResponse)(nil), // 31: odpf.optimus.RegisterProjectNamespaceResponse + (*CreateJobSpecificationRequest)(nil), // 32: odpf.optimus.CreateJobSpecificationRequest + (*CreateJobSpecificationResponse)(nil), // 33: odpf.optimus.CreateJobSpecificationResponse + (*ReadJobSpecificationRequest)(nil), // 34: odpf.optimus.ReadJobSpecificationRequest + (*ReadJobSpecificationResponse)(nil), // 35: odpf.optimus.ReadJobSpecificationResponse + (*DeleteJobSpecificationRequest)(nil), // 36: odpf.optimus.DeleteJobSpecificationRequest + (*DeleteJobSpecificationResponse)(nil), // 37: odpf.optimus.DeleteJobSpecificationResponse + (*RegisterSecretRequest)(nil), // 38: odpf.optimus.RegisterSecretRequest + (*RegisterSecretResponse)(nil), // 39: odpf.optimus.RegisterSecretResponse + (*ListProjectsRequest)(nil), // 40: odpf.optimus.ListProjectsRequest + (*ListProjectsResponse)(nil), // 41: odpf.optimus.ListProjectsResponse + (*ListProjectNamespacesRequest)(nil), // 42: odpf.optimus.ListProjectNamespacesRequest + (*ListProjectNamespacesResponse)(nil), // 43: odpf.optimus.ListProjectNamespacesResponse + (*RegisterInstanceRequest)(nil), // 44: odpf.optimus.RegisterInstanceRequest + (*RegisterInstanceResponse)(nil), // 45: odpf.optimus.RegisterInstanceResponse + (*JobStatusRequest)(nil), // 46: odpf.optimus.JobStatusRequest + (*JobStatusResponse)(nil), // 47: odpf.optimus.JobStatusResponse + (*GetWindowRequest)(nil), // 48: odpf.optimus.GetWindowRequest + (*GetWindowResponse)(nil), // 49: odpf.optimus.GetWindowResponse + (*DeployResourceSpecificationRequest)(nil), // 50: odpf.optimus.DeployResourceSpecificationRequest + (*DeployResourceSpecificationResponse)(nil), // 51: odpf.optimus.DeployResourceSpecificationResponse + (*ListResourceSpecificationRequest)(nil), // 52: odpf.optimus.ListResourceSpecificationRequest + (*ListResourceSpecificationResponse)(nil), // 53: odpf.optimus.ListResourceSpecificationResponse + (*CreateResourceRequest)(nil), // 54: odpf.optimus.CreateResourceRequest + (*CreateResourceResponse)(nil), // 55: odpf.optimus.CreateResourceResponse + (*ReadResourceRequest)(nil), // 56: odpf.optimus.ReadResourceRequest + (*ReadResourceResponse)(nil), // 57: odpf.optimus.ReadResourceResponse + (*UpdateResourceRequest)(nil), // 58: odpf.optimus.UpdateResourceRequest + (*UpdateResourceResponse)(nil), // 59: odpf.optimus.UpdateResourceResponse + (*ReplayRequest)(nil), // 60: odpf.optimus.ReplayRequest + (*ReplayDryRunResponse)(nil), // 61: odpf.optimus.ReplayDryRunResponse + (*ReplayExecutionTreeNode)(nil), // 62: odpf.optimus.ReplayExecutionTreeNode + (*ReplayResponse)(nil), // 63: odpf.optimus.ReplayResponse + (*RegisterJobEventRequest)(nil), // 64: odpf.optimus.RegisterJobEventRequest + (*RegisterJobEventResponse)(nil), // 65: odpf.optimus.RegisterJobEventResponse + nil, // 66: odpf.optimus.ProjectSpecification.ConfigEntry + (*ProjectSpecification_ProjectSecret)(nil), // 67: odpf.optimus.ProjectSpecification.ProjectSecret + nil, // 68: odpf.optimus.NamespaceSpecification.ConfigEntry + nil, // 69: odpf.optimus.JobSpecification.AssetsEntry + nil, // 70: odpf.optimus.JobSpecification.LabelsEntry + (*JobSpecification_Behavior)(nil), // 71: odpf.optimus.JobSpecification.Behavior + (*JobSpecification_Behavior_Retry)(nil), // 72: odpf.optimus.JobSpecification.Behavior.Retry + (*JobSpecification_Behavior_Notifiers)(nil), // 73: odpf.optimus.JobSpecification.Behavior.Notifiers + nil, // 74: odpf.optimus.JobSpecification.Behavior.Notifiers.ConfigEntry + nil, // 75: odpf.optimus.InstanceContext.EnvsEntry + nil, // 76: odpf.optimus.InstanceContext.FilesEntry + nil, // 77: odpf.optimus.ResourceSpecification.AssetsEntry + nil, // 78: odpf.optimus.ResourceSpecification.LabelsEntry + (*timestamp.Timestamp)(nil), // 79: google.protobuf.Timestamp + (*_struct.Struct)(nil), // 80: google.protobuf.Struct + (*duration.Duration)(nil), // 81: google.protobuf.Duration } var file_odpf_optimus_runtime_service_proto_depIdxs = []int32{ - 65, // 0: odpf.optimus.ProjectSpecification.config:type_name -> odpf.optimus.ProjectSpecification.ConfigEntry - 66, // 1: odpf.optimus.ProjectSpecification.secrets:type_name -> odpf.optimus.ProjectSpecification.ProjectSecret - 67, // 2: odpf.optimus.NamespaceSpecification.config:type_name -> odpf.optimus.NamespaceSpecification.ConfigEntry + 66, // 0: odpf.optimus.ProjectSpecification.config:type_name -> odpf.optimus.ProjectSpecification.ConfigEntry + 67, // 1: odpf.optimus.ProjectSpecification.secrets:type_name -> odpf.optimus.ProjectSpecification.ProjectSecret + 68, // 2: odpf.optimus.NamespaceSpecification.config:type_name -> odpf.optimus.NamespaceSpecification.ConfigEntry 7, // 3: odpf.optimus.JobSpecHook.config:type_name -> odpf.optimus.JobConfigItem 7, // 4: odpf.optimus.JobSpecification.config:type_name -> odpf.optimus.JobConfigItem 8, // 5: odpf.optimus.JobSpecification.dependencies:type_name -> odpf.optimus.JobDependency - 68, // 6: odpf.optimus.JobSpecification.assets:type_name -> odpf.optimus.JobSpecification.AssetsEntry + 69, // 6: odpf.optimus.JobSpecification.assets:type_name -> odpf.optimus.JobSpecification.AssetsEntry 5, // 7: odpf.optimus.JobSpecification.hooks:type_name -> odpf.optimus.JobSpecHook - 69, // 8: odpf.optimus.JobSpecification.labels:type_name -> odpf.optimus.JobSpecification.LabelsEntry - 70, // 9: odpf.optimus.JobSpecification.behavior:type_name -> odpf.optimus.JobSpecification.Behavior - 78, // 10: odpf.optimus.InstanceSpec.scheduled_at:type_name -> google.protobuf.Timestamp + 70, // 8: odpf.optimus.JobSpecification.labels:type_name -> odpf.optimus.JobSpecification.LabelsEntry + 71, // 9: odpf.optimus.JobSpecification.behavior:type_name -> odpf.optimus.JobSpecification.Behavior + 79, // 10: odpf.optimus.InstanceSpec.scheduled_at:type_name -> google.protobuf.Timestamp 10, // 11: odpf.optimus.InstanceSpec.data:type_name -> odpf.optimus.InstanceSpecData 1, // 12: odpf.optimus.InstanceSpecData.type:type_name -> odpf.optimus.InstanceSpecData.Type - 74, // 13: odpf.optimus.InstanceContext.envs:type_name -> odpf.optimus.InstanceContext.EnvsEntry - 75, // 14: odpf.optimus.InstanceContext.files:type_name -> odpf.optimus.InstanceContext.FilesEntry - 78, // 15: odpf.optimus.JobStatus.scheduled_at:type_name -> google.protobuf.Timestamp + 75, // 13: odpf.optimus.InstanceContext.envs:type_name -> odpf.optimus.InstanceContext.EnvsEntry + 76, // 14: odpf.optimus.InstanceContext.files:type_name -> odpf.optimus.InstanceContext.FilesEntry + 79, // 15: odpf.optimus.JobStatus.scheduled_at:type_name -> google.protobuf.Timestamp 2, // 16: odpf.optimus.JobEvent.type:type_name -> odpf.optimus.JobEvent.Type - 79, // 17: odpf.optimus.JobEvent.value:type_name -> google.protobuf.Struct - 79, // 18: odpf.optimus.ResourceSpecification.spec:type_name -> google.protobuf.Struct - 76, // 19: odpf.optimus.ResourceSpecification.assets:type_name -> odpf.optimus.ResourceSpecification.AssetsEntry - 77, // 20: odpf.optimus.ResourceSpecification.labels:type_name -> odpf.optimus.ResourceSpecification.LabelsEntry - 6, // 21: odpf.optimus.DeployJobSpecificationRequest.jobs:type_name -> odpf.optimus.JobSpecification - 6, // 22: odpf.optimus.ListJobSpecificationResponse.jobs:type_name -> odpf.optimus.JobSpecification - 6, // 23: odpf.optimus.CheckJobSpecificationRequest.job:type_name -> odpf.optimus.JobSpecification - 6, // 24: odpf.optimus.CheckJobSpecificationsRequest.jobs:type_name -> odpf.optimus.JobSpecification - 3, // 25: odpf.optimus.RegisterProjectRequest.project:type_name -> odpf.optimus.ProjectSpecification - 4, // 26: odpf.optimus.RegisterProjectRequest.namespace:type_name -> odpf.optimus.NamespaceSpecification - 4, // 27: odpf.optimus.RegisterProjectNamespaceRequest.namespace:type_name -> odpf.optimus.NamespaceSpecification - 6, // 28: odpf.optimus.CreateJobSpecificationRequest.spec:type_name -> odpf.optimus.JobSpecification - 6, // 29: odpf.optimus.ReadJobSpecificationResponse.spec:type_name -> odpf.optimus.JobSpecification - 3, // 30: odpf.optimus.ListProjectsResponse.projects:type_name -> odpf.optimus.ProjectSpecification - 4, // 31: odpf.optimus.ListProjectNamespacesResponse.namespaces:type_name -> odpf.optimus.NamespaceSpecification - 78, // 32: odpf.optimus.RegisterInstanceRequest.scheduled_at:type_name -> google.protobuf.Timestamp - 0, // 33: odpf.optimus.RegisterInstanceRequest.instance_type:type_name -> odpf.optimus.InstanceSpec.Type - 3, // 34: odpf.optimus.RegisterInstanceResponse.project:type_name -> odpf.optimus.ProjectSpecification - 6, // 35: odpf.optimus.RegisterInstanceResponse.job:type_name -> odpf.optimus.JobSpecification - 9, // 36: odpf.optimus.RegisterInstanceResponse.instance:type_name -> odpf.optimus.InstanceSpec - 4, // 37: odpf.optimus.RegisterInstanceResponse.namespace:type_name -> odpf.optimus.NamespaceSpecification - 11, // 38: odpf.optimus.RegisterInstanceResponse.context:type_name -> odpf.optimus.InstanceContext - 12, // 39: odpf.optimus.JobStatusResponse.statuses:type_name -> odpf.optimus.JobStatus - 78, // 40: odpf.optimus.GetWindowRequest.scheduled_at:type_name -> google.protobuf.Timestamp - 78, // 41: odpf.optimus.GetWindowResponse.start:type_name -> google.protobuf.Timestamp - 78, // 42: odpf.optimus.GetWindowResponse.end:type_name -> google.protobuf.Timestamp - 14, // 43: odpf.optimus.DeployResourceSpecificationRequest.resources:type_name -> odpf.optimus.ResourceSpecification - 14, // 44: odpf.optimus.ListResourceSpecificationResponse.resources:type_name -> odpf.optimus.ResourceSpecification - 14, // 45: odpf.optimus.CreateResourceRequest.resource:type_name -> odpf.optimus.ResourceSpecification - 14, // 46: odpf.optimus.ReadResourceResponse.resource:type_name -> odpf.optimus.ResourceSpecification - 14, // 47: odpf.optimus.UpdateResourceRequest.resource:type_name -> odpf.optimus.ResourceSpecification - 61, // 48: odpf.optimus.ReplayDryRunResponse.response:type_name -> odpf.optimus.ReplayExecutionTreeNode - 61, // 49: odpf.optimus.ReplayExecutionTreeNode.dependents:type_name -> odpf.optimus.ReplayExecutionTreeNode - 78, // 50: odpf.optimus.ReplayExecutionTreeNode.runs:type_name -> google.protobuf.Timestamp - 13, // 51: odpf.optimus.RegisterJobEventRequest.event:type_name -> odpf.optimus.JobEvent - 71, // 52: odpf.optimus.JobSpecification.Behavior.retry:type_name -> odpf.optimus.JobSpecification.Behavior.Retry - 72, // 53: odpf.optimus.JobSpecification.Behavior.notify:type_name -> odpf.optimus.JobSpecification.Behavior.Notifiers - 80, // 54: odpf.optimus.JobSpecification.Behavior.Retry.delay:type_name -> google.protobuf.Duration - 2, // 55: odpf.optimus.JobSpecification.Behavior.Notifiers.on:type_name -> odpf.optimus.JobEvent.Type - 73, // 56: odpf.optimus.JobSpecification.Behavior.Notifiers.config:type_name -> odpf.optimus.JobSpecification.Behavior.Notifiers.ConfigEntry - 15, // 57: odpf.optimus.RuntimeService.Version:input_type -> odpf.optimus.VersionRequest - 17, // 58: odpf.optimus.RuntimeService.DeployJobSpecification:input_type -> odpf.optimus.DeployJobSpecificationRequest - 31, // 59: odpf.optimus.RuntimeService.CreateJobSpecification:input_type -> odpf.optimus.CreateJobSpecificationRequest - 33, // 60: odpf.optimus.RuntimeService.ReadJobSpecification:input_type -> odpf.optimus.ReadJobSpecificationRequest - 35, // 61: odpf.optimus.RuntimeService.DeleteJobSpecification:input_type -> odpf.optimus.DeleteJobSpecificationRequest - 19, // 62: odpf.optimus.RuntimeService.ListJobSpecification:input_type -> odpf.optimus.ListJobSpecificationRequest - 21, // 63: odpf.optimus.RuntimeService.DumpJobSpecification:input_type -> odpf.optimus.DumpJobSpecificationRequest - 23, // 64: odpf.optimus.RuntimeService.CheckJobSpecification:input_type -> odpf.optimus.CheckJobSpecificationRequest - 25, // 65: odpf.optimus.RuntimeService.CheckJobSpecifications:input_type -> odpf.optimus.CheckJobSpecificationsRequest - 27, // 66: odpf.optimus.RuntimeService.RegisterProject:input_type -> odpf.optimus.RegisterProjectRequest - 29, // 67: odpf.optimus.RuntimeService.RegisterProjectNamespace:input_type -> odpf.optimus.RegisterProjectNamespaceRequest - 37, // 68: odpf.optimus.RuntimeService.RegisterSecret:input_type -> odpf.optimus.RegisterSecretRequest - 39, // 69: odpf.optimus.RuntimeService.ListProjects:input_type -> odpf.optimus.ListProjectsRequest - 41, // 70: odpf.optimus.RuntimeService.ListProjectNamespaces:input_type -> odpf.optimus.ListProjectNamespacesRequest - 43, // 71: odpf.optimus.RuntimeService.RegisterInstance:input_type -> odpf.optimus.RegisterInstanceRequest - 45, // 72: odpf.optimus.RuntimeService.JobStatus:input_type -> odpf.optimus.JobStatusRequest - 63, // 73: odpf.optimus.RuntimeService.RegisterJobEvent:input_type -> odpf.optimus.RegisterJobEventRequest - 47, // 74: odpf.optimus.RuntimeService.GetWindow:input_type -> odpf.optimus.GetWindowRequest - 49, // 75: odpf.optimus.RuntimeService.DeployResourceSpecification:input_type -> odpf.optimus.DeployResourceSpecificationRequest - 51, // 76: odpf.optimus.RuntimeService.ListResourceSpecification:input_type -> odpf.optimus.ListResourceSpecificationRequest - 53, // 77: odpf.optimus.RuntimeService.CreateResource:input_type -> odpf.optimus.CreateResourceRequest - 55, // 78: odpf.optimus.RuntimeService.ReadResource:input_type -> odpf.optimus.ReadResourceRequest - 57, // 79: odpf.optimus.RuntimeService.UpdateResource:input_type -> odpf.optimus.UpdateResourceRequest - 59, // 80: odpf.optimus.RuntimeService.ReplayDryRun:input_type -> odpf.optimus.ReplayRequest - 59, // 81: odpf.optimus.RuntimeService.Replay:input_type -> odpf.optimus.ReplayRequest - 16, // 82: odpf.optimus.RuntimeService.Version:output_type -> odpf.optimus.VersionResponse - 18, // 83: odpf.optimus.RuntimeService.DeployJobSpecification:output_type -> odpf.optimus.DeployJobSpecificationResponse - 32, // 84: odpf.optimus.RuntimeService.CreateJobSpecification:output_type -> odpf.optimus.CreateJobSpecificationResponse - 34, // 85: odpf.optimus.RuntimeService.ReadJobSpecification:output_type -> odpf.optimus.ReadJobSpecificationResponse - 36, // 86: odpf.optimus.RuntimeService.DeleteJobSpecification:output_type -> odpf.optimus.DeleteJobSpecificationResponse - 20, // 87: odpf.optimus.RuntimeService.ListJobSpecification:output_type -> odpf.optimus.ListJobSpecificationResponse - 22, // 88: odpf.optimus.RuntimeService.DumpJobSpecification:output_type -> odpf.optimus.DumpJobSpecificationResponse - 24, // 89: odpf.optimus.RuntimeService.CheckJobSpecification:output_type -> odpf.optimus.CheckJobSpecificationResponse - 26, // 90: odpf.optimus.RuntimeService.CheckJobSpecifications:output_type -> odpf.optimus.CheckJobSpecificationsResponse - 28, // 91: odpf.optimus.RuntimeService.RegisterProject:output_type -> odpf.optimus.RegisterProjectResponse - 30, // 92: odpf.optimus.RuntimeService.RegisterProjectNamespace:output_type -> odpf.optimus.RegisterProjectNamespaceResponse - 38, // 93: odpf.optimus.RuntimeService.RegisterSecret:output_type -> odpf.optimus.RegisterSecretResponse - 40, // 94: odpf.optimus.RuntimeService.ListProjects:output_type -> odpf.optimus.ListProjectsResponse - 42, // 95: odpf.optimus.RuntimeService.ListProjectNamespaces:output_type -> odpf.optimus.ListProjectNamespacesResponse - 44, // 96: odpf.optimus.RuntimeService.RegisterInstance:output_type -> odpf.optimus.RegisterInstanceResponse - 46, // 97: odpf.optimus.RuntimeService.JobStatus:output_type -> odpf.optimus.JobStatusResponse - 64, // 98: odpf.optimus.RuntimeService.RegisterJobEvent:output_type -> odpf.optimus.RegisterJobEventResponse - 48, // 99: odpf.optimus.RuntimeService.GetWindow:output_type -> odpf.optimus.GetWindowResponse - 50, // 100: odpf.optimus.RuntimeService.DeployResourceSpecification:output_type -> odpf.optimus.DeployResourceSpecificationResponse - 52, // 101: odpf.optimus.RuntimeService.ListResourceSpecification:output_type -> odpf.optimus.ListResourceSpecificationResponse - 54, // 102: odpf.optimus.RuntimeService.CreateResource:output_type -> odpf.optimus.CreateResourceResponse - 56, // 103: odpf.optimus.RuntimeService.ReadResource:output_type -> odpf.optimus.ReadResourceResponse - 58, // 104: odpf.optimus.RuntimeService.UpdateResource:output_type -> odpf.optimus.UpdateResourceResponse - 60, // 105: odpf.optimus.RuntimeService.ReplayDryRun:output_type -> odpf.optimus.ReplayDryRunResponse - 62, // 106: odpf.optimus.RuntimeService.Replay:output_type -> odpf.optimus.ReplayResponse - 82, // [82:107] is the sub-list for method output_type - 57, // [57:82] is the sub-list for method input_type - 57, // [57:57] is the sub-list for extension type_name - 57, // [57:57] is the sub-list for extension extendee - 0, // [0:57] is the sub-list for field type_name + 80, // 17: odpf.optimus.JobEvent.value:type_name -> google.protobuf.Struct + 81, // 18: odpf.optimus.TaskWindow.size:type_name -> google.protobuf.Duration + 81, // 19: odpf.optimus.TaskWindow.offset:type_name -> google.protobuf.Duration + 80, // 20: odpf.optimus.ResourceSpecification.spec:type_name -> google.protobuf.Struct + 77, // 21: odpf.optimus.ResourceSpecification.assets:type_name -> odpf.optimus.ResourceSpecification.AssetsEntry + 78, // 22: odpf.optimus.ResourceSpecification.labels:type_name -> odpf.optimus.ResourceSpecification.LabelsEntry + 6, // 23: odpf.optimus.DeployJobSpecificationRequest.jobs:type_name -> odpf.optimus.JobSpecification + 6, // 24: odpf.optimus.ListJobSpecificationResponse.jobs:type_name -> odpf.optimus.JobSpecification + 6, // 25: odpf.optimus.CheckJobSpecificationRequest.job:type_name -> odpf.optimus.JobSpecification + 6, // 26: odpf.optimus.CheckJobSpecificationsRequest.jobs:type_name -> odpf.optimus.JobSpecification + 3, // 27: odpf.optimus.RegisterProjectRequest.project:type_name -> odpf.optimus.ProjectSpecification + 4, // 28: odpf.optimus.RegisterProjectRequest.namespace:type_name -> odpf.optimus.NamespaceSpecification + 4, // 29: odpf.optimus.RegisterProjectNamespaceRequest.namespace:type_name -> odpf.optimus.NamespaceSpecification + 6, // 30: odpf.optimus.CreateJobSpecificationRequest.spec:type_name -> odpf.optimus.JobSpecification + 6, // 31: odpf.optimus.ReadJobSpecificationResponse.spec:type_name -> odpf.optimus.JobSpecification + 3, // 32: odpf.optimus.ListProjectsResponse.projects:type_name -> odpf.optimus.ProjectSpecification + 4, // 33: odpf.optimus.ListProjectNamespacesResponse.namespaces:type_name -> odpf.optimus.NamespaceSpecification + 79, // 34: odpf.optimus.RegisterInstanceRequest.scheduled_at:type_name -> google.protobuf.Timestamp + 0, // 35: odpf.optimus.RegisterInstanceRequest.instance_type:type_name -> odpf.optimus.InstanceSpec.Type + 3, // 36: odpf.optimus.RegisterInstanceResponse.project:type_name -> odpf.optimus.ProjectSpecification + 6, // 37: odpf.optimus.RegisterInstanceResponse.job:type_name -> odpf.optimus.JobSpecification + 9, // 38: odpf.optimus.RegisterInstanceResponse.instance:type_name -> odpf.optimus.InstanceSpec + 4, // 39: odpf.optimus.RegisterInstanceResponse.namespace:type_name -> odpf.optimus.NamespaceSpecification + 11, // 40: odpf.optimus.RegisterInstanceResponse.context:type_name -> odpf.optimus.InstanceContext + 12, // 41: odpf.optimus.JobStatusResponse.statuses:type_name -> odpf.optimus.JobStatus + 79, // 42: odpf.optimus.GetWindowRequest.scheduled_at:type_name -> google.protobuf.Timestamp + 79, // 43: odpf.optimus.GetWindowResponse.start:type_name -> google.protobuf.Timestamp + 79, // 44: odpf.optimus.GetWindowResponse.end:type_name -> google.protobuf.Timestamp + 15, // 45: odpf.optimus.DeployResourceSpecificationRequest.resources:type_name -> odpf.optimus.ResourceSpecification + 15, // 46: odpf.optimus.ListResourceSpecificationResponse.resources:type_name -> odpf.optimus.ResourceSpecification + 15, // 47: odpf.optimus.CreateResourceRequest.resource:type_name -> odpf.optimus.ResourceSpecification + 15, // 48: odpf.optimus.ReadResourceResponse.resource:type_name -> odpf.optimus.ResourceSpecification + 15, // 49: odpf.optimus.UpdateResourceRequest.resource:type_name -> odpf.optimus.ResourceSpecification + 62, // 50: odpf.optimus.ReplayDryRunResponse.response:type_name -> odpf.optimus.ReplayExecutionTreeNode + 62, // 51: odpf.optimus.ReplayExecutionTreeNode.dependents:type_name -> odpf.optimus.ReplayExecutionTreeNode + 79, // 52: odpf.optimus.ReplayExecutionTreeNode.runs:type_name -> google.protobuf.Timestamp + 13, // 53: odpf.optimus.RegisterJobEventRequest.event:type_name -> odpf.optimus.JobEvent + 72, // 54: odpf.optimus.JobSpecification.Behavior.retry:type_name -> odpf.optimus.JobSpecification.Behavior.Retry + 73, // 55: odpf.optimus.JobSpecification.Behavior.notify:type_name -> odpf.optimus.JobSpecification.Behavior.Notifiers + 81, // 56: odpf.optimus.JobSpecification.Behavior.Retry.delay:type_name -> google.protobuf.Duration + 2, // 57: odpf.optimus.JobSpecification.Behavior.Notifiers.on:type_name -> odpf.optimus.JobEvent.Type + 74, // 58: odpf.optimus.JobSpecification.Behavior.Notifiers.config:type_name -> odpf.optimus.JobSpecification.Behavior.Notifiers.ConfigEntry + 16, // 59: odpf.optimus.RuntimeService.Version:input_type -> odpf.optimus.VersionRequest + 18, // 60: odpf.optimus.RuntimeService.DeployJobSpecification:input_type -> odpf.optimus.DeployJobSpecificationRequest + 32, // 61: odpf.optimus.RuntimeService.CreateJobSpecification:input_type -> odpf.optimus.CreateJobSpecificationRequest + 34, // 62: odpf.optimus.RuntimeService.ReadJobSpecification:input_type -> odpf.optimus.ReadJobSpecificationRequest + 36, // 63: odpf.optimus.RuntimeService.DeleteJobSpecification:input_type -> odpf.optimus.DeleteJobSpecificationRequest + 20, // 64: odpf.optimus.RuntimeService.ListJobSpecification:input_type -> odpf.optimus.ListJobSpecificationRequest + 22, // 65: odpf.optimus.RuntimeService.DumpJobSpecification:input_type -> odpf.optimus.DumpJobSpecificationRequest + 24, // 66: odpf.optimus.RuntimeService.CheckJobSpecification:input_type -> odpf.optimus.CheckJobSpecificationRequest + 26, // 67: odpf.optimus.RuntimeService.CheckJobSpecifications:input_type -> odpf.optimus.CheckJobSpecificationsRequest + 28, // 68: odpf.optimus.RuntimeService.RegisterProject:input_type -> odpf.optimus.RegisterProjectRequest + 30, // 69: odpf.optimus.RuntimeService.RegisterProjectNamespace:input_type -> odpf.optimus.RegisterProjectNamespaceRequest + 38, // 70: odpf.optimus.RuntimeService.RegisterSecret:input_type -> odpf.optimus.RegisterSecretRequest + 40, // 71: odpf.optimus.RuntimeService.ListProjects:input_type -> odpf.optimus.ListProjectsRequest + 42, // 72: odpf.optimus.RuntimeService.ListProjectNamespaces:input_type -> odpf.optimus.ListProjectNamespacesRequest + 44, // 73: odpf.optimus.RuntimeService.RegisterInstance:input_type -> odpf.optimus.RegisterInstanceRequest + 46, // 74: odpf.optimus.RuntimeService.JobStatus:input_type -> odpf.optimus.JobStatusRequest + 64, // 75: odpf.optimus.RuntimeService.RegisterJobEvent:input_type -> odpf.optimus.RegisterJobEventRequest + 48, // 76: odpf.optimus.RuntimeService.GetWindow:input_type -> odpf.optimus.GetWindowRequest + 50, // 77: odpf.optimus.RuntimeService.DeployResourceSpecification:input_type -> odpf.optimus.DeployResourceSpecificationRequest + 52, // 78: odpf.optimus.RuntimeService.ListResourceSpecification:input_type -> odpf.optimus.ListResourceSpecificationRequest + 54, // 79: odpf.optimus.RuntimeService.CreateResource:input_type -> odpf.optimus.CreateResourceRequest + 56, // 80: odpf.optimus.RuntimeService.ReadResource:input_type -> odpf.optimus.ReadResourceRequest + 58, // 81: odpf.optimus.RuntimeService.UpdateResource:input_type -> odpf.optimus.UpdateResourceRequest + 60, // 82: odpf.optimus.RuntimeService.ReplayDryRun:input_type -> odpf.optimus.ReplayRequest + 60, // 83: odpf.optimus.RuntimeService.Replay:input_type -> odpf.optimus.ReplayRequest + 17, // 84: odpf.optimus.RuntimeService.Version:output_type -> odpf.optimus.VersionResponse + 19, // 85: odpf.optimus.RuntimeService.DeployJobSpecification:output_type -> odpf.optimus.DeployJobSpecificationResponse + 33, // 86: odpf.optimus.RuntimeService.CreateJobSpecification:output_type -> odpf.optimus.CreateJobSpecificationResponse + 35, // 87: odpf.optimus.RuntimeService.ReadJobSpecification:output_type -> odpf.optimus.ReadJobSpecificationResponse + 37, // 88: odpf.optimus.RuntimeService.DeleteJobSpecification:output_type -> odpf.optimus.DeleteJobSpecificationResponse + 21, // 89: odpf.optimus.RuntimeService.ListJobSpecification:output_type -> odpf.optimus.ListJobSpecificationResponse + 23, // 90: odpf.optimus.RuntimeService.DumpJobSpecification:output_type -> odpf.optimus.DumpJobSpecificationResponse + 25, // 91: odpf.optimus.RuntimeService.CheckJobSpecification:output_type -> odpf.optimus.CheckJobSpecificationResponse + 27, // 92: odpf.optimus.RuntimeService.CheckJobSpecifications:output_type -> odpf.optimus.CheckJobSpecificationsResponse + 29, // 93: odpf.optimus.RuntimeService.RegisterProject:output_type -> odpf.optimus.RegisterProjectResponse + 31, // 94: odpf.optimus.RuntimeService.RegisterProjectNamespace:output_type -> odpf.optimus.RegisterProjectNamespaceResponse + 39, // 95: odpf.optimus.RuntimeService.RegisterSecret:output_type -> odpf.optimus.RegisterSecretResponse + 41, // 96: odpf.optimus.RuntimeService.ListProjects:output_type -> odpf.optimus.ListProjectsResponse + 43, // 97: odpf.optimus.RuntimeService.ListProjectNamespaces:output_type -> odpf.optimus.ListProjectNamespacesResponse + 45, // 98: odpf.optimus.RuntimeService.RegisterInstance:output_type -> odpf.optimus.RegisterInstanceResponse + 47, // 99: odpf.optimus.RuntimeService.JobStatus:output_type -> odpf.optimus.JobStatusResponse + 65, // 100: odpf.optimus.RuntimeService.RegisterJobEvent:output_type -> odpf.optimus.RegisterJobEventResponse + 49, // 101: odpf.optimus.RuntimeService.GetWindow:output_type -> odpf.optimus.GetWindowResponse + 51, // 102: odpf.optimus.RuntimeService.DeployResourceSpecification:output_type -> odpf.optimus.DeployResourceSpecificationResponse + 53, // 103: odpf.optimus.RuntimeService.ListResourceSpecification:output_type -> odpf.optimus.ListResourceSpecificationResponse + 55, // 104: odpf.optimus.RuntimeService.CreateResource:output_type -> odpf.optimus.CreateResourceResponse + 57, // 105: odpf.optimus.RuntimeService.ReadResource:output_type -> odpf.optimus.ReadResourceResponse + 59, // 106: odpf.optimus.RuntimeService.UpdateResource:output_type -> odpf.optimus.UpdateResourceResponse + 61, // 107: odpf.optimus.RuntimeService.ReplayDryRun:output_type -> odpf.optimus.ReplayDryRunResponse + 63, // 108: odpf.optimus.RuntimeService.Replay:output_type -> odpf.optimus.ReplayResponse + 84, // [84:109] is the sub-list for method output_type + 59, // [59:84] is the sub-list for method input_type + 59, // [59:59] is the sub-list for extension type_name + 59, // [59:59] is the sub-list for extension extendee + 0, // [0:59] is the sub-list for field type_name } func init() { file_odpf_optimus_runtime_service_proto_init() } @@ -5446,7 +5516,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceSpecification); i { + switch v := v.(*TaskWindow); i { case 0: return &v.state case 1: @@ -5458,7 +5528,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionRequest); i { + switch v := v.(*ResourceSpecification); i { case 0: return &v.state case 1: @@ -5470,7 +5540,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionResponse); i { + switch v := v.(*VersionRequest); i { case 0: return &v.state case 1: @@ -5482,7 +5552,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployJobSpecificationRequest); i { + switch v := v.(*VersionResponse); i { case 0: return &v.state case 1: @@ -5494,7 +5564,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployJobSpecificationResponse); i { + switch v := v.(*DeployJobSpecificationRequest); i { case 0: return &v.state case 1: @@ -5506,7 +5576,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListJobSpecificationRequest); i { + switch v := v.(*DeployJobSpecificationResponse); i { case 0: return &v.state case 1: @@ -5518,7 +5588,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListJobSpecificationResponse); i { + switch v := v.(*ListJobSpecificationRequest); i { case 0: return &v.state case 1: @@ -5530,7 +5600,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DumpJobSpecificationRequest); i { + switch v := v.(*ListJobSpecificationResponse); i { case 0: return &v.state case 1: @@ -5542,7 +5612,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DumpJobSpecificationResponse); i { + switch v := v.(*DumpJobSpecificationRequest); i { case 0: return &v.state case 1: @@ -5554,7 +5624,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckJobSpecificationRequest); i { + switch v := v.(*DumpJobSpecificationResponse); i { case 0: return &v.state case 1: @@ -5566,7 +5636,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckJobSpecificationResponse); i { + switch v := v.(*CheckJobSpecificationRequest); i { case 0: return &v.state case 1: @@ -5578,7 +5648,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckJobSpecificationsRequest); i { + switch v := v.(*CheckJobSpecificationResponse); i { case 0: return &v.state case 1: @@ -5590,7 +5660,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckJobSpecificationsResponse); i { + switch v := v.(*CheckJobSpecificationsRequest); i { case 0: return &v.state case 1: @@ -5602,7 +5672,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterProjectRequest); i { + switch v := v.(*CheckJobSpecificationsResponse); i { case 0: return &v.state case 1: @@ -5614,7 +5684,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterProjectResponse); i { + switch v := v.(*RegisterProjectRequest); i { case 0: return &v.state case 1: @@ -5626,7 +5696,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterProjectNamespaceRequest); i { + switch v := v.(*RegisterProjectResponse); i { case 0: return &v.state case 1: @@ -5638,7 +5708,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterProjectNamespaceResponse); i { + switch v := v.(*RegisterProjectNamespaceRequest); i { case 0: return &v.state case 1: @@ -5650,7 +5720,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateJobSpecificationRequest); i { + switch v := v.(*RegisterProjectNamespaceResponse); i { case 0: return &v.state case 1: @@ -5662,7 +5732,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateJobSpecificationResponse); i { + switch v := v.(*CreateJobSpecificationRequest); i { case 0: return &v.state case 1: @@ -5674,7 +5744,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadJobSpecificationRequest); i { + switch v := v.(*CreateJobSpecificationResponse); i { case 0: return &v.state case 1: @@ -5686,7 +5756,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadJobSpecificationResponse); i { + switch v := v.(*ReadJobSpecificationRequest); i { case 0: return &v.state case 1: @@ -5698,7 +5768,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteJobSpecificationRequest); i { + switch v := v.(*ReadJobSpecificationResponse); i { case 0: return &v.state case 1: @@ -5710,7 +5780,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteJobSpecificationResponse); i { + switch v := v.(*DeleteJobSpecificationRequest); i { case 0: return &v.state case 1: @@ -5722,7 +5792,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterSecretRequest); i { + switch v := v.(*DeleteJobSpecificationResponse); i { case 0: return &v.state case 1: @@ -5734,7 +5804,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterSecretResponse); i { + switch v := v.(*RegisterSecretRequest); i { case 0: return &v.state case 1: @@ -5746,7 +5816,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProjectsRequest); i { + switch v := v.(*RegisterSecretResponse); i { case 0: return &v.state case 1: @@ -5758,7 +5828,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProjectsResponse); i { + switch v := v.(*ListProjectsRequest); i { case 0: return &v.state case 1: @@ -5770,7 +5840,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProjectNamespacesRequest); i { + switch v := v.(*ListProjectsResponse); i { case 0: return &v.state case 1: @@ -5782,7 +5852,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListProjectNamespacesResponse); i { + switch v := v.(*ListProjectNamespacesRequest); i { case 0: return &v.state case 1: @@ -5794,7 +5864,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterInstanceRequest); i { + switch v := v.(*ListProjectNamespacesResponse); i { case 0: return &v.state case 1: @@ -5806,7 +5876,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterInstanceResponse); i { + switch v := v.(*RegisterInstanceRequest); i { case 0: return &v.state case 1: @@ -5818,7 +5888,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JobStatusRequest); i { + switch v := v.(*RegisterInstanceResponse); i { case 0: return &v.state case 1: @@ -5830,7 +5900,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JobStatusResponse); i { + switch v := v.(*JobStatusRequest); i { case 0: return &v.state case 1: @@ -5842,7 +5912,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWindowRequest); i { + switch v := v.(*JobStatusResponse); i { case 0: return &v.state case 1: @@ -5854,7 +5924,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWindowResponse); i { + switch v := v.(*GetWindowRequest); i { case 0: return &v.state case 1: @@ -5866,7 +5936,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployResourceSpecificationRequest); i { + switch v := v.(*GetWindowResponse); i { case 0: return &v.state case 1: @@ -5878,7 +5948,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeployResourceSpecificationResponse); i { + switch v := v.(*DeployResourceSpecificationRequest); i { case 0: return &v.state case 1: @@ -5890,7 +5960,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResourceSpecificationRequest); i { + switch v := v.(*DeployResourceSpecificationResponse); i { case 0: return &v.state case 1: @@ -5902,7 +5972,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResourceSpecificationResponse); i { + switch v := v.(*ListResourceSpecificationRequest); i { case 0: return &v.state case 1: @@ -5914,7 +5984,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceRequest); i { + switch v := v.(*ListResourceSpecificationResponse); i { case 0: return &v.state case 1: @@ -5926,7 +5996,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceResponse); i { + switch v := v.(*CreateResourceRequest); i { case 0: return &v.state case 1: @@ -5938,7 +6008,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadResourceRequest); i { + switch v := v.(*CreateResourceResponse); i { case 0: return &v.state case 1: @@ -5950,7 +6020,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadResourceResponse); i { + switch v := v.(*ReadResourceRequest); i { case 0: return &v.state case 1: @@ -5962,7 +6032,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceRequest); i { + switch v := v.(*ReadResourceResponse); i { case 0: return &v.state case 1: @@ -5974,7 +6044,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceResponse); i { + switch v := v.(*UpdateResourceRequest); i { case 0: return &v.state case 1: @@ -5986,7 +6056,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReplayRequest); i { + switch v := v.(*UpdateResourceResponse); i { case 0: return &v.state case 1: @@ -5998,7 +6068,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReplayDryRunResponse); i { + switch v := v.(*ReplayRequest); i { case 0: return &v.state case 1: @@ -6010,7 +6080,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReplayExecutionTreeNode); i { + switch v := v.(*ReplayDryRunResponse); i { case 0: return &v.state case 1: @@ -6022,7 +6092,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReplayResponse); i { + switch v := v.(*ReplayExecutionTreeNode); i { case 0: return &v.state case 1: @@ -6034,7 +6104,7 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterJobEventRequest); i { + switch v := v.(*ReplayResponse); i { case 0: return &v.state case 1: @@ -6046,6 +6116,18 @@ func file_odpf_optimus_runtime_service_proto_init() { } } file_odpf_optimus_runtime_service_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterJobEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_optimus_runtime_service_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterJobEventResponse); i { case 0: return &v.state @@ -6057,7 +6139,7 @@ func file_odpf_optimus_runtime_service_proto_init() { return nil } } - file_odpf_optimus_runtime_service_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { + file_odpf_optimus_runtime_service_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ProjectSpecification_ProjectSecret); i { case 0: return &v.state @@ -6069,7 +6151,7 @@ func file_odpf_optimus_runtime_service_proto_init() { return nil } } - file_odpf_optimus_runtime_service_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { + file_odpf_optimus_runtime_service_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JobSpecification_Behavior); i { case 0: return &v.state @@ -6081,7 +6163,7 @@ func file_odpf_optimus_runtime_service_proto_init() { return nil } } - file_odpf_optimus_runtime_service_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} { + file_odpf_optimus_runtime_service_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JobSpecification_Behavior_Retry); i { case 0: return &v.state @@ -6093,7 +6175,7 @@ func file_odpf_optimus_runtime_service_proto_init() { return nil } } - file_odpf_optimus_runtime_service_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} { + file_odpf_optimus_runtime_service_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JobSpecification_Behavior_Notifiers); i { case 0: return &v.state @@ -6112,7 +6194,7 @@ func file_odpf_optimus_runtime_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_odpf_optimus_runtime_service_proto_rawDesc, NumEnums: 3, - NumMessages: 75, + NumMessages: 76, NumExtensions: 0, NumServices: 1, }, diff --git a/api/proto/odpf/optimus/runtime_service.pb.gw.go b/api/proto/odpf/optimus/runtime_service.pb.gw.go index f6ec9550bb..fe54f78908 100644 --- a/api/proto/odpf/optimus/runtime_service.pb.gw.go +++ b/api/proto/odpf/optimus/runtime_service.pb.gw.go @@ -2728,49 +2728,49 @@ func RegisterRuntimeServiceHandlerClient(ctx context.Context, mux *runtime.Serve } var ( - pattern_RuntimeService_Version_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "version"}, "")) + pattern_RuntimeService_Version_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "version"}, "")) - pattern_RuntimeService_CreateJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"api", "v1", "project", "project_name", "namespace", "job"}, "")) + pattern_RuntimeService_CreateJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "project", "project_name", "namespace", "job"}, "")) - pattern_RuntimeService_ReadJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v1", "project", "project_name", "namespace", "job", "job_name"}, "")) + pattern_RuntimeService_ReadJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v1", "project", "project_name", "namespace", "job", "job_name"}, "")) - pattern_RuntimeService_DeleteJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v1", "project", "project_name", "namespace", "job", "job_name"}, "")) + pattern_RuntimeService_DeleteJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v1", "project", "project_name", "namespace", "job", "job_name"}, "")) - pattern_RuntimeService_ListJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "project", "project_name", "job"}, "")) + pattern_RuntimeService_ListJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "project", "project_name", "job"}, "")) - pattern_RuntimeService_DumpJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "project", "project_name", "job", "job_name", "dump"}, "")) + pattern_RuntimeService_DumpJobSpecification_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{"v1", "project", "project_name", "job", "job_name", "dump"}, "")) - pattern_RuntimeService_CheckJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 2, 5}, []string{"api", "v1", "project", "project_name", "job", "check"}, "")) + pattern_RuntimeService_CheckJobSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "project", "project_name", "job", "check"}, "")) - pattern_RuntimeService_RegisterProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "project"}, "")) + pattern_RuntimeService_RegisterProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "project"}, "")) - pattern_RuntimeService_RegisterProjectNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "project", "project_name", "namespace"}, "")) + pattern_RuntimeService_RegisterProjectNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "project", "project_name", "namespace"}, "")) - pattern_RuntimeService_RegisterSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "project", "project_name", "secret", "secret_name"}, "")) + pattern_RuntimeService_RegisterSecret_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}, []string{"v1", "project", "project_name", "secret", "secret_name"}, "")) - pattern_RuntimeService_ListProjects_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "project"}, "")) + pattern_RuntimeService_ListProjects_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "project"}, "")) - pattern_RuntimeService_ListProjectNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "project", "project_name", "namespace"}, "")) + pattern_RuntimeService_ListProjectNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "project", "project_name", "namespace"}, "")) - pattern_RuntimeService_RegisterInstance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "project", "project_name", "job", "job_name", "instance"}, "")) + pattern_RuntimeService_RegisterInstance_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{"v1", "project", "project_name", "job", "job_name", "instance"}, "")) - pattern_RuntimeService_JobStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "project", "project_name", "job", "job_name", "status"}, "")) + pattern_RuntimeService_JobStatus_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{"v1", "project", "project_name", "job", "job_name", "status"}, "")) - pattern_RuntimeService_RegisterJobEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"api", "v1", "project", "project_name", "namespace", "job", "job_name", "event"}, "")) + pattern_RuntimeService_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, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"v1", "project", "project_name", "namespace", "job", "job_name", "event"}, "")) - pattern_RuntimeService_GetWindow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "window"}, "")) + pattern_RuntimeService_GetWindow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "window"}, "")) - pattern_RuntimeService_ListResourceSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"api", "v1", "project", "project_name", "namespace", "datastore", "datastore_name", "resource"}, "")) + pattern_RuntimeService_ListResourceSpecification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"v1", "project", "project_name", "namespace", "datastore", "datastore_name", "resource"}, "")) - pattern_RuntimeService_CreateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"api", "v1", "project", "project_name", "namespace", "datastore", "datastore_name", "resource"}, "")) + pattern_RuntimeService_CreateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"v1", "project", "project_name", "namespace", "datastore", "datastore_name", "resource"}, "")) - pattern_RuntimeService_ReadResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"api", "v1", "project", "project_name", "namespace", "datastore", "datastore_name", "resource", "resource_name"}, "")) + pattern_RuntimeService_ReadResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"v1", "project", "project_name", "namespace", "datastore", "datastore_name", "resource", "resource_name"}, "")) - pattern_RuntimeService_UpdateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"api", "v1", "project", "project_name", "namespace", "datastore", "datastore_name", "resource"}, "")) + pattern_RuntimeService_UpdateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"v1", "project", "project_name", "namespace", "datastore", "datastore_name", "resource"}, "")) - pattern_RuntimeService_ReplayDryRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "project", "project_name", "job", "job_name", "replay-dry-run"}, "")) + pattern_RuntimeService_ReplayDryRun_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{"v1", "project", "project_name", "job", "job_name", "replay-dry-run"}, "")) - pattern_RuntimeService_Replay_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "project", "project_name", "job", "job_name", "replay"}, "")) + pattern_RuntimeService_Replay_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{"v1", "project", "project_name", "job", "job_name", "replay"}, "")) ) var ( diff --git a/api/proto/odpf/optimus/task_plugin.pb.go b/api/proto/odpf/optimus/task_plugin.pb.go deleted file mode 100644 index e65f78e032..0000000000 --- a/api/proto/odpf/optimus/task_plugin.pb.go +++ /dev/null @@ -1,2531 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.13.0 -// source: odpf/optimus/task_plugin.proto - -package optimus - -import ( - duration "github.com/golang/protobuf/ptypes/duration" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PluginOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DryRun bool `protobuf:"varint,1,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` -} - -func (x *PluginOptions) Reset() { - *x = PluginOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PluginOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PluginOptions) ProtoMessage() {} - -func (x *PluginOptions) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[0] - 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 PluginOptions.ProtoReflect.Descriptor instead. -func (*PluginOptions) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{0} -} - -func (x *PluginOptions) GetDryRun() bool { - if x != nil { - return x.DryRun - } - return false -} - -type GetTaskSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetTaskSchema) Reset() { - *x = GetTaskSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTaskSchema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTaskSchema) ProtoMessage() {} - -func (x *GetTaskSchema) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[1] - 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 GetTaskSchema.ProtoReflect.Descriptor instead. -func (*GetTaskSchema) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{1} -} - -type PluginQuestion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Prompt string `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"` - Help string `protobuf:"bytes,3,opt,name=help,proto3" json:"help,omitempty"` - Default string `protobuf:"bytes,4,opt,name=default,proto3" json:"default,omitempty"` - Multiselect []string `protobuf:"bytes,5,rep,name=multiselect,proto3" json:"multiselect,omitempty"` - SubQuestions []*PluginQuestion_SubQuestion `protobuf:"bytes,8,rep,name=sub_questions,json=subQuestions,proto3" json:"sub_questions,omitempty"` -} - -func (x *PluginQuestion) Reset() { - *x = PluginQuestion{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PluginQuestion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PluginQuestion) ProtoMessage() {} - -func (x *PluginQuestion) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[2] - 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 PluginQuestion.ProtoReflect.Descriptor instead. -func (*PluginQuestion) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{2} -} - -func (x *PluginQuestion) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PluginQuestion) GetPrompt() string { - if x != nil { - return x.Prompt - } - return "" -} - -func (x *PluginQuestion) GetHelp() string { - if x != nil { - return x.Help - } - return "" -} - -func (x *PluginQuestion) GetDefault() string { - if x != nil { - return x.Default - } - return "" -} - -func (x *PluginQuestion) GetMultiselect() []string { - if x != nil { - return x.Multiselect - } - return nil -} - -func (x *PluginQuestion) GetSubQuestions() []*PluginQuestion_SubQuestion { - if x != nil { - return x.SubQuestions - } - return nil -} - -type PluginAnswer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Question *PluginQuestion `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *PluginAnswer) Reset() { - *x = PluginAnswer{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PluginAnswer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PluginAnswer) ProtoMessage() {} - -func (x *PluginAnswer) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[3] - 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 PluginAnswer.ProtoReflect.Descriptor instead. -func (*PluginAnswer) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{3} -} - -func (x *PluginAnswer) GetQuestion() *PluginQuestion { - if x != nil { - return x.Question - } - return nil -} - -func (x *PluginAnswer) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type GetTaskQuestions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetTaskQuestions) Reset() { - *x = GetTaskQuestions{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTaskQuestions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTaskQuestions) ProtoMessage() {} - -func (x *GetTaskQuestions) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[4] - 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 GetTaskQuestions.ProtoReflect.Descriptor instead. -func (*GetTaskQuestions) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{4} -} - -type ValidateTaskQuestion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ValidateTaskQuestion) Reset() { - *x = ValidateTaskQuestion{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateTaskQuestion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateTaskQuestion) ProtoMessage() {} - -func (x *ValidateTaskQuestion) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[5] - 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 ValidateTaskQuestion.ProtoReflect.Descriptor instead. -func (*ValidateTaskQuestion) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{5} -} - -type TaskConfigs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Configs []*TaskConfigs_Config `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` -} - -func (x *TaskConfigs) Reset() { - *x = TaskConfigs{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskConfigs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskConfigs) ProtoMessage() {} - -func (x *TaskConfigs) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[6] - 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 TaskConfigs.ProtoReflect.Descriptor instead. -func (*TaskConfigs) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{6} -} - -func (x *TaskConfigs) GetConfigs() []*TaskConfigs_Config { - if x != nil { - return x.Configs - } - return nil -} - -type DefaultTaskConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DefaultTaskConfig) Reset() { - *x = DefaultTaskConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultTaskConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultTaskConfig) ProtoMessage() {} - -func (x *DefaultTaskConfig) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_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 DefaultTaskConfig.ProtoReflect.Descriptor instead. -func (*DefaultTaskConfig) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{7} -} - -type TaskAssets struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Assets []*TaskAssets_Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` -} - -func (x *TaskAssets) Reset() { - *x = TaskAssets{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskAssets) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskAssets) ProtoMessage() {} - -func (x *TaskAssets) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_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 TaskAssets.ProtoReflect.Descriptor instead. -func (*TaskAssets) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{8} -} - -func (x *TaskAssets) GetAssets() []*TaskAssets_Asset { - if x != nil { - return x.Assets - } - return nil -} - -type DefaultTaskAssets struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DefaultTaskAssets) Reset() { - *x = DefaultTaskAssets{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultTaskAssets) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultTaskAssets) ProtoMessage() {} - -func (x *DefaultTaskAssets) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[9] - 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 DefaultTaskAssets.ProtoReflect.Descriptor instead. -func (*DefaultTaskAssets) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{9} -} - -type TaskWindow struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Size *duration.Duration `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` - Offset *duration.Duration `protobuf:"bytes,2,opt,name=offset,proto3" json:"offset,omitempty"` - TruncateTo string `protobuf:"bytes,3,opt,name=truncate_to,json=truncateTo,proto3" json:"truncate_to,omitempty"` -} - -func (x *TaskWindow) Reset() { - *x = TaskWindow{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskWindow) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskWindow) ProtoMessage() {} - -func (x *TaskWindow) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[10] - 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 TaskWindow.ProtoReflect.Descriptor instead. -func (*TaskWindow) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{10} -} - -func (x *TaskWindow) GetSize() *duration.Duration { - if x != nil { - return x.Size - } - return nil -} - -func (x *TaskWindow) GetOffset() *duration.Duration { - if x != nil { - return x.Offset - } - return nil -} - -func (x *TaskWindow) GetTruncateTo() string { - if x != nil { - return x.TruncateTo - } - return "" -} - -type CompileTaskAssets struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CompileTaskAssets) Reset() { - *x = CompileTaskAssets{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompileTaskAssets) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompileTaskAssets) ProtoMessage() {} - -func (x *CompileTaskAssets) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[11] - 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 CompileTaskAssets.ProtoReflect.Descriptor instead. -func (*CompileTaskAssets) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{11} -} - -type GenerateTaskDestination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GenerateTaskDestination) Reset() { - *x = GenerateTaskDestination{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateTaskDestination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTaskDestination) ProtoMessage() {} - -func (x *GenerateTaskDestination) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[12] - 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 GenerateTaskDestination.ProtoReflect.Descriptor instead. -func (*GenerateTaskDestination) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{12} -} - -type GenerateTaskDependencies struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GenerateTaskDependencies) Reset() { - *x = GenerateTaskDependencies{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateTaskDependencies) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTaskDependencies) ProtoMessage() {} - -func (x *GenerateTaskDependencies) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[13] - 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 GenerateTaskDependencies.ProtoReflect.Descriptor instead. -func (*GenerateTaskDependencies) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{13} -} - -type GetTaskSchema_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetTaskSchema_Request) Reset() { - *x = GetTaskSchema_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTaskSchema_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTaskSchema_Request) ProtoMessage() {} - -func (x *GetTaskSchema_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[14] - 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 GetTaskSchema_Request.ProtoReflect.Descriptor instead. -func (*GetTaskSchema_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{1, 0} -} - -type GetTaskSchema_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` - // secret_path will be mounted inside the container as volume - // e.g. /opt/secret/auth.json - SecretPath string `protobuf:"bytes,4,opt,name=secret_path,json=secretPath,proto3" json:"secret_path,omitempty"` -} - -func (x *GetTaskSchema_Response) Reset() { - *x = GetTaskSchema_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTaskSchema_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTaskSchema_Response) ProtoMessage() {} - -func (x *GetTaskSchema_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[15] - 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 GetTaskSchema_Response.ProtoReflect.Descriptor instead. -func (*GetTaskSchema_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{1, 1} -} - -func (x *GetTaskSchema_Response) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GetTaskSchema_Response) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *GetTaskSchema_Response) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *GetTaskSchema_Response) GetSecretPath() string { - if x != nil { - return x.SecretPath - } - return "" -} - -type PluginQuestion_SubQuestion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IfValue string `protobuf:"bytes,1,opt,name=if_value,json=ifValue,proto3" json:"if_value,omitempty"` - Questions []*PluginQuestion `protobuf:"bytes,2,rep,name=questions,proto3" json:"questions,omitempty"` -} - -func (x *PluginQuestion_SubQuestion) Reset() { - *x = PluginQuestion_SubQuestion{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PluginQuestion_SubQuestion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PluginQuestion_SubQuestion) ProtoMessage() {} - -func (x *PluginQuestion_SubQuestion) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[16] - 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 PluginQuestion_SubQuestion.ProtoReflect.Descriptor instead. -func (*PluginQuestion_SubQuestion) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *PluginQuestion_SubQuestion) GetIfValue() string { - if x != nil { - return x.IfValue - } - return "" -} - -func (x *PluginQuestion_SubQuestion) GetQuestions() []*PluginQuestion { - if x != nil { - return x.Questions - } - return nil -} - -type GetTaskQuestions_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JobName string `protobuf:"bytes,1,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *GetTaskQuestions_Request) Reset() { - *x = GetTaskQuestions_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTaskQuestions_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTaskQuestions_Request) ProtoMessage() {} - -func (x *GetTaskQuestions_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[17] - 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 GetTaskQuestions_Request.ProtoReflect.Descriptor instead. -func (*GetTaskQuestions_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *GetTaskQuestions_Request) GetJobName() string { - if x != nil { - return x.JobName - } - return "" -} - -func (x *GetTaskQuestions_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type GetTaskQuestions_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Questions []*PluginQuestion `protobuf:"bytes,1,rep,name=questions,proto3" json:"questions,omitempty"` -} - -func (x *GetTaskQuestions_Response) Reset() { - *x = GetTaskQuestions_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTaskQuestions_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTaskQuestions_Response) ProtoMessage() {} - -func (x *GetTaskQuestions_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[18] - 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 GetTaskQuestions_Response.ProtoReflect.Descriptor instead. -func (*GetTaskQuestions_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{4, 1} -} - -func (x *GetTaskQuestions_Response) GetQuestions() []*PluginQuestion { - if x != nil { - return x.Questions - } - return nil -} - -type ValidateTaskQuestion_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Answer *PluginAnswer `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *ValidateTaskQuestion_Request) Reset() { - *x = ValidateTaskQuestion_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateTaskQuestion_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateTaskQuestion_Request) ProtoMessage() {} - -func (x *ValidateTaskQuestion_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[19] - 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 ValidateTaskQuestion_Request.ProtoReflect.Descriptor instead. -func (*ValidateTaskQuestion_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *ValidateTaskQuestion_Request) GetAnswer() *PluginAnswer { - if x != nil { - return x.Answer - } - return nil -} - -func (x *ValidateTaskQuestion_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type ValidateTaskQuestion_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *ValidateTaskQuestion_Response) Reset() { - *x = ValidateTaskQuestion_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidateTaskQuestion_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidateTaskQuestion_Response) ProtoMessage() {} - -func (x *ValidateTaskQuestion_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[20] - 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 ValidateTaskQuestion_Response.ProtoReflect.Descriptor instead. -func (*ValidateTaskQuestion_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{5, 1} -} - -func (x *ValidateTaskQuestion_Response) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *ValidateTaskQuestion_Response) GetError() string { - if x != nil { - return x.Error - } - return "" -} - -type TaskConfigs_Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *TaskConfigs_Config) Reset() { - *x = TaskConfigs_Config{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskConfigs_Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskConfigs_Config) ProtoMessage() {} - -func (x *TaskConfigs_Config) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[21] - 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 TaskConfigs_Config.ProtoReflect.Descriptor instead. -func (*TaskConfigs_Config) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *TaskConfigs_Config) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TaskConfigs_Config) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type DefaultTaskConfig_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Answers []*PluginAnswer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *DefaultTaskConfig_Request) Reset() { - *x = DefaultTaskConfig_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultTaskConfig_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultTaskConfig_Request) ProtoMessage() {} - -func (x *DefaultTaskConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[22] - 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 DefaultTaskConfig_Request.ProtoReflect.Descriptor instead. -func (*DefaultTaskConfig_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *DefaultTaskConfig_Request) GetAnswers() []*PluginAnswer { - if x != nil { - return x.Answers - } - return nil -} - -func (x *DefaultTaskConfig_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type DefaultTaskConfig_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Configs *TaskConfigs `protobuf:"bytes,1,opt,name=configs,proto3" json:"configs,omitempty"` -} - -func (x *DefaultTaskConfig_Response) Reset() { - *x = DefaultTaskConfig_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultTaskConfig_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultTaskConfig_Response) ProtoMessage() {} - -func (x *DefaultTaskConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[23] - 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 DefaultTaskConfig_Response.ProtoReflect.Descriptor instead. -func (*DefaultTaskConfig_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{7, 1} -} - -func (x *DefaultTaskConfig_Response) GetConfigs() *TaskConfigs { - if x != nil { - return x.Configs - } - return nil -} - -type TaskAssets_Asset struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *TaskAssets_Asset) Reset() { - *x = TaskAssets_Asset{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TaskAssets_Asset) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaskAssets_Asset) ProtoMessage() {} - -func (x *TaskAssets_Asset) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[24] - 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 TaskAssets_Asset.ProtoReflect.Descriptor instead. -func (*TaskAssets_Asset) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *TaskAssets_Asset) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *TaskAssets_Asset) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type DefaultTaskAssets_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Answers []*PluginAnswer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *DefaultTaskAssets_Request) Reset() { - *x = DefaultTaskAssets_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultTaskAssets_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultTaskAssets_Request) ProtoMessage() {} - -func (x *DefaultTaskAssets_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[25] - 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 DefaultTaskAssets_Request.ProtoReflect.Descriptor instead. -func (*DefaultTaskAssets_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{9, 0} -} - -func (x *DefaultTaskAssets_Request) GetAnswers() []*PluginAnswer { - if x != nil { - return x.Answers - } - return nil -} - -func (x *DefaultTaskAssets_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type DefaultTaskAssets_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Assets *TaskAssets `protobuf:"bytes,1,opt,name=assets,proto3" json:"assets,omitempty"` -} - -func (x *DefaultTaskAssets_Response) Reset() { - *x = DefaultTaskAssets_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DefaultTaskAssets_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DefaultTaskAssets_Response) ProtoMessage() {} - -func (x *DefaultTaskAssets_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[26] - 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 DefaultTaskAssets_Response.ProtoReflect.Descriptor instead. -func (*DefaultTaskAssets_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{9, 1} -} - -func (x *DefaultTaskAssets_Response) GetAssets() *TaskAssets { - if x != nil { - return x.Assets - } - return nil -} - -type CompileTaskAssets_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - JobConfigs *TaskConfigs `protobuf:"bytes,1,opt,name=job_configs,json=jobConfigs,proto3" json:"job_configs,omitempty"` - JobAssets *TaskAssets `protobuf:"bytes,2,opt,name=job_assets,json=jobAssets,proto3" json:"job_assets,omitempty"` - TaskWindow *TaskWindow `protobuf:"bytes,3,opt,name=task_window,json=taskWindow,proto3" json:"task_window,omitempty"` - InstanceSchedule *timestamp.Timestamp `protobuf:"bytes,4,opt,name=instance_schedule,json=instanceSchedule,proto3" json:"instance_schedule,omitempty"` - InstanceData []*InstanceSpecData `protobuf:"bytes,5,rep,name=instance_data,json=instanceData,proto3" json:"instance_data,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *CompileTaskAssets_Request) Reset() { - *x = CompileTaskAssets_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompileTaskAssets_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompileTaskAssets_Request) ProtoMessage() {} - -func (x *CompileTaskAssets_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[27] - 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 CompileTaskAssets_Request.ProtoReflect.Descriptor instead. -func (*CompileTaskAssets_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{11, 0} -} - -func (x *CompileTaskAssets_Request) GetJobConfigs() *TaskConfigs { - if x != nil { - return x.JobConfigs - } - return nil -} - -func (x *CompileTaskAssets_Request) GetJobAssets() *TaskAssets { - if x != nil { - return x.JobAssets - } - return nil -} - -func (x *CompileTaskAssets_Request) GetTaskWindow() *TaskWindow { - if x != nil { - return x.TaskWindow - } - return nil -} - -func (x *CompileTaskAssets_Request) GetInstanceSchedule() *timestamp.Timestamp { - if x != nil { - return x.InstanceSchedule - } - return nil -} - -func (x *CompileTaskAssets_Request) GetInstanceData() []*InstanceSpecData { - if x != nil { - return x.InstanceData - } - return nil -} - -func (x *CompileTaskAssets_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type CompileTaskAssets_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Assets *TaskAssets `protobuf:"bytes,1,opt,name=assets,proto3" json:"assets,omitempty"` -} - -func (x *CompileTaskAssets_Response) Reset() { - *x = CompileTaskAssets_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompileTaskAssets_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompileTaskAssets_Response) ProtoMessage() {} - -func (x *CompileTaskAssets_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[28] - 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 CompileTaskAssets_Response.ProtoReflect.Descriptor instead. -func (*CompileTaskAssets_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{11, 1} -} - -func (x *CompileTaskAssets_Response) GetAssets() *TaskAssets { - if x != nil { - return x.Assets - } - return nil -} - -type GenerateTaskDestination_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Task configs - JobConfig *TaskConfigs `protobuf:"bytes,1,opt,name=job_config,json=jobConfig,proto3" json:"job_config,omitempty"` - // Job assets - JobAssets *TaskAssets `protobuf:"bytes,2,opt,name=job_assets,json=jobAssets,proto3" json:"job_assets,omitempty"` - // Job project - Project *ProjectSpecification `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *GenerateTaskDestination_Request) Reset() { - *x = GenerateTaskDestination_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateTaskDestination_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTaskDestination_Request) ProtoMessage() {} - -func (x *GenerateTaskDestination_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[29] - 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 GenerateTaskDestination_Request.ProtoReflect.Descriptor instead. -func (*GenerateTaskDestination_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{12, 0} -} - -func (x *GenerateTaskDestination_Request) GetJobConfig() *TaskConfigs { - if x != nil { - return x.JobConfig - } - return nil -} - -func (x *GenerateTaskDestination_Request) GetJobAssets() *TaskAssets { - if x != nil { - return x.JobAssets - } - return nil -} - -func (x *GenerateTaskDestination_Request) GetProject() *ProjectSpecification { - if x != nil { - return x.Project - } - return nil -} - -func (x *GenerateTaskDestination_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type GenerateTaskDestination_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` -} - -func (x *GenerateTaskDestination_Response) Reset() { - *x = GenerateTaskDestination_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateTaskDestination_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTaskDestination_Response) ProtoMessage() {} - -func (x *GenerateTaskDestination_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[30] - 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 GenerateTaskDestination_Response.ProtoReflect.Descriptor instead. -func (*GenerateTaskDestination_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{12, 1} -} - -func (x *GenerateTaskDestination_Response) GetDestination() string { - if x != nil { - return x.Destination - } - return "" -} - -type GenerateTaskDependencies_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Task configs - JobConfig *TaskConfigs `protobuf:"bytes,1,opt,name=job_config,json=jobConfig,proto3" json:"job_config,omitempty"` - // Job assets - JobAssets *TaskAssets `protobuf:"bytes,2,opt,name=job_assets,json=jobAssets,proto3" json:"job_assets,omitempty"` - // Job project - Project *ProjectSpecification `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"` - Options *PluginOptions `protobuf:"bytes,40,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *GenerateTaskDependencies_Request) Reset() { - *x = GenerateTaskDependencies_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateTaskDependencies_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTaskDependencies_Request) ProtoMessage() {} - -func (x *GenerateTaskDependencies_Request) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[31] - 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 GenerateTaskDependencies_Request.ProtoReflect.Descriptor instead. -func (*GenerateTaskDependencies_Request) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{13, 0} -} - -func (x *GenerateTaskDependencies_Request) GetJobConfig() *TaskConfigs { - if x != nil { - return x.JobConfig - } - return nil -} - -func (x *GenerateTaskDependencies_Request) GetJobAssets() *TaskAssets { - if x != nil { - return x.JobAssets - } - return nil -} - -func (x *GenerateTaskDependencies_Request) GetProject() *ProjectSpecification { - if x != nil { - return x.Project - } - return nil -} - -func (x *GenerateTaskDependencies_Request) GetOptions() *PluginOptions { - if x != nil { - return x.Options - } - return nil -} - -type GenerateTaskDependencies_Response struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Dependencies []string `protobuf:"bytes,1,rep,name=dependencies,proto3" json:"dependencies,omitempty"` -} - -func (x *GenerateTaskDependencies_Response) Reset() { - *x = GenerateTaskDependencies_Response{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenerateTaskDependencies_Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTaskDependencies_Response) ProtoMessage() {} - -func (x *GenerateTaskDependencies_Response) ProtoReflect() protoreflect.Message { - mi := &file_odpf_optimus_task_plugin_proto_msgTypes[32] - 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 GenerateTaskDependencies_Response.ProtoReflect.Descriptor instead. -func (*GenerateTaskDependencies_Response) Descriptor() ([]byte, []int) { - return file_odpf_optimus_task_plugin_proto_rawDescGZIP(), []int{13, 1} -} - -func (x *GenerateTaskDependencies_Response) GetDependencies() []string { - if x != nil { - return x.Dependencies - } - return nil -} - -var File_odpf_optimus_task_plugin_proto protoreflect.FileDescriptor - -var file_odpf_optimus_task_plugin_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0c, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x1a, 0x22, - 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2f, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0x93, 0x01, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, - 0x09, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x77, 0x0a, 0x08, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, - 0x61, 0x74, 0x68, 0x22, 0xcd, 0x02, 0x0a, 0x0e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x51, 0x75, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, - 0x6f, 0x6d, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6d, - 0x70, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x12, 0x4d, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x51, - 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x51, 0x75, 0x65, 0x73, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x64, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x19, 0x0a, 0x08, 0x69, 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x69, 0x66, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, - 0x07, 0x10, 0x08, 0x22, 0x5e, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, 0x6e, 0x73, - 0x77, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x73, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, - 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x5b, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x46, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x71, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc8, 0x01, - 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, - 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x74, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x32, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x06, 0x61, - 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3a, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7d, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x1a, 0x32, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x22, 0xcc, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x76, 0x0a, - 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x6e, 0x73, 0x77, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, - 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x12, 0x35, - 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3f, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, - 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0x77, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x31, 0x0a, 0x05, - 0x41, 0x73, 0x73, 0x65, 0x74, 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, 0x22, - 0xc9, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x76, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x34, 0x0a, 0x07, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x52, 0x07, 0x61, - 0x6e, 0x73, 0x77, 0x65, 0x72, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, - 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 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, 0x22, 0xd2, 0x03, - 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x1a, 0xfe, 0x02, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3a, 0x0a, 0x0b, 0x6a, 0x6f, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, - 0x0a, 0x6a, 0x6f, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x6a, - 0x6f, 0x62, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x77, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x57, 0x69, 0x6e, - 0x64, 0x6f, 0x77, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, - 0x47, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, - 0x64, 0x75, 0x6c, 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, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x30, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x22, 0xbb, 0x02, 0x0a, 0x17, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf1, - 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x6a, 0x6f, - 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3c, 0x0a, - 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x1a, 0x2c, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xbe, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x1a, 0xf1, 0x01, - 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x2e, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, - 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, - 0x73, 0x32, 0xed, 0x06, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x12, 0x5a, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x12, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, - 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x6f, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x51, 0x75, 0x65, 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x66, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, - 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x28, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x11, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, - 0x27, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x66, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x28, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x17, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, - 0x6d, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x18, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, - 0x12, 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x4d, 0x0a, 0x16, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x42, 0x11, 0x54, 0x61, 0x73, - 0x6b, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x01, - 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, - 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_optimus_task_plugin_proto_rawDescOnce sync.Once - file_odpf_optimus_task_plugin_proto_rawDescData = file_odpf_optimus_task_plugin_proto_rawDesc -) - -func file_odpf_optimus_task_plugin_proto_rawDescGZIP() []byte { - file_odpf_optimus_task_plugin_proto_rawDescOnce.Do(func() { - file_odpf_optimus_task_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_optimus_task_plugin_proto_rawDescData) - }) - return file_odpf_optimus_task_plugin_proto_rawDescData -} - -var file_odpf_optimus_task_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 33) -var file_odpf_optimus_task_plugin_proto_goTypes = []interface{}{ - (*PluginOptions)(nil), // 0: odpf.optimus.PluginOptions - (*GetTaskSchema)(nil), // 1: odpf.optimus.GetTaskSchema - (*PluginQuestion)(nil), // 2: odpf.optimus.PluginQuestion - (*PluginAnswer)(nil), // 3: odpf.optimus.PluginAnswer - (*GetTaskQuestions)(nil), // 4: odpf.optimus.GetTaskQuestions - (*ValidateTaskQuestion)(nil), // 5: odpf.optimus.ValidateTaskQuestion - (*TaskConfigs)(nil), // 6: odpf.optimus.TaskConfigs - (*DefaultTaskConfig)(nil), // 7: odpf.optimus.DefaultTaskConfig - (*TaskAssets)(nil), // 8: odpf.optimus.TaskAssets - (*DefaultTaskAssets)(nil), // 9: odpf.optimus.DefaultTaskAssets - (*TaskWindow)(nil), // 10: odpf.optimus.TaskWindow - (*CompileTaskAssets)(nil), // 11: odpf.optimus.CompileTaskAssets - (*GenerateTaskDestination)(nil), // 12: odpf.optimus.GenerateTaskDestination - (*GenerateTaskDependencies)(nil), // 13: odpf.optimus.GenerateTaskDependencies - (*GetTaskSchema_Request)(nil), // 14: odpf.optimus.GetTaskSchema.Request - (*GetTaskSchema_Response)(nil), // 15: odpf.optimus.GetTaskSchema.Response - (*PluginQuestion_SubQuestion)(nil), // 16: odpf.optimus.PluginQuestion.SubQuestion - (*GetTaskQuestions_Request)(nil), // 17: odpf.optimus.GetTaskQuestions.Request - (*GetTaskQuestions_Response)(nil), // 18: odpf.optimus.GetTaskQuestions.Response - (*ValidateTaskQuestion_Request)(nil), // 19: odpf.optimus.ValidateTaskQuestion.Request - (*ValidateTaskQuestion_Response)(nil), // 20: odpf.optimus.ValidateTaskQuestion.Response - (*TaskConfigs_Config)(nil), // 21: odpf.optimus.TaskConfigs.Config - (*DefaultTaskConfig_Request)(nil), // 22: odpf.optimus.DefaultTaskConfig.Request - (*DefaultTaskConfig_Response)(nil), // 23: odpf.optimus.DefaultTaskConfig.Response - (*TaskAssets_Asset)(nil), // 24: odpf.optimus.TaskAssets.Asset - (*DefaultTaskAssets_Request)(nil), // 25: odpf.optimus.DefaultTaskAssets.Request - (*DefaultTaskAssets_Response)(nil), // 26: odpf.optimus.DefaultTaskAssets.Response - (*CompileTaskAssets_Request)(nil), // 27: odpf.optimus.CompileTaskAssets.Request - (*CompileTaskAssets_Response)(nil), // 28: odpf.optimus.CompileTaskAssets.Response - (*GenerateTaskDestination_Request)(nil), // 29: odpf.optimus.GenerateTaskDestination.Request - (*GenerateTaskDestination_Response)(nil), // 30: odpf.optimus.GenerateTaskDestination.Response - (*GenerateTaskDependencies_Request)(nil), // 31: odpf.optimus.GenerateTaskDependencies.Request - (*GenerateTaskDependencies_Response)(nil), // 32: odpf.optimus.GenerateTaskDependencies.Response - (*duration.Duration)(nil), // 33: google.protobuf.Duration - (*timestamp.Timestamp)(nil), // 34: google.protobuf.Timestamp - (*InstanceSpecData)(nil), // 35: odpf.optimus.InstanceSpecData - (*ProjectSpecification)(nil), // 36: odpf.optimus.ProjectSpecification -} -var file_odpf_optimus_task_plugin_proto_depIdxs = []int32{ - 16, // 0: odpf.optimus.PluginQuestion.sub_questions:type_name -> odpf.optimus.PluginQuestion.SubQuestion - 2, // 1: odpf.optimus.PluginAnswer.question:type_name -> odpf.optimus.PluginQuestion - 21, // 2: odpf.optimus.TaskConfigs.configs:type_name -> odpf.optimus.TaskConfigs.Config - 24, // 3: odpf.optimus.TaskAssets.assets:type_name -> odpf.optimus.TaskAssets.Asset - 33, // 4: odpf.optimus.TaskWindow.size:type_name -> google.protobuf.Duration - 33, // 5: odpf.optimus.TaskWindow.offset:type_name -> google.protobuf.Duration - 2, // 6: odpf.optimus.PluginQuestion.SubQuestion.questions:type_name -> odpf.optimus.PluginQuestion - 0, // 7: odpf.optimus.GetTaskQuestions.Request.options:type_name -> odpf.optimus.PluginOptions - 2, // 8: odpf.optimus.GetTaskQuestions.Response.questions:type_name -> odpf.optimus.PluginQuestion - 3, // 9: odpf.optimus.ValidateTaskQuestion.Request.answer:type_name -> odpf.optimus.PluginAnswer - 0, // 10: odpf.optimus.ValidateTaskQuestion.Request.options:type_name -> odpf.optimus.PluginOptions - 3, // 11: odpf.optimus.DefaultTaskConfig.Request.answers:type_name -> odpf.optimus.PluginAnswer - 0, // 12: odpf.optimus.DefaultTaskConfig.Request.options:type_name -> odpf.optimus.PluginOptions - 6, // 13: odpf.optimus.DefaultTaskConfig.Response.configs:type_name -> odpf.optimus.TaskConfigs - 3, // 14: odpf.optimus.DefaultTaskAssets.Request.answers:type_name -> odpf.optimus.PluginAnswer - 0, // 15: odpf.optimus.DefaultTaskAssets.Request.options:type_name -> odpf.optimus.PluginOptions - 8, // 16: odpf.optimus.DefaultTaskAssets.Response.assets:type_name -> odpf.optimus.TaskAssets - 6, // 17: odpf.optimus.CompileTaskAssets.Request.job_configs:type_name -> odpf.optimus.TaskConfigs - 8, // 18: odpf.optimus.CompileTaskAssets.Request.job_assets:type_name -> odpf.optimus.TaskAssets - 10, // 19: odpf.optimus.CompileTaskAssets.Request.task_window:type_name -> odpf.optimus.TaskWindow - 34, // 20: odpf.optimus.CompileTaskAssets.Request.instance_schedule:type_name -> google.protobuf.Timestamp - 35, // 21: odpf.optimus.CompileTaskAssets.Request.instance_data:type_name -> odpf.optimus.InstanceSpecData - 0, // 22: odpf.optimus.CompileTaskAssets.Request.options:type_name -> odpf.optimus.PluginOptions - 8, // 23: odpf.optimus.CompileTaskAssets.Response.assets:type_name -> odpf.optimus.TaskAssets - 6, // 24: odpf.optimus.GenerateTaskDestination.Request.job_config:type_name -> odpf.optimus.TaskConfigs - 8, // 25: odpf.optimus.GenerateTaskDestination.Request.job_assets:type_name -> odpf.optimus.TaskAssets - 36, // 26: odpf.optimus.GenerateTaskDestination.Request.project:type_name -> odpf.optimus.ProjectSpecification - 0, // 27: odpf.optimus.GenerateTaskDestination.Request.options:type_name -> odpf.optimus.PluginOptions - 6, // 28: odpf.optimus.GenerateTaskDependencies.Request.job_config:type_name -> odpf.optimus.TaskConfigs - 8, // 29: odpf.optimus.GenerateTaskDependencies.Request.job_assets:type_name -> odpf.optimus.TaskAssets - 36, // 30: odpf.optimus.GenerateTaskDependencies.Request.project:type_name -> odpf.optimus.ProjectSpecification - 0, // 31: odpf.optimus.GenerateTaskDependencies.Request.options:type_name -> odpf.optimus.PluginOptions - 14, // 32: odpf.optimus.TaskPlugin.GetTaskSchema:input_type -> odpf.optimus.GetTaskSchema.Request - 17, // 33: odpf.optimus.TaskPlugin.GetTaskQuestions:input_type -> odpf.optimus.GetTaskQuestions.Request - 19, // 34: odpf.optimus.TaskPlugin.ValidateTaskQuestion:input_type -> odpf.optimus.ValidateTaskQuestion.Request - 22, // 35: odpf.optimus.TaskPlugin.DefaultTaskConfig:input_type -> odpf.optimus.DefaultTaskConfig.Request - 25, // 36: odpf.optimus.TaskPlugin.DefaultTaskAssets:input_type -> odpf.optimus.DefaultTaskAssets.Request - 27, // 37: odpf.optimus.TaskPlugin.CompileTaskAssets:input_type -> odpf.optimus.CompileTaskAssets.Request - 29, // 38: odpf.optimus.TaskPlugin.GenerateTaskDestination:input_type -> odpf.optimus.GenerateTaskDestination.Request - 31, // 39: odpf.optimus.TaskPlugin.GenerateTaskDependencies:input_type -> odpf.optimus.GenerateTaskDependencies.Request - 15, // 40: odpf.optimus.TaskPlugin.GetTaskSchema:output_type -> odpf.optimus.GetTaskSchema.Response - 18, // 41: odpf.optimus.TaskPlugin.GetTaskQuestions:output_type -> odpf.optimus.GetTaskQuestions.Response - 20, // 42: odpf.optimus.TaskPlugin.ValidateTaskQuestion:output_type -> odpf.optimus.ValidateTaskQuestion.Response - 23, // 43: odpf.optimus.TaskPlugin.DefaultTaskConfig:output_type -> odpf.optimus.DefaultTaskConfig.Response - 26, // 44: odpf.optimus.TaskPlugin.DefaultTaskAssets:output_type -> odpf.optimus.DefaultTaskAssets.Response - 28, // 45: odpf.optimus.TaskPlugin.CompileTaskAssets:output_type -> odpf.optimus.CompileTaskAssets.Response - 30, // 46: odpf.optimus.TaskPlugin.GenerateTaskDestination:output_type -> odpf.optimus.GenerateTaskDestination.Response - 32, // 47: odpf.optimus.TaskPlugin.GenerateTaskDependencies:output_type -> odpf.optimus.GenerateTaskDependencies.Response - 40, // [40:48] is the sub-list for method output_type - 32, // [32:40] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 32, // [32:32] is the sub-list for extension extendee - 0, // [0:32] is the sub-list for field type_name -} - -func init() { file_odpf_optimus_task_plugin_proto_init() } -func file_odpf_optimus_task_plugin_proto_init() { - if File_odpf_optimus_task_plugin_proto != nil { - return - } - file_odpf_optimus_runtime_service_proto_init() - if !protoimpl.UnsafeEnabled { - file_odpf_optimus_task_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PluginOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskSchema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PluginQuestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PluginAnswer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskQuestions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateTaskQuestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskConfigs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultTaskConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskAssets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultTaskAssets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskWindow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompileTaskAssets); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateTaskDestination); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateTaskDependencies); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskSchema_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskSchema_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PluginQuestion_SubQuestion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskQuestions_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTaskQuestions_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateTaskQuestion_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateTaskQuestion_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskConfigs_Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultTaskConfig_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultTaskConfig_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskAssets_Asset); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultTaskAssets_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultTaskAssets_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompileTaskAssets_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompileTaskAssets_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateTaskDestination_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateTaskDestination_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateTaskDependencies_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_optimus_task_plugin_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateTaskDependencies_Response); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_optimus_task_plugin_proto_rawDesc, - NumEnums: 0, - NumMessages: 33, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_odpf_optimus_task_plugin_proto_goTypes, - DependencyIndexes: file_odpf_optimus_task_plugin_proto_depIdxs, - MessageInfos: file_odpf_optimus_task_plugin_proto_msgTypes, - }.Build() - File_odpf_optimus_task_plugin_proto = out.File - file_odpf_optimus_task_plugin_proto_rawDesc = nil - file_odpf_optimus_task_plugin_proto_goTypes = nil - file_odpf_optimus_task_plugin_proto_depIdxs = nil -} diff --git a/api/proto/odpf/optimus/task_plugin_grpc.pb.go b/api/proto/odpf/optimus/task_plugin_grpc.pb.go deleted file mode 100644 index 0b3e042c41..0000000000 --- a/api/proto/odpf/optimus/task_plugin_grpc.pb.go +++ /dev/null @@ -1,385 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package optimus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// TaskPluginClient is the client API for TaskPlugin service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TaskPluginClient interface { - // GetTaskSchema provides basic working details for this task - GetTaskSchema(ctx context.Context, in *GetTaskSchema_Request, opts ...grpc.CallOption) (*GetTaskSchema_Response, error) - // GetTaskQuestions list down all the cli inputs required to generate spec files - // name used for question will be directly mapped to DefaultTaskConfig() parameters - GetTaskQuestions(ctx context.Context, in *GetTaskQuestions_Request, opts ...grpc.CallOption) (*GetTaskQuestions_Response, error) - ValidateTaskQuestion(ctx context.Context, in *ValidateTaskQuestion_Request, opts ...grpc.CallOption) (*ValidateTaskQuestion_Response, error) - // DefaultTaskConfig are a set of configuration which will be embedded in job - // specification. These configs can be requested by the docker container before - // execution - // they will be generated based on results of GetTaskQuestions - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultTaskConfig(ctx context.Context, in *DefaultTaskConfig_Request, opts ...grpc.CallOption) (*DefaultTaskConfig_Response, error) - // DefaultTaskAssets are a set of files which will be embedded in job - // specification in assets folder. These configs can be requested by the - // docker container before execution. - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultTaskAssets(ctx context.Context, in *DefaultTaskAssets_Request, opts ...grpc.CallOption) (*DefaultTaskAssets_Response, error) - // CompileTaskAssets overrides the default asset compilation behaviour - CompileTaskAssets(ctx context.Context, in *CompileTaskAssets_Request, opts ...grpc.CallOption) (*CompileTaskAssets_Response, error) - // GenerateTaskDestination derive destination from config and assets - GenerateTaskDestination(ctx context.Context, in *GenerateTaskDestination_Request, opts ...grpc.CallOption) (*GenerateTaskDestination_Response, error) - // GenerateTaskDependencies returns names of job destination on which this unit - // is dependent on - GenerateTaskDependencies(ctx context.Context, in *GenerateTaskDependencies_Request, opts ...grpc.CallOption) (*GenerateTaskDependencies_Response, error) -} - -type taskPluginClient struct { - cc grpc.ClientConnInterface -} - -func NewTaskPluginClient(cc grpc.ClientConnInterface) TaskPluginClient { - return &taskPluginClient{cc} -} - -func (c *taskPluginClient) GetTaskSchema(ctx context.Context, in *GetTaskSchema_Request, opts ...grpc.CallOption) (*GetTaskSchema_Response, error) { - out := new(GetTaskSchema_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.TaskPlugin/GetTaskSchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskPluginClient) GetTaskQuestions(ctx context.Context, in *GetTaskQuestions_Request, opts ...grpc.CallOption) (*GetTaskQuestions_Response, error) { - out := new(GetTaskQuestions_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.TaskPlugin/GetTaskQuestions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskPluginClient) ValidateTaskQuestion(ctx context.Context, in *ValidateTaskQuestion_Request, opts ...grpc.CallOption) (*ValidateTaskQuestion_Response, error) { - out := new(ValidateTaskQuestion_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.TaskPlugin/ValidateTaskQuestion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskPluginClient) DefaultTaskConfig(ctx context.Context, in *DefaultTaskConfig_Request, opts ...grpc.CallOption) (*DefaultTaskConfig_Response, error) { - out := new(DefaultTaskConfig_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.TaskPlugin/DefaultTaskConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskPluginClient) DefaultTaskAssets(ctx context.Context, in *DefaultTaskAssets_Request, opts ...grpc.CallOption) (*DefaultTaskAssets_Response, error) { - out := new(DefaultTaskAssets_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.TaskPlugin/DefaultTaskAssets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskPluginClient) CompileTaskAssets(ctx context.Context, in *CompileTaskAssets_Request, opts ...grpc.CallOption) (*CompileTaskAssets_Response, error) { - out := new(CompileTaskAssets_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.TaskPlugin/CompileTaskAssets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskPluginClient) GenerateTaskDestination(ctx context.Context, in *GenerateTaskDestination_Request, opts ...grpc.CallOption) (*GenerateTaskDestination_Response, error) { - out := new(GenerateTaskDestination_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.TaskPlugin/GenerateTaskDestination", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskPluginClient) GenerateTaskDependencies(ctx context.Context, in *GenerateTaskDependencies_Request, opts ...grpc.CallOption) (*GenerateTaskDependencies_Response, error) { - out := new(GenerateTaskDependencies_Response) - err := c.cc.Invoke(ctx, "/odpf.optimus.TaskPlugin/GenerateTaskDependencies", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TaskPluginServer is the server API for TaskPlugin service. -// All implementations must embed UnimplementedTaskPluginServer -// for forward compatibility -type TaskPluginServer interface { - // GetTaskSchema provides basic working details for this task - GetTaskSchema(context.Context, *GetTaskSchema_Request) (*GetTaskSchema_Response, error) - // GetTaskQuestions list down all the cli inputs required to generate spec files - // name used for question will be directly mapped to DefaultTaskConfig() parameters - GetTaskQuestions(context.Context, *GetTaskQuestions_Request) (*GetTaskQuestions_Response, error) - ValidateTaskQuestion(context.Context, *ValidateTaskQuestion_Request) (*ValidateTaskQuestion_Response, error) - // DefaultTaskConfig are a set of configuration which will be embedded in job - // specification. These configs can be requested by the docker container before - // execution - // they will be generated based on results of GetTaskQuestions - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultTaskConfig(context.Context, *DefaultTaskConfig_Request) (*DefaultTaskConfig_Response, error) - // DefaultTaskAssets are a set of files which will be embedded in job - // specification in assets folder. These configs can be requested by the - // docker container before execution. - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultTaskAssets(context.Context, *DefaultTaskAssets_Request) (*DefaultTaskAssets_Response, error) - // CompileTaskAssets overrides the default asset compilation behaviour - CompileTaskAssets(context.Context, *CompileTaskAssets_Request) (*CompileTaskAssets_Response, error) - // GenerateTaskDestination derive destination from config and assets - GenerateTaskDestination(context.Context, *GenerateTaskDestination_Request) (*GenerateTaskDestination_Response, error) - // GenerateTaskDependencies returns names of job destination on which this unit - // is dependent on - GenerateTaskDependencies(context.Context, *GenerateTaskDependencies_Request) (*GenerateTaskDependencies_Response, error) - mustEmbedUnimplementedTaskPluginServer() -} - -// UnimplementedTaskPluginServer must be embedded to have forward compatible implementations. -type UnimplementedTaskPluginServer struct { -} - -func (UnimplementedTaskPluginServer) GetTaskSchema(context.Context, *GetTaskSchema_Request) (*GetTaskSchema_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTaskSchema not implemented") -} -func (UnimplementedTaskPluginServer) GetTaskQuestions(context.Context, *GetTaskQuestions_Request) (*GetTaskQuestions_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTaskQuestions not implemented") -} -func (UnimplementedTaskPluginServer) ValidateTaskQuestion(context.Context, *ValidateTaskQuestion_Request) (*ValidateTaskQuestion_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateTaskQuestion not implemented") -} -func (UnimplementedTaskPluginServer) DefaultTaskConfig(context.Context, *DefaultTaskConfig_Request) (*DefaultTaskConfig_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method DefaultTaskConfig not implemented") -} -func (UnimplementedTaskPluginServer) DefaultTaskAssets(context.Context, *DefaultTaskAssets_Request) (*DefaultTaskAssets_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method DefaultTaskAssets not implemented") -} -func (UnimplementedTaskPluginServer) CompileTaskAssets(context.Context, *CompileTaskAssets_Request) (*CompileTaskAssets_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method CompileTaskAssets not implemented") -} -func (UnimplementedTaskPluginServer) GenerateTaskDestination(context.Context, *GenerateTaskDestination_Request) (*GenerateTaskDestination_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateTaskDestination not implemented") -} -func (UnimplementedTaskPluginServer) GenerateTaskDependencies(context.Context, *GenerateTaskDependencies_Request) (*GenerateTaskDependencies_Response, error) { - return nil, status.Errorf(codes.Unimplemented, "method GenerateTaskDependencies not implemented") -} -func (UnimplementedTaskPluginServer) mustEmbedUnimplementedTaskPluginServer() {} - -// UnsafeTaskPluginServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TaskPluginServer will -// result in compilation errors. -type UnsafeTaskPluginServer interface { - mustEmbedUnimplementedTaskPluginServer() -} - -func RegisterTaskPluginServer(s grpc.ServiceRegistrar, srv TaskPluginServer) { - s.RegisterService(&TaskPlugin_ServiceDesc, srv) -} - -func _TaskPlugin_GetTaskSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTaskSchema_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskPluginServer).GetTaskSchema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.TaskPlugin/GetTaskSchema", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskPluginServer).GetTaskSchema(ctx, req.(*GetTaskSchema_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskPlugin_GetTaskQuestions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTaskQuestions_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskPluginServer).GetTaskQuestions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.TaskPlugin/GetTaskQuestions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskPluginServer).GetTaskQuestions(ctx, req.(*GetTaskQuestions_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskPlugin_ValidateTaskQuestion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateTaskQuestion_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskPluginServer).ValidateTaskQuestion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.TaskPlugin/ValidateTaskQuestion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskPluginServer).ValidateTaskQuestion(ctx, req.(*ValidateTaskQuestion_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskPlugin_DefaultTaskConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DefaultTaskConfig_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskPluginServer).DefaultTaskConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.TaskPlugin/DefaultTaskConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskPluginServer).DefaultTaskConfig(ctx, req.(*DefaultTaskConfig_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskPlugin_DefaultTaskAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DefaultTaskAssets_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskPluginServer).DefaultTaskAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.TaskPlugin/DefaultTaskAssets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskPluginServer).DefaultTaskAssets(ctx, req.(*DefaultTaskAssets_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskPlugin_CompileTaskAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CompileTaskAssets_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskPluginServer).CompileTaskAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.TaskPlugin/CompileTaskAssets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskPluginServer).CompileTaskAssets(ctx, req.(*CompileTaskAssets_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskPlugin_GenerateTaskDestination_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateTaskDestination_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskPluginServer).GenerateTaskDestination(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.TaskPlugin/GenerateTaskDestination", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskPluginServer).GenerateTaskDestination(ctx, req.(*GenerateTaskDestination_Request)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskPlugin_GenerateTaskDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateTaskDependencies_Request) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskPluginServer).GenerateTaskDependencies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/odpf.optimus.TaskPlugin/GenerateTaskDependencies", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskPluginServer).GenerateTaskDependencies(ctx, req.(*GenerateTaskDependencies_Request)) - } - return interceptor(ctx, in, info, handler) -} - -// TaskPlugin_ServiceDesc is the grpc.ServiceDesc for TaskPlugin service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TaskPlugin_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "odpf.optimus.TaskPlugin", - HandlerType: (*TaskPluginServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetTaskSchema", - Handler: _TaskPlugin_GetTaskSchema_Handler, - }, - { - MethodName: "GetTaskQuestions", - Handler: _TaskPlugin_GetTaskQuestions_Handler, - }, - { - MethodName: "ValidateTaskQuestion", - Handler: _TaskPlugin_ValidateTaskQuestion_Handler, - }, - { - MethodName: "DefaultTaskConfig", - Handler: _TaskPlugin_DefaultTaskConfig_Handler, - }, - { - MethodName: "DefaultTaskAssets", - Handler: _TaskPlugin_DefaultTaskAssets_Handler, - }, - { - MethodName: "CompileTaskAssets", - Handler: _TaskPlugin_CompileTaskAssets_Handler, - }, - { - MethodName: "GenerateTaskDestination", - Handler: _TaskPlugin_GenerateTaskDestination_Handler, - }, - { - MethodName: "GenerateTaskDependencies", - Handler: _TaskPlugin_GenerateTaskDependencies_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "odpf/optimus/task_plugin.proto", -} diff --git a/buf.gen.yaml b/buf.gen.yaml index ad5bb9dbd1..27d1cf1a8b 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -2,7 +2,12 @@ version: v1beta1 plugins: - name: go out: api/proto - opt: paths=source_relative + # appending ",M=" + # is required for protoc-gen-go to provide what the import path for a given + # proto file should be. + # This is necessary while importing a proto file foo/a.proto from another + # directory, e.g. bar/b.proto + opt: paths=source_relative,Modpf/optimus/runtime_service.proto=github.com/odpf/optimus/api/proto/odpf/optimus - name: go-grpc out: api/proto opt: paths=source_relative,require_unimplemented_servers=true diff --git a/cmd/admin.go b/cmd/admin.go index c9436bf854..b6783d91c0 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -6,13 +6,13 @@ import ( ) // adminCommand requests a resource from optimus -func adminCommand(l logger, taskRepo models.TaskPluginRepository, hookRepo models.HookRepo) *cli.Command { +func adminCommand(l logger, pluginRepo models.PluginRepository) *cli.Command { cmd := &cli.Command{ Use: "admin", Short: "administration commands, should not be used by user", } cmd.AddCommand(adminBuildCommand(l)) - cmd.AddCommand(adminGetCommand(l, taskRepo, hookRepo)) + cmd.AddCommand(adminGetCommand(l, pluginRepo)) return cmd } @@ -27,11 +27,10 @@ func adminBuildCommand(l logger) *cli.Command { } // adminGetCommand gets a resource -func adminGetCommand(l logger, taskRepo models.TaskPluginRepository, hookRepo models.HookRepo) *cli.Command { +func adminGetCommand(l logger, pluginRepo models.PluginRepository) *cli.Command { cmd := &cli.Command{ Use: "get", } cmd.AddCommand(adminGetStatusCommand(l)) - cmd.AddCommand(adminGetPluginsCommand(l, taskRepo, hookRepo)) return cmd } diff --git a/cmd/admin_build_instance.go b/cmd/admin_build_instance.go index 30ccefdadc..611e7cca60 100644 --- a/cmd/admin_build_instance.go +++ b/cmd/admin_build_instance.go @@ -8,7 +8,8 @@ import ( "strings" "time" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/timestamppb" + pb "github.com/odpf/optimus/api/proto/odpf/optimus" "github.com/odpf/optimus/models" "github.com/odpf/optimus/utils" @@ -76,10 +77,7 @@ func getInstanceBuildRequest(l logger, jobName, inputDirectory, host, projectNam if err != nil { return errors.Wrapf(err, "invalid time format, please use %s", models.InstanceScheduledAtTimeLayout) } - jobScheduledTimeProto, err := ptypes.TimestampProto(jobScheduledTime) - if err != nil { - return errors.Wrapf(err, "unable to parse timestamp to proto %s", jobScheduledTime.String()) - } + jobScheduledTimeProto := timestamppb.New(jobScheduledTime) dialTimeoutCtx, dialCancel := context.WithTimeout(context.Background(), OptimusDialTimeout) defer dialCancel() diff --git a/cmd/admin_get_plugins.go b/cmd/admin_get_plugins.go deleted file mode 100644 index 17417a93cf..0000000000 --- a/cmd/admin_get_plugins.go +++ /dev/null @@ -1,45 +0,0 @@ -package cmd - -import ( - "context" - - "github.com/odpf/optimus/models" - cli "github.com/spf13/cobra" -) - -func adminGetPluginsCommand(l logger, taskRepo models.TaskPluginRepository, hookRepo models.HookRepo) *cli.Command { - cmd := &cli.Command{ - Use: "plugins", - Short: "Get discovered plugins", - Example: `optimus admin get plugins`, - } - - //TODO: add an option to list all server supported plugins - cmd.RunE = func(c *cli.Command, args []string) error { - l.Println("Discovered tasks:") - for taskIdx, tasks := range taskRepo.GetAll() { - schema, err := tasks.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) - if err != nil { - return err - } - l.Printf("%d. %s\n", taskIdx+1, schema.Name) - l.Printf("Description: %s\n", schema.Description) - l.Printf("Image: %s\n", schema.Image) - l.Println("") - } - - l.Println("Discovered hooks:") - for hookIdx, hooks := range hookRepo.GetAll() { - schema, err := hooks.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return err - } - l.Printf("%d. %s\n", hookIdx+1, schema.Name) - l.Printf("Description: %s\n", schema.Description) - l.Printf("Image: %s\n", schema.Image) - l.Println("") - } - return nil - } - return cmd -} diff --git a/cmd/commands.go b/cmd/commands.go index 39a6b177eb..06cafb6852 100644 --- a/cmd/commands.go +++ b/cmd/commands.go @@ -53,8 +53,7 @@ type JobSpecRepository interface { func New( l logger, conf config.Provider, - tfRepo models.TaskPluginRepository, - hookRepo models.HookRepo, + pluginRepo models.PluginRepository, dsRepo models.DatastoreRepo, ) *cli.Command { var cmd = &cli.Command{ @@ -78,7 +77,7 @@ func New( if conf.GetJob().Path != "" { jobSpecRepo = local.NewJobSpecRepository( jobSpecFs, - local.NewJobSpecAdapter(models.TaskRegistry, models.HookRegistry), + local.NewJobSpecAdapter(pluginRepo), ) } datastoreSpecsFs := map[string]afero.Fs{} @@ -86,18 +85,18 @@ func New( datastoreSpecsFs[dsConfig.Type] = afero.NewBasePathFs(afero.NewOsFs(), dsConfig.Path) } - cmd.AddCommand(versionCommand(l, conf.GetHost())) + cmd.AddCommand(versionCommand(l, conf.GetHost(), pluginRepo)) cmd.AddCommand(configCommand(l, dsRepo)) - cmd.AddCommand(createCommand(l, jobSpecFs, datastoreSpecsFs, tfRepo, hookRepo, dsRepo)) - cmd.AddCommand(deployCommand(l, conf, jobSpecRepo, dsRepo, datastoreSpecsFs)) + cmd.AddCommand(createCommand(l, jobSpecFs, datastoreSpecsFs, pluginRepo, dsRepo)) + cmd.AddCommand(deployCommand(l, conf, jobSpecRepo, pluginRepo, dsRepo, datastoreSpecsFs)) cmd.AddCommand(renderCommand(l, conf.GetHost(), jobSpecRepo)) - cmd.AddCommand(validateCommand(l, conf.GetHost(), jobSpecRepo)) + cmd.AddCommand(validateCommand(l, conf.GetHost(), pluginRepo, jobSpecRepo)) cmd.AddCommand(optimusServeCommand(l, conf)) cmd.AddCommand(replayCommand(l, conf)) // admin specific commands if conf.GetAdmin().Enabled { - cmd.AddCommand(adminCommand(l, tfRepo, hookRepo)) + cmd.AddCommand(adminCommand(l, pluginRepo)) } return cmd diff --git a/cmd/create.go b/cmd/create.go index b290fa6503..7815c0db70 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -36,19 +36,18 @@ var ( ) func createCommand(l logger, jobSpecFs afero.Fs, datastoreSpecsFs map[string]afero.Fs, - taskRepo models.TaskPluginRepository, hookRepo models.HookRepo, datastoreRepo models.DatastoreRepo) *cli.Command { + pluginRepo models.PluginRepository, datastoreRepo models.DatastoreRepo) *cli.Command { cmd := &cli.Command{ Use: "create", Short: "Create a new job/resource", } - cmd.AddCommand(createJobSubCommand(l, jobSpecFs, taskRepo, hookRepo)) - cmd.AddCommand(createHookSubCommand(l, jobSpecFs, hookRepo)) + cmd.AddCommand(createJobSubCommand(l, jobSpecFs, pluginRepo)) + cmd.AddCommand(createHookSubCommand(l, jobSpecFs, pluginRepo)) cmd.AddCommand(createResourceSubCommand(l, datastoreSpecsFs, datastoreRepo)) return cmd } -func createJobSubCommand(l logger, jobSpecFs afero.Fs, taskRepo models.TaskPluginRepository, - hookRepo models.HookRepo) *cli.Command { +func createJobSubCommand(l logger, jobSpecFs afero.Fs, pluginRepo models.PluginRepository) *cli.Command { return &cli.Command{ Use: "job", Short: "create a new Job", @@ -56,7 +55,7 @@ func createJobSubCommand(l logger, jobSpecFs afero.Fs, taskRepo models.TaskPlugi var jobSpecRepo JobSpecRepository jobSpecRepo = local.NewJobSpecRepository( jobSpecFs, - local.NewJobSpecAdapter(models.TaskRegistry, models.HookRegistry), + local.NewJobSpecAdapter(pluginRepo), ) jwd, err := getWorkingDirectory(jobSpecFs, "") @@ -71,11 +70,11 @@ func createJobSubCommand(l logger, jobSpecFs afero.Fs, taskRepo models.TaskPlugi jobDirectory := filepath.Join(jwd, newDirName) jobNameDefault := strings.ReplaceAll(strings.ReplaceAll(jobDirectory, "/", "."), "\\", ".") - jobInput, err := createJobSurvey(jobSpecRepo, taskRepo, jobNameDefault) + jobInput, err := createJobSurvey(jobSpecRepo, pluginRepo, jobNameDefault) if err != nil { return err } - spec, err := local.NewJobSpecAdapter(taskRepo, hookRepo).ToSpec(jobInput) + spec, err := local.NewJobSpecAdapter(pluginRepo).ToSpec(jobInput) if err != nil { return err } @@ -162,15 +161,14 @@ func getDirectoryName(root string) (string, error) { return selectedDir, nil } -func createJobSurvey(jobSpecRepo JobSpecRepository, taskRepo models.TaskPluginRepository, +func createJobSurvey(jobSpecRepo JobSpecRepository, pluginRepo models.PluginRepository, jobNameDefault string) (local.Job, error) { var availableTasks []string - for _, task := range taskRepo.GetAll() { - schema, err := task.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) - if err != nil { - return local.Job{}, err - } - availableTasks = append(availableTasks, schema.Name) + for _, task := range pluginRepo.GetTasks() { + availableTasks = append(availableTasks, task.Info().Name) + } + if len(availableTasks) == 0 { + return local.Job{}, errors.New("no supported task plugin found") } var qs = []*survey.Question{ @@ -263,12 +261,17 @@ this effects runtime dependencies and template macros`, }, } - executionTask, err := taskRepo.GetByName(jobInput.Task.Name) + executionTask, err := pluginRepo.GetByName(jobInput.Task.Name) if err != nil { return jobInput, err } - taskQuesResponse, err := executionTask.GetTaskQuestions(context.TODO(), models.GetTaskQuestionsRequest{ + cliMod := executionTask.CLIMod + if cliMod == nil { + return jobInput, nil + } + + taskQuesResponse, err := cliMod.GetQuestions(context.Background(), models.GetQuestionsRequest{ JobName: jobInput.Name, }) if err != nil { @@ -276,34 +279,40 @@ this effects runtime dependencies and template macros`, } userInputs := models.PluginAnswers{} - for _, ques := range taskQuesResponse.Questions { - responseAnswer, err := AskTaskSurveyQuestion(ques, executionTask) - if err != nil { - return local.Job{}, err + if taskQuesResponse.Questions != nil { + for _, ques := range taskQuesResponse.Questions { + responseAnswer, err := AskCLISurveyQuestion(ques, cliMod) + if err != nil { + return local.Job{}, err + } + userInputs = append(userInputs, responseAnswer...) } - userInputs = append(userInputs, responseAnswer...) } - generateConfResponse, err := executionTask.DefaultTaskConfig(context.TODO(), models.DefaultTaskConfigRequest{ + generateConfResponse, err := cliMod.DefaultConfig(context.Background(), models.DefaultConfigRequest{ Answers: userInputs, }) if err != nil { return jobInput, err } - jobInput.Task.Config = local.JobSpecConfigToYamlSlice(generateConfResponse.Config.ToJobSpec()) + if generateConfResponse.Config != nil { + jobInput.Task.Config = local.JobSpecConfigToYamlSlice(generateConfResponse.Config.ToJobSpec()) + } - genAssetResponse, err := executionTask.DefaultTaskAssets(context.TODO(), models.DefaultTaskAssetsRequest{ + genAssetResponse, err := cliMod.DefaultAssets(context.Background(), models.DefaultAssetsRequest{ Answers: userInputs, }) if err != nil { return jobInput, err } - jobInput.Asset = genAssetResponse.Assets.ToJobSpec().ToMap() + if genAssetResponse.Assets != nil { + jobInput.Asset = genAssetResponse.Assets.ToJobSpec().ToMap() + } return jobInput, nil } -func createHookSubCommand(l logger, jobSpecFs afero.Fs, hookRepo models.HookRepo) *cli.Command { +func createHookSubCommand(l logger, jobSpecFs afero.Fs, pluginRepo models.PluginRepository) *cli.Command { cmd := &cli.Command{ Use: "hook", Short: "create a new Hook", @@ -311,7 +320,7 @@ func createHookSubCommand(l logger, jobSpecFs afero.Fs, hookRepo models.HookRepo var jobSpecRepo JobSpecRepository jobSpecRepo = local.NewJobSpecRepository( jobSpecFs, - local.NewJobSpecAdapter(models.TaskRegistry, models.HookRegistry), + local.NewJobSpecAdapter(pluginRepo), ) selectJobName, err := selectJobSurvey(jobSpecRepo) @@ -322,7 +331,7 @@ func createHookSubCommand(l logger, jobSpecFs afero.Fs, hookRepo models.HookRepo if err != nil { return err } - jobSpec, err = createHookSurvey(jobSpec, hookRepo) + jobSpec, err = createHookSurvey(jobSpec, pluginRepo) if err != nil { return err } @@ -337,18 +346,14 @@ func createHookSubCommand(l logger, jobSpecFs afero.Fs, hookRepo models.HookRepo return cmd } -func createHookSurvey(jobSpec models.JobSpec, hookRepo models.HookRepo) (models.JobSpec, error) { +func createHookSurvey(jobSpec models.JobSpec, pluginRepo models.PluginRepository) (models.JobSpec, error) { emptyJobSpec := models.JobSpec{} var availableHooks []string - for _, hook := range hookRepo.GetAll() { - schema, err := hook.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return models.JobSpec{}, err - } - - // TODO: this should be generated at runtime based on what base task is - // selected, support it when we add more than one type of task - availableHooks = append(availableHooks, schema.Name) + for _, hook := range pluginRepo.GetHooks() { + availableHooks = append(availableHooks, hook.Info().Name) + } + if len(availableHooks) == 0 { + return emptyJobSpec, errors.New("no supported hook plugin found") } var qs = []*survey.Question{ @@ -375,38 +380,45 @@ func createHookSurvey(jobSpec models.JobSpec, hookRepo models.HookRepo) (models. return emptyJobSpec, errors.Errorf("hook %s already exists for this job", selectedHook) } - executionHook, err := hookRepo.GetByName(selectedHook) + executionHook, err := pluginRepo.GetByName(selectedHook) if err != nil { return emptyJobSpec, err } - taskQuesResponse, err := executionHook.GetHookQuestions(context.TODO(), models.GetHookQuestionsRequest{ - JobName: jobSpec.Name, - }) - if err != nil { - return emptyJobSpec, err - } - - userInputs := models.PluginAnswers{} - for _, ques := range taskQuesResponse.Questions { - responseAnswer, err := AskHookSurveyQuestion(ques, executionHook) + var jobSpecConfigs models.JobSpecConfigs + cliMod := executionHook.CLIMod + if cliMod != nil { + taskQuesResponse, err := cliMod.GetQuestions(context.Background(), models.GetQuestionsRequest{ + JobName: jobSpec.Name, + }) if err != nil { return emptyJobSpec, err } - userInputs = append(userInputs, responseAnswer...) - } - generateConfResponse, err := executionHook.DefaultHookConfig(context.TODO(), models.DefaultHookConfigRequest{ - Answers: userInputs, - TaskConfig: models.TaskPluginConfigs{}.FromJobSpec(jobSpec.Task.Config), - }) - if err != nil { - return emptyJobSpec, err - } + userInputs := models.PluginAnswers{} + if taskQuesResponse.Questions != nil { + for _, ques := range taskQuesResponse.Questions { + responseAnswer, err := AskCLISurveyQuestion(ques, cliMod) + if err != nil { + return emptyJobSpec, err + } + userInputs = append(userInputs, responseAnswer...) + } + } + generateConfResponse, err := cliMod.DefaultConfig(context.Background(), models.DefaultConfigRequest{ + Answers: userInputs, + }) + if err != nil { + return emptyJobSpec, err + } + if generateConfResponse.Config != nil { + jobSpecConfigs = generateConfResponse.Config.ToJobSpec() + } + } jobSpec.Hooks = append(jobSpec.Hooks, models.JobSpecHook{ Unit: executionHook, - Config: generateConfResponse.Config.ToJobSpec(), + Config: jobSpecConfigs, }) return jobSpec, nil } @@ -433,11 +445,7 @@ func selectJobSurvey(jobSpecRepo JobSpecRepository) (string, error) { func ifHookAlreadyExistsForJob(jobSpec models.JobSpec, newHookName string) bool { for _, hook := range jobSpec.Hooks { - schema, err := hook.Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return false - } - if schema.Name == newHookName { + if hook.Unit.Info().Name == newHookName { return true } } @@ -618,7 +626,7 @@ func getWindowParameters(winName string) local.JobTaskWindow { } } -func AskTaskSurveyQuestion(ques models.PluginQuestion, execUnit models.TaskPlugin) (models.PluginAnswers, error) { +func AskCLISurveyQuestion(ques models.PluginQuestion, cliMod models.CommandLineMod) (models.PluginAnswers, error) { var surveyPrompt survey.Prompt if len(ques.Multiselect) > 0 { sel := &survey.Select{ @@ -646,7 +654,7 @@ func AskTaskSurveyQuestion(ques models.PluginQuestion, execUnit models.TaskPlugi if err != nil { return err } - resp, err := execUnit.ValidateTaskQuestion(context.TODO(), models.ValidateTaskQuestionRequest{ + resp, err := cliMod.ValidateQuestion(context.TODO(), models.ValidateQuestionRequest{ Answer: models.PluginAnswer{ Question: ques, Value: str, @@ -674,75 +682,7 @@ func AskTaskSurveyQuestion(ques models.PluginQuestion, execUnit models.TaskPlugi for _, subQues := range ques.SubQuestions { if responseStr == subQues.IfValue { for _, subQ := range subQues.Questions { - subQuesAnswer, err := AskTaskSurveyQuestion(subQ, execUnit) - if err != nil { - return nil, err - } - answers = append(answers, subQuesAnswer...) - } - } - } - - return answers, nil -} - -func AskHookSurveyQuestion(ques models.PluginQuestion, execUnit models.HookPlugin) (models.PluginAnswers, error) { - var surveyPrompt survey.Prompt - if len(ques.Multiselect) > 0 { - sel := &survey.Select{ - Message: ques.Prompt, - Help: ques.Help, - Options: ques.Multiselect, - } - if len(ques.Default) > 0 { - sel.Default = ques.Default - } - surveyPrompt = sel - } else { - sel := &survey.Input{ - Message: ques.Prompt, - Help: ques.Help, - } - if len(ques.Default) > 0 { - sel.Default = ques.Default - } - surveyPrompt = sel - } - var responseStr string - if err := survey.AskOne(surveyPrompt, &responseStr, survey.WithValidator(func(val interface{}) error { - str, err := ConvertUserInputToString(val) - if err != nil { - return err - } - resp, err := execUnit.ValidateHookQuestion(context.TODO(), models.ValidateHookQuestionRequest{ - Answer: models.PluginAnswer{ - Question: ques, - Value: str, - }, - }) - if err != nil { - return err - } - if !resp.Success { - return errors.New(resp.Error) - } - return nil - })); err != nil { - return nil, errors.Wrap(err, "AskHookSurveyQuestion") - } - - answers := models.PluginAnswers{ - models.PluginAnswer{ - Question: ques, - Value: responseStr, - }, - } - - // check if sub questions are attached on this question - for _, subQues := range ques.SubQuestions { - if responseStr == subQues.IfValue { - for _, subQ := range subQues.Questions { - subQuesAnswer, err := AskHookSurveyQuestion(subQ, execUnit) + subQuesAnswer, err := AskCLISurveyQuestion(subQ, cliMod) if err != nil { return nil, err } diff --git a/cmd/deploy.go b/cmd/deploy.go index ca194cfb1f..f5ee2033c1 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -26,7 +26,7 @@ var ( // deployCommand pushes current repo to optimus service func deployCommand(l logger, conf config.Provider, jobSpecRepo JobSpecRepository, - datastoreRepo models.DatastoreRepo, datastoreSpecFs map[string]afero.Fs) *cli.Command { + pluginRepo models.PluginRepository, datastoreRepo models.DatastoreRepo, datastoreSpecFs map[string]afero.Fs) *cli.Command { var projectName string var namespace string var ignoreJobs bool @@ -51,7 +51,7 @@ func deployCommand(l logger, conf config.Provider, jobSpecRepo JobSpecRepository ignoreJobs = true } - if err := postDeploymentRequest(l, projectName, namespace, jobSpecRepo, conf, datastoreRepo, + if err := postDeploymentRequest(l, projectName, namespace, jobSpecRepo, conf, pluginRepo, datastoreRepo, datastoreSpecFs, ignoreJobs, ignoreResources); err != nil { return err } @@ -65,7 +65,7 @@ func deployCommand(l logger, conf config.Provider, jobSpecRepo JobSpecRepository // postDeploymentRequest send a deployment request to service func postDeploymentRequest(l logger, projectName string, namespace string, jobSpecRepo JobSpecRepository, - conf config.Provider, datastoreRepo models.DatastoreRepo, datastoreSpecFs map[string]afero.Fs, + conf config.Provider, pluginRepo models.PluginRepository, datastoreRepo models.DatastoreRepo, datastoreSpecFs map[string]afero.Fs, ignoreJobDeployment, ignoreResources bool) (err error) { dialTimeoutCtx, dialCancel := context.WithTimeout(context.Background(), OptimusDialTimeout) defer dialCancel() @@ -83,7 +83,7 @@ func postDeploymentRequest(l logger, projectName string, namespace string, jobSp defer deployCancel() runtime := pb.NewRuntimeServiceClient(conn) - adapt := v1handler.NewAdapter(models.TaskRegistry, models.HookRegistry, datastoreRepo) + adapt := v1handler.NewAdapter(pluginRepo, datastoreRepo) // update project config if needed registerResponse, err := runtime.RegisterProject(deployTimeoutCtx, &pb.RegisterProjectRequest{ @@ -181,7 +181,7 @@ func postDeploymentRequest(l logger, projectName string, namespace string, jobSp return err } - adaptedJobSpecs := []*pb.JobSpecification{} + var adaptedJobSpecs []*pb.JobSpecification for _, spec := range jobSpecs { adaptJob, err := adapt.ToJobProto(spec) if err != nil { diff --git a/cmd/server/server.go b/cmd/server/server.go index 7fbb818be8..6dcac61382 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -73,7 +73,7 @@ type projectJobSpecRepoFactory struct { } func (fac *projectJobSpecRepoFactory) New(project models.ProjectSpec) store.ProjectJobSpecRepository { - return postgres.NewProjectJobSpecRepository(fac.db, project, postgres.NewAdapter(models.TaskRegistry, models.HookRegistry)) + return postgres.NewProjectJobSpecRepository(fac.db, project, postgres.NewAdapter(models.PluginRegistry)) } type replaySpecRepoRepository struct { @@ -82,7 +82,7 @@ type replaySpecRepoRepository struct { } func (fac *replaySpecRepoRepository) New(job models.JobSpec) store.ReplaySpecRepository { - return postgres.NewReplayRepository(fac.db, job, postgres.NewAdapter(models.TaskRegistry, models.HookRegistry)) + return postgres.NewReplayRepository(fac.db, job, postgres.NewAdapter(models.PluginRegistry)) } // jobSpecRepoFactory stores raw specifications @@ -96,7 +96,7 @@ func (fac *jobSpecRepoFactory) New(namespace models.NamespaceSpec) job.SpecRepos fac.db, namespace, fac.projectJobSpecRepoFac.New(namespace.ProjectSpec), - postgres.NewAdapter(models.TaskRegistry, models.HookRegistry), + postgres.NewAdapter(models.PluginRegistry), ) } @@ -163,7 +163,7 @@ type instanceRepoFactory struct { } func (fac *instanceRepoFactory) New(spec models.JobSpec) store.InstanceSpecRepository { - return postgres.NewInstanceRepository(fac.db, spec, postgres.NewAdapter(models.TaskRegistry, models.HookRegistry)) + return postgres.NewInstanceRepository(fac.db, spec, postgres.NewAdapter(models.PluginRegistry)) } // projectResourceSpecRepoFactory stores raw resource specifications at a project level @@ -444,7 +444,7 @@ func Initialize(conf config.Provider) error { projectRepoFac, namespaceSpecRepoFac, projectSecretRepoFac, - v1.NewAdapter(models.TaskRegistry, models.HookRegistry, models.DatastoreRegistry), + v1.NewAdapter(models.PluginRegistry, models.DatastoreRegistry), progressObs, instance.NewService( &instanceRepoFactory{ @@ -480,10 +480,10 @@ func Initialize(conf config.Provider) error { // base router baseMux := http.NewServeMux() - baseMux.HandleFunc("/ping", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + baseMux.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "pong") - })) - baseMux.Handle("/", gwmux) + }) + baseMux.Handle("/api/", http.StripPrefix("/api", gwmux)) srv := &http.Server{ Handler: grpcHandlerFunc(grpcServer, baseMux), @@ -535,7 +535,6 @@ func Initialize(conf config.Provider) error { } mainLog.Info("bye") - return terminalError } diff --git a/cmd/validate.go b/cmd/validate.go index 1ee6573ff6..2fc5329c64 100644 --- a/cmd/validate.go +++ b/cmd/validate.go @@ -20,18 +20,18 @@ const ( validateTimeout = time.Minute * 3 ) -func validateCommand(l logger, host string, jobSpecRepo JobSpecRepository) *cli.Command { +func validateCommand(l logger, host string, pluginRepo models.PluginRepository, jobSpecRepo JobSpecRepository) *cli.Command { cmd := &cli.Command{ Use: "validate", Short: "check if specifications are valid for deployment", } if jobSpecRepo != nil { - cmd.AddCommand(validateJobCommand(l, host, jobSpecRepo)) + cmd.AddCommand(validateJobCommand(l, host, pluginRepo, jobSpecRepo)) } return cmd } -func validateJobCommand(l logger, host string, jobSpecRepo JobSpecRepository) *cli.Command { +func validateJobCommand(l logger, host string, pluginRepo models.PluginRepository, jobSpecRepo JobSpecRepository) *cli.Command { var projectName string var namespace string cmd := &cli.Command{ @@ -50,7 +50,7 @@ func validateJobCommand(l logger, host string, jobSpecRepo JobSpecRepository) *c if err != nil { return err } - if err := validateJobSpecificationRequest(l, projectName, namespace, jobSpecs, host); err != nil { + if err := validateJobSpecificationRequest(l, projectName, namespace, pluginRepo, jobSpecs, host); err != nil { return err } l.Println("jobs successfully validated") @@ -62,8 +62,9 @@ func validateJobCommand(l logger, host string, jobSpecRepo JobSpecRepository) *c return cmd } -func validateJobSpecificationRequest(l logger, projectName string, namespace string, jobSpecs []models.JobSpec, host string) (err error) { - adapt := v1handler.NewAdapter(models.TaskRegistry, models.HookRegistry, models.DatastoreRegistry) +func validateJobSpecificationRequest(l logger, projectName string, namespace string, + pluginRepo models.PluginRepository, jobSpecs []models.JobSpec, host string) (err error) { + adapt := v1handler.NewAdapter(pluginRepo, models.DatastoreRegistry) dialTimeoutCtx, dialCancel := context.WithTimeout(context.Background(), OptimusDialTimeout) defer dialCancel() diff --git a/cmd/version.go b/cmd/version.go index 61f619d580..9358f76b29 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -5,6 +5,8 @@ import ( "fmt" "time" + "github.com/odpf/optimus/models" + "github.com/odpf/optimus/config" pb "github.com/odpf/optimus/api/proto/odpf/optimus" @@ -17,7 +19,7 @@ const ( versionTimeout = time.Second * 2 ) -func versionCommand(l logger, host string) *cli.Command { +func versionCommand(l logger, host string, pluginRepo models.PluginRepository) *cli.Command { var serverVersion bool c := &cli.Command{ Use: "version", @@ -32,6 +34,24 @@ func versionCommand(l logger, host string) *cli.Command { } l.Printf("server: %s", coloredNotice(srvVer)) } + + l.Println("\nDiscovered plugins:") + for taskIdx, tasks := range pluginRepo.GetAll() { + schema := tasks.Info() + l.Printf("%d. %s\n", taskIdx+1, schema.Name) + l.Printf("Description: %s\n", schema.Description) + l.Printf("Image: %s\n", schema.Image) + l.Printf("Type: %s\n", schema.PluginType) + l.Printf("Plugin version: %s\n", schema.PluginVersion) + l.Printf("Plugin mods: %v\n", schema.PluginMods) + if schema.HookType != "" { + l.Printf("Hook type: %s\n", schema.HookType) + } + if len(schema.DependsOn) != 0 { + l.Printf("Depends on: %v\n", schema.DependsOn) + } + l.Println("") + } return nil }, } diff --git a/docs/docs/development/task-plugin.md b/docs/docs/development/building-plugin.md similarity index 71% rename from docs/docs/development/task-plugin.md rename to docs/docs/development/building-plugin.md index 0109f884dc..07a2d692bc 100644 --- a/docs/docs/development/task-plugin.md +++ b/docs/docs/development/building-plugin.md @@ -1,6 +1,6 @@ --- -id: task-plugin -title: Developing task plugin +id: building-plugin +title: Developing plugins --- Optimus's responsibilities are currently divided in two parts, scheduling a transformation [task](../concepts/overview.md#Job) and running one time action to create or modify a [datastore](../concepts/overview.md#Datastore) resource. Defining how a datastore is managed can be easy and doesn't leave many options for configuration or ambiguity although the way datastores are implemented gives developers flexibility to contribute additional type of datastore, but it is not something we do every day. @@ -15,38 +15,37 @@ Optimus can be divided in two logical parts when we are thinking of a pluggable At the moment mainly there are two types of plugins which optimus supports. These are : ***Hook*** and ***Task*** Before getting into the difference between two plugins ,we need to get familiar with [Jobs](../concepts/overview.md#Job). -| Type | Hook | Task | -|------------------------|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------| -| Definition | It is the operation that we preferably run before or after a Job. | It is the single base transformation in a Job. | -| Fundamental Difference | It can have dependencies over other hooks within the job. | It can have dependencies over other jobs inside the optimus project. | -| Configuration | It has its own set of configs and share the same asset folder as the base job. | It has its own set of configs and may share only the dependencies with the other jobs in the optimus project. | +| Type | Task | Hook | +| ---------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| Definition | It is the single base transformation in a Job. | It is the operation that we preferably run before or after a Job. | +| Fundamental Difference | It can have dependencies over other jobs inside the Optimus project. | It can have dependencies over other hooks within the job. | +| Configuration | It has its own set of configs and asset directory. | It has its own set of configs and share the same asset directory across all hooks as the base job. | -## Creating a task plugin +## Creating a plugin At the moment Optimus supports task as well as hook plugins. In this section we will be explaining how to write a new task although both are very similar. Plugins are implemented using [go-plugin](https://github.com/hashicorp/go-plugin) developed by Hashicorp used in terraform and other similar products. -> Plugins can be implemented in any language as long as they can be exported as a single self-contained executable binary. +> Plugins can be implemented in any language as long as they can be exported as a single self-contained executable binary and implements a GRPC server. -It is recommended to use Golang currently for writing plugins because of its cross platform build functionality and to reuse protobuf adapter provided -within Optimus core. Although the plugin is written in Golang, it will be just an adapter between what actually needs to be executed. Actual transformation will be packed in a docker image and Optimus will execute these arbitrary docker images as long as it has access to reach container registry. +It is recommended to use Go currently for writing plugins because of its cross platform build functionality and to reuse protobuf sdk provided within Optimus core. Although the plugin is written in Go, it will be just an adapter between what actually needs to be executed. Actual transformation will be packed in a docker image and Optimus will execute these arbitrary docker images as long as it has access to reach container registry. -> Task plugin binary itself is not executed for transformation but only used for adapting conditions which Optimus requires to be defined for each task. +> Plugin binary itself is not executed for transformation but only used for adapting conditions which Optimus requires to be defined for each task. -To demonstrate this wrapping functionality, lets create a plugin in Golang and use python for actual transformation logic. You can choose to fork this [example](https://github.com/kushsharma/optimus-plugins) template and modify it as per your needs or start fresh. To demonstrate how to start from scratch, will be starting from an empty git repository and build a plugin which will find potential hazardous **Near Earth Orbit** objects every day, lets call it **neo** for short. +To demonstrate this wrapping functionality, let's create a plugin in Go and use python for actual transformation logic. You can choose to fork this [example](https://github.com/kushsharma/optimus-plugins) template and modify it as per your needs or start fresh. To demonstrate how to start from scratch, we will be starting from an empty git repository and build a plugin which will find potential hazardous **Near Earth Orbit** objects every day, let's call it **neo** for short. Brief description of Neo is as follows -- Using [NASA API](https://api.nasa.gov/) we can get count of hazardous objects, there diameter and velocity. +- Using [NASA API](https://api.nasa.gov/) we can get count of hazardous objects, their diameter and velocity. - Task will need two config as input, `RANGE_START`, `RANGE_END` as date time string which will filter the count for this specific period only. -- Execute every day, lets say at 2 AM. -- Need a secret token that will be passed to nasa api endpoint for each request. +- Execute every day, say at 2 AM. +- Need a secret token that will be passed to NASA api endpoint for each request. - Output of this object count can be printed in logs for now but in a real use case can be pushed to Kafka topic or written to a database. -- Plugin will be written in **golang** and **Neo** in **python**. +- Plugin will be written in **Go** and **Neo** in **python**. -### Preparing task logic +### Preparing task executor -Start by initializing an empty git repository with the following folder structure +Start by initialising an empty git repository with the following folder structure ```shell .git @@ -64,7 +63,6 @@ That is three folders one inside another. This might look confusing for now, a l Add the following code to `main.py` ```python - import os import requests import json @@ -211,7 +209,7 @@ Now that base image is ready for execution, this needs to be scheduled at a fixe ### Implementing plugin interface -Because we are using golang, start by initializing go module in `neo` directory as follows +Because we are using Go, start by initialising Go module in `neo` directory as follows ```go go mod init github.com/kushsharma/optimus-plugins/task/neo @@ -244,48 +242,27 @@ import ( "context" "errors" "fmt" + "strconv" - "github.com/odpf/optimus/plugin" - + "github.com/hashicorp/go-hclog" "github.com/odpf/optimus/models" - "github.com/odpf/optimus/plugin/task" - - hplugin "github.com/hashicorp/go-plugin" + "github.com/odpf/optimus/plugin" + "github.com/odpf/optimus/plugin/base" ) var ( - Name = "neo" - DatetimeFormat = "2006-01-02" - Version = "latest" - Image = "ghcr.io/kushsharma/optimus-task-neo-executor" + Name = "neo" + Version = "latest" + Image = "ghcr.io/kushsharma/optimus-task-neo-executor" ) type Neo struct{} func main() { - neo := &Neo{} - - // start serving the plugin on a unix socket as a grpc server - hplugin.Serve(&hplugin.ServeConfig{ - - // this will be printed on stdout and will be piped to optimus core - HandshakeConfig: hplugin.HandshakeConfig{ - // Need to be set as needed - ProtocolVersion: 1, - - // Magic cookie key and value are just there to make sure you want to connect - // with optimus core, this is not authentication - MagicCookieKey: plugin.MagicCookieKey, - MagicCookieValue: plugin.MagicCookieValue, - }, - - // what are we serving on grpc - Plugins: map[string]hplugin.Plugin{ - plugin.TaskPluginName: &task.Plugin{Impl: neo}, - }, - - // default grpc server - GRPCServer: hplugin.DefaultGRPCServer, + plugin.Serve(func(log hclog.Logger) interface{} { + return &Neo{ + log: log, + } }) } ``` @@ -301,32 +278,116 @@ CORE-PROTOCOL-VERSION | APP-PROTOCOL-VERSION | NETWORK-TYPE | NETWORK-ADDR | PRO 1|1|tcp|127.0.0.1:1234|grpc -You don't have to worry about this if you are using the provided handshake struct. Core will initiate a connection with the plugin server as a client when the core binary boots and caches the connection for further internal use. +You don't have to worry about this if you are using the provided `plugin.Serve` and all this happens automatically behind the scene. Core will initiate a connection with the plugin server as a client when the core binary boots and caches the connection for further internal use. + +A single binary can serve more than one kind of plugin, in this example stick with just one. Each plugin is composed of one `base` plugin implementation and some additional optional `mods`. + +#### Base Plugin + +Base plugin interface needs to be [implemented](https://github.com/odpf/proton/blob/54e0bec2df4235cabea4ac2127534a468584e932/odpf/optimus/plugins/base.proto) by every plugin. It is responsible for providing plugin metadata to Optimus core. + +```protobuf +syntax = "proto3"; +package odpf.optimus.plugins; + +// Base must be implemented by all plugins +service Base { + // PluginInfo provides basic details for this plugin + rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse); +} + +// PluginType enumerates the type of plugins Optimus supports +enum PluginType { + PluginType_UNKNOWN = 0; + PluginType_TASK = 1; + PluginType_HOOK = 2; +} + +// PluginMod enumerates the type of mods this plugin supports +enum PluginMod { + PluginMod_UNKNOWN = 0; + PluginMod_CLI = 1; + PluginMod_DEPENDENCYRESOLVER = 2; +} + +// HookType enumerates the type of hook Optimus supports +enum HookType { + HookType_UNKNOWN = 0; + HookType_PRE = 1; + HookType_POST = 2; + HookType_FAIL = 3; +} + +message PluginInfoRequest {} +message PluginInfoResponse { + string name = 1; + string description = 2; + PluginType plugin_type = 3; + repeated PluginMod plugin_mods = 4; + + // plugin_version is the semver version of this individual plugin + string plugin_version = 5; + // api_versions indicates the versions of the Optimus Plugin API + // this plugin supports + repeated string api_version = 6; + + // docker image including version if this executes a docker image + string image = 10; + + // HOOK specific + // name of hooks on which this should depend on before executing + repeated string depends_on = 20; + HookType hook_type = 21; + + // Experimental + // will be mounted inside the container as volume + string secret_path = 30; +} +``` + +If your plugin simply wants to register itself as task or hook for execution and nothing else then that's it. You don't need to implement anything else but for additional features we can implement plugin `mod`. + +#### Plugin Mods + +Plugin can have none or many plugins mods being implemented at the same time. At the moment there are 2 mods available for usage + +1. [CLIMod](https://github.com/odpf/proton/blob/54e0bec2df4235cabea4ac2127534a468584e932/odpf/optimus/plugins/cli.proto): It provides plugin to interact with Optimus cli. Plugin can provide default configs, ask questions from users to create job specification, override default asset macro compilation behaviour, etc. +2. [DependencyResolverMod](https://github.com/odpf/proton/blob/54e0bec2df4235cabea4ac2127534a468584e932/odpf/optimus/plugins/dependency_resolver.proto): It provides plugin to implement automatic dependency resolution using assets/configs. -A single binary can serve more than one kind of plugin, in this example stick with just one. To start serving GRPC, either we write our own implementation for serialising/deserializing golang structs to protobufs or reuse the one already provided by [core](https://github.com/odpf/optimus/blob/eaa50bb37d7e738d9b8a94332312f34b04a7e16b/plugin/task/server.go). Optimus GRPC server adapter for protobuf accepts an [interface](https://github.com/odpf/optimus/blob/0ab5a4d44a7b2b85e9a160aef3648d8ba798536a/models/task.go) which we will implement next on Neo struct. Custom protobuf adapter can also be written using the [provided](https://github.com/odpf/proton/blob/e7fd43798f0c5bcf083c821cc98843639c3883fa/odpf/optimus/task_plugin.proto) protobuf stored in odpf [repository](https://github.com/odpf/proton). +In this example we will use the CLIMod. -Add the following code in the existing `main.go` as an implementation to [TaskPlugin](https://github.com/odpf/optimus/blob/0ab5a4d44a7b2b85e9a160aef3648d8ba798536a/models/task.go) +To start serving GRPC, either we write our own implementation for serialising/deserialising Go structs to protobufs or reuse the one already provided by [core](https://github.com/odpf/optimus/blob/eaa50bb37d7e738d9b8a94332312f34b04a7e16b/plugin/task/server.go). Optimus GRPC server accepts an interface which we will implement next on Neo struct. Custom protobuf adapter can also be written using the [provided](https://github.com/odpf/proton/blob/54e0bec2df4235cabea4ac2127534a468584e932/odpf/optimus/plugins/base.proto) protobuf stored in odpf [repository](https://github.com/odpf/proton). + +Add the following code in the existing `main.go` as an implementation to [BasePlugin](https://github.com/odpf/proton/blob/54e0bec2df4235cabea4ac2127534a468584e932/odpf/optimus/plugins/base.proto) ```go type Neo struct{} -// GetTaskSchema provides basic task details -func (n *Neo) GetTaskSchema(ctx context.Context, req models.GetTaskSchemaRequest) (models.GetTaskSchemaResponse, error) { - return models.GetTaskSchemaResponse{ - Name: Name, - Description: "Near earth object tracker", +// GetSchema provides basic task details +func (n *Neo) PluginInfo() (*models.PluginInfoResponse, error) { + return &models.PluginInfoResponse{ + Name: Name, + Description: "Near earth object tracker", + PluginType: models.PluginTypeTask, + PluginMods: []models.PluginMod{models.ModTypeCLI}, + PluginVersion: Version, + APIVersion: []string{strconv.Itoa(base.ProtocolVersion)}, // docker image that will be executed as the actual transformation task - Image: fmt.Sprintf("%s:%s", Image, Version), - - // this is where the secret required by docker container will be mounted + Image: fmt.Sprintf("%s:%s", Image, Version), + // this is where the secret required by docker container will be mounted SecretPath: "/tmp/key.json", }, nil } +``` + +You might have noticed we have specified at line number 9 that we are supporting `models.ModTypeCLI`. This will let Optimus know what all this plugin is capable of. Let's implement the [CLIMod](https://github.com/odpf/proton/blob/54e0bec2df4235cabea4ac2127534a468584e932/odpf/optimus/plugins/cli.proto) now. -// GetTaskQuestions provides questions asked via optimus cli when a new job spec + +```go +// GetQuestions provides questions asked via optimus cli when a new job spec // is requested to be created -func (n *Neo) GetTaskQuestions(ctx context.Context, req models.GetTaskQuestionsRequest) (models.GetTaskQuestionsResponse, error) { +func (n *Neo) GetQuestions(ctx context.Context, req models.GetQuestionsRequest) (*models.GetQuestionsResponse, error) { tQues := []models.PluginQuestion{ { Name: "Start", @@ -339,14 +400,14 @@ func (n *Neo) GetTaskQuestions(ctx context.Context, req models.GetTaskQuestionsR Help: "YYYY-MM-DD format", }, } - return models.GetTaskQuestionsResponse{ + return &models.GetQuestionsResponse{ Questions: tQues, }, nil } -// ValidateTaskQuestion validate how stupid user is -// Each question config in GetTaskQuestions will send a validation request -func (n *Neo) ValidateTaskQuestion(ctx context.Context, req models.ValidateTaskQuestionRequest) (models.ValidateTaskQuestionResponse, error) { +// ValidateQuestion validate how stupid user is +// Each question config in GetQuestions will send a validation request +func (n *Neo) ValidateQuestion(ctx context.Context, req models.ValidateQuestionRequest) (*models.ValidateQuestionResponse, error) { var err error switch req.Answer.Question.Name { case "Start": @@ -375,12 +436,12 @@ func (n *Neo) ValidateTaskQuestion(ctx context.Context, req models.ValidateTaskQ }(req.Answer.Value) } if err != nil { - return models.ValidateTaskQuestionResponse{ + return &models.ValidateQuestionResponse{ Success: false, Error: err.Error(), }, nil } - return models.ValidateTaskQuestionResponse{ + return &models.ValidateQuestionResponse{ Success: true, }, nil } @@ -394,14 +455,16 @@ func findAnswerByName(name string, answers []models.PluginAnswer) (models.Plugin return models.PluginAnswer{}, false } -// DefaultTaskConfig are a set of key value pair which will be embedded in job +// DefaultConfig are a set of key value pair which will be embedded in job // specification. These configs can be requested by the docker container before // execution -func (n *Neo) DefaultTaskConfig(ctx context.Context, request models.DefaultTaskConfigRequest) (models.DefaultTaskConfigResponse, error) { +// PluginConfig Value can contain valid go templates and they will be parsed at +// runtime +func (n *Neo) DefaultConfig(ctx context.Context, request models.DefaultConfigRequest) (*models.DefaultConfigResponse, error) { start, _ := findAnswerByName("Start", request.Answers) end, _ := findAnswerByName("End", request.Answers) - conf := []models.TaskPluginConfig{ + conf := []models.PluginConfig{ { Name: "RANGE_START", Value: start.Value, @@ -411,37 +474,24 @@ func (n *Neo) DefaultTaskConfig(ctx context.Context, request models.DefaultTaskC Value: end.Value, }, } - return models.DefaultTaskConfigResponse{ + return &models.DefaultConfigResponse{ Config: conf, }, nil } -// DefaultTaskAssets are a set of files which will be embedded in job +// DefaultAssets are a set of files which will be embedded in job // specification in assets folder. These configs can be requested by the // docker container before execution. -func (n *Neo) DefaultTaskAssets(ctx context.Context, _ models.DefaultTaskAssetsRequest) (models.DefaultTaskAssetsResponse, error) { - return models.DefaultTaskAssetsResponse{}, nil +func (n *Neo) DefaultAssets(ctx context.Context, _ models.DefaultAssetsRequest) (*models.DefaultAssetsResponse, error) { + return &models.DefaultAssetsResponse{}, nil } // override the compilation behaviour of assets - if needed -func (n *Neo) CompileTaskAssets(ctx context.Context, req models.CompileTaskAssetsRequest) (models.CompileTaskAssetsResponse, error) { - return models.CompileTaskAssetsResponse{ +func (n *Neo) CompileAssets(ctx context.Context, req models.CompileAssetsRequest) (*models.CompileAssetsResponse, error) { + return &models.CompileAssetsResponse{ Assets: req.Assets, }, nil } - -// a task should ideally always have a destination, it could be endpoint, table, bucket, etc -// in our case it is actually nothing -func (n *Neo) GenerateTaskDestination(ctx context.Context, request models.GenerateTaskDestinationRequest) (models.GenerateTaskDestinationResponse, error) { - return models.GenerateTaskDestinationResponse{ - Destination: "none", - }, nil -} - -// as this task doesn't need dependency resolution, just leaving this empty -func (n *Neo) GenerateTaskDependencies(ctx context.Context, request models.GenerateTaskDependenciesRequest) (response models.GenerateTaskDependenciesResponse, err error) { - return response, nil -} ``` @@ -450,9 +500,10 @@ All the functions are prefixed with comments to give you basic idea of what each Few things to note: -- `GetTaskSchema` is used to define a unique name used by your plugin to identify yourself, keep it simple. -- `GetTaskSchema` contains `Image` field that specify the docker image which Optimus will execute when needed. This is where the neo python image will go. +- `PluginInfo` is used to define a unique `name` used by your plugin to identify yourself, keep it simple. +- `PluginInfo` contains `Image` field that specify the docker image which Optimus will execute when needed. This is where the neo python image will go. - `Version` field can be injected using build system, here we are only keeping a default value. +- `PluginType` in `PluginInfo` will tell of this plugin should be read as `Task` or `Hook` by Optimus core. @@ -467,7 +518,7 @@ builds: - dir: ./task/neo main: . id: "neo" - binary: "optimus-task-neo_{{.Version}}_{{.Os}}_{{.Arch}}" + binary: "optimus-neo_{{.Os}}_{{.Arch}}" ldflags: - -s -w -X main.Version={{.Version}} -X main.Image=ghcr.io/kushsharma/optimus-task-neo-executor goos: @@ -530,7 +581,7 @@ Please go through goreleaser documentation to understand what this config is doi - It will build golang task plugin adapter for multiple platforms, archives them and release on Github - Build and push the docker image for the python neo task - Create a Formula for installing this plugin on Mac using brew -- Each plugin will follow the binary naming convention as `optimus-task-___`. For example: `optimus-task-bq2bq_0.0.1_linux_amd64` +- Each plugin will follow the binary naming convention as `optimus-__`. For example: `optimus-bq2bq_linux_amd64` Once installed, run goreleaser using @@ -745,4 +796,4 @@ data: key.json: base64encodedAPIkeygoes ``` -Notice the name of the secret `optimus-task-neo` which is actually based on a convention. That is if secret is defined, Optimus will look in kubernetes using `optimus-task-` as the secret name and mount it to the path provided in `SecretPath` field of `TaskSchema`. +Notice the name of the secret `optimus-task-neo` which is actually based on a convention. That is if secret is defined, Optimus will look in kubernetes using `optimus-task-` as the secret name and mount it to the path provided in `SecretPath` field of `PluginInfo`. diff --git a/docs/sidebars.js b/docs/sidebars.js index d501c6689e..281ac52b1c 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -43,7 +43,7 @@ module.exports = { { type: "category", label: "Development", - items: ["development/task-plugin"], + items: ["development/building-plugin"], }, { type: "category", diff --git a/ext/scheduler/airflow/compiler_test.go b/ext/scheduler/airflow/compiler_test.go index abf403c5d8..ca7541db8a 100644 --- a/ext/scheduler/airflow/compiler_test.go +++ b/ext/scheduler/airflow/compiler_test.go @@ -1,7 +1,6 @@ package airflow import ( - "context" _ "embed" "testing" "time" @@ -16,36 +15,35 @@ import ( var CompiledTemplate []byte func TestCompiler(t *testing.T) { - ctx := context.Background() - execUnit := new(mock.TaskPlugin) - execUnit.On("GetTaskSchema", ctx, models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit := new(mock.BasePlugin) + execUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "bq", Image: "example.io/namespace/image:latest", SecretPath: "/opt/optimus/secrets/auth.json", }, nil) transporterHook := "transporter" - hookUnit := new(mock.HookPlugin) - hookUnit.On("GetHookSchema", ctx, models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ + hookUnit := new(mock.BasePlugin) + hookUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: transporterHook, - Type: models.HookTypePre, + HookType: models.HookTypePre, Image: "example.io/namespace/hook-image:latest", SecretPath: "/tmp/auth.json", }, nil) predatorHook := "predator" - hookUnit2 := new(mock.HookPlugin) - hookUnit2.On("GetHookSchema", ctx, models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: predatorHook, - Type: models.HookTypePost, - Image: "example.io/namespace/predator-image:latest", + hookUnit2 := new(mock.BasePlugin) + hookUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: predatorHook, + HookType: models.HookTypePost, + Image: "example.io/namespace/predator-image:latest", }, nil) - hookUnit3 := new(mock.HookPlugin) - hookUnit3.On("GetHookSchema", ctx, models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: "hook-for-fail", - Type: models.HookTypeFail, - Image: "example.io/namespace/fail-image:latest", + hookUnit3 := new(mock.BasePlugin) + hookUnit3.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: "hook-for-fail", + HookType: models.HookTypeFail, + Image: "example.io/namespace/fail-image:latest", }, nil) projSpec := models.ProjectSpec{ @@ -73,7 +71,7 @@ func TestCompiler(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, @@ -95,7 +93,7 @@ func TestCompiler(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, @@ -113,7 +111,7 @@ func TestCompiler(t *testing.T) { Value: "event_timestamp > 10000", }, }, - Unit: hookUnit, + Unit: &models.Plugin{Base: hookUnit}, DependsOn: nil, } hook2 := models.JobSpecHook{ @@ -123,11 +121,11 @@ func TestCompiler(t *testing.T) { Value: "event_timestamp > 10000", }, }, - Unit: hookUnit2, + Unit: &models.Plugin{Base: hookUnit2}, DependsOn: []*models.JobSpecHook{&hook1}, } hook3 := models.JobSpecHook{ - Unit: hookUnit3, + Unit: &models.Plugin{Base: hookUnit3}, } spec := models.JobSpec{ Name: "foo", @@ -142,7 +140,7 @@ func TestCompiler(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, diff --git a/ext/scheduler/airflow/resources/base_dag.py b/ext/scheduler/airflow/resources/base_dag.py index 9f53f0b248..3be5ba5d23 100644 --- a/ext/scheduler/airflow/resources/base_dag.py +++ b/ext/scheduler/airflow/resources/base_dag.py @@ -1,3 +1,5 @@ +# Code generated by optimus {{.Version}}. DO NOT EDIT. + from typing import Any, Callable, Dict, Optional from datetime import datetime, timedelta, timezone @@ -41,7 +43,7 @@ catchup ={{ if .Job.Behavior.CatchUp }} True{{ else }} False{{ end }} ) -{{$baseTaskSchema := .Job.Task.Unit.GetTaskSchema $.Context $.TaskSchemaRequest -}} +{{$baseTaskSchema := .Job.Task.Unit.Info -}} {{ if ne $baseTaskSchema.SecretPath "" -}} transformation_secret = Secret( "volume", @@ -78,7 +80,7 @@ # hooks loop start {{ range $_, $t := .Job.Hooks }} -{{ $hookSchema := $t.Unit.GetHookSchema $.Context $.HookSchemaRequest -}} +{{ $hookSchema := $t.Unit.Info -}} {{- if ne $hookSchema.SecretPath "" -}} hook_{{$hookSchema.Name | replace "-" "_"}}_secret = Secret( "volume", @@ -109,7 +111,7 @@ "SCHEDULED_AT":'{{ "{{ next_execution_date }}" }}', # rest of the env vars are pulled from the container by making a GRPC call to optimus }, - {{ if eq $hookSchema.Type $.HookTypeFail -}} + {{ if eq $hookSchema.HookType $.HookTypeFail -}} trigger_rule="one_failed", {{ end -}} reattach_on_restart=True @@ -121,7 +123,7 @@ # create upstream sensors {{ $baseWindow := $.Job.Task.Window }} {{- range $_, $dependency := $.Job.Dependencies}} -{{- $dependencySchema := $dependency.Job.Task.Unit.GetTaskSchema $.Context $.TaskSchemaRequest }} +{{- $dependencySchema := $dependency.Job.Task.Unit.Info }} {{- if eq $dependency.Type $.JobSpecDependencyTypeIntra }} wait_{{$dependency.Job.Name | replace "-" "__dash__" | replace "." "__dot__"}} = SuperExternalTaskSensor( @@ -160,37 +162,37 @@ # set inter-dependencies between task and hooks {{- range $_, $task := .Job.Hooks }} -{{- $hookSchema := $task.Unit.GetHookSchema $.Context $.HookSchemaRequest }} -{{- if eq $hookSchema.Type $.HookTypePre }} +{{- $hookSchema := $task.Unit.Info }} +{{- if eq $hookSchema.HookType $.HookTypePre }} hook_{{$hookSchema.Name | replace "-" "__dash__"}} >> transformation_{{$baseTaskSchema.Name | replace "-" "__dash__" | replace "." "__dot__"}} {{- end -}} -{{- if eq $hookSchema.Type $.HookTypePost }} +{{- if eq $hookSchema.HookType $.HookTypePost }} transformation_{{$baseTaskSchema.Name | replace "-" "__dash__" | replace "." "__dot__"}} >> hook_{{$hookSchema.Name | replace "-" "__dash__"}} {{- end -}} -{{- if eq $hookSchema.Type $.HookTypeFail }} +{{- if eq $hookSchema.HookType $.HookTypeFail }} transformation_{{$baseTaskSchema.Name | replace "-" "__dash__" | replace "." "__dot__"}} >> hook_{{$hookSchema.Name | replace "-" "__dash__"}} {{- end -}} {{- end }} # set inter-dependencies between hooks and hooks {{- range $_, $t := .Job.Hooks }} -{{- $hookSchema := $t.Unit.GetHookSchema $.Context $.HookSchemaRequest }} +{{- $hookSchema := $t.Unit.Info }} {{- range $_, $depend := $t.DependsOn }} -{{- $dependHookSchema := $depend.Unit.GetHookSchema $.Context $.HookSchemaRequest }} +{{- $dependHookSchema := $depend.Unit.Info }} hook_{{$dependHookSchema.Name | replace "-" "__dash__"}} >> hook_{{$hookSchema.Name | replace "-" "__dash__"}} {{- end }} {{- end }} # arrange failure hook after post hooks {{- range $_, $task := .Job.Hooks -}} -{{- $hookSchema := $task.Unit.GetHookSchema $.Context $.HookSchemaRequest }} +{{- $hookSchema := $task.Unit.Info }} -{{- if eq $hookSchema.Type $.HookTypePost }} +{{- if eq $hookSchema.HookType $.HookTypePost }} hook_{{$hookSchema.Name | replace "-" "__dash__"}} >> [ {{- range $_, $ftask := $.Job.Hooks }} -{{- $fhookSchema := $ftask.Unit.GetHookSchema $.Context $.HookSchemaRequest }} -{{- if eq $fhookSchema.Type $.HookTypeFail }} hook_{{$fhookSchema.Name | replace "-" "__dash__"}}, {{- end -}} +{{- $fhookSchema := $ftask.Unit.Info }} +{{- if eq $fhookSchema.HookType $.HookTypeFail }} hook_{{$fhookSchema.Name | replace "-" "__dash__"}}, {{- end -}} {{- end -}} ] diff --git a/ext/scheduler/airflow/resources/expected_compiled_template.py b/ext/scheduler/airflow/resources/expected_compiled_template.py index fcc2495056..77f79d3299 100644 --- a/ext/scheduler/airflow/resources/expected_compiled_template.py +++ b/ext/scheduler/airflow/resources/expected_compiled_template.py @@ -1,3 +1,5 @@ +# Code generated by optimus dev. DO NOT EDIT. + from typing import Any, Callable, Dict, Optional from datetime import datetime, timedelta, timezone diff --git a/ext/scheduler/airflow2/compiler_test.go b/ext/scheduler/airflow2/compiler_test.go index 8754f2dcf1..1f0924619b 100644 --- a/ext/scheduler/airflow2/compiler_test.go +++ b/ext/scheduler/airflow2/compiler_test.go @@ -1,7 +1,6 @@ package airflow2 import ( - "context" _ "embed" "testing" "time" @@ -16,36 +15,35 @@ import ( var CompiledTemplate []byte func TestCompiler(t *testing.T) { - ctx := context.Background() - execUnit := new(mock.TaskPlugin) - execUnit.On("GetTaskSchema", ctx, models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit := new(mock.BasePlugin) + execUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "bq", Image: "example.io/namespace/image:latest", SecretPath: "/opt/optimus/secrets/auth.json", }, nil) transporterHook := "transporter" - hookUnit := new(mock.HookPlugin) - hookUnit.On("GetHookSchema", ctx, models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ + hookUnit := new(mock.BasePlugin) + hookUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: transporterHook, - Type: models.HookTypePre, + HookType: models.HookTypePre, Image: "example.io/namespace/hook-image:latest", SecretPath: "/opt/optimus/secrets/auth.json", }, nil) predatorHook := "predator" - hookUnit2 := new(mock.HookPlugin) - hookUnit2.On("GetHookSchema", ctx, models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: predatorHook, - Type: models.HookTypePost, - Image: "example.io/namespace/predator-image:latest", + hookUnit2 := new(mock.BasePlugin) + hookUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: predatorHook, + HookType: models.HookTypePost, + Image: "example.io/namespace/predator-image:latest", }, nil) - hookUnit3 := new(mock.HookPlugin) - hookUnit3.On("GetHookSchema", ctx, models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: "hook-for-fail", - Type: models.HookTypeFail, - Image: "example.io/namespace/fail-image:latest", + hookUnit3 := new(mock.BasePlugin) + hookUnit3.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: "hook-for-fail", + HookType: models.HookTypeFail, + Image: "example.io/namespace/fail-image:latest", }, nil) projSpec := models.ProjectSpec{ @@ -73,7 +71,7 @@ func TestCompiler(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, @@ -95,7 +93,7 @@ func TestCompiler(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, @@ -113,7 +111,7 @@ func TestCompiler(t *testing.T) { Value: "event_timestamp > 10000", }, }, - Unit: hookUnit, + Unit: &models.Plugin{Base: hookUnit}, DependsOn: nil, } hook2 := models.JobSpecHook{ @@ -123,12 +121,12 @@ func TestCompiler(t *testing.T) { Value: "event_timestamp > 10000", }, }, - Unit: hookUnit2, + Unit: &models.Plugin{Base: hookUnit2}, DependsOn: []*models.JobSpecHook{&hook1}, } hook3 := models.JobSpecHook{ Config: []models.JobSpecConfigItem{}, - Unit: hookUnit3, + Unit: &models.Plugin{Base: hookUnit3}, } spec := models.JobSpec{ Name: "foo", @@ -155,7 +153,7 @@ func TestCompiler(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, diff --git a/ext/scheduler/airflow2/resources/base_dag.py b/ext/scheduler/airflow2/resources/base_dag.py index 61f550527f..ff61b140f0 100644 --- a/ext/scheduler/airflow2/resources/base_dag.py +++ b/ext/scheduler/airflow2/resources/base_dag.py @@ -1,3 +1,5 @@ +# Code generated by optimus {{.Version}}. DO NOT EDIT. + from typing import Any, Callable, Dict, Optional from datetime import datetime, timedelta, timezone @@ -42,7 +44,7 @@ catchup = {{ if .Job.Behavior.CatchUp -}} True{{- else -}} False {{- end }} ) -{{$baseTaskSchema := .Job.Task.Unit.GetTaskSchema $.Context $.TaskSchemaRequest -}} +{{$baseTaskSchema := .Job.Task.Unit.Info -}} {{ if ne $baseTaskSchema.SecretPath "" -}} transformation_secret = Secret( "volume", @@ -83,7 +85,7 @@ # hooks loop start {{ range $_, $t := .Job.Hooks }} -{{ $hookSchema := $t.Unit.GetHookSchema $.Context $.HookSchemaRequest -}} +{{ $hookSchema := $t.Unit.Info -}} {{ if ne $hookSchema.SecretPath "" -}} hook_{{$hookSchema.Name | replace "-" "_"}}_secret = Secret( @@ -119,7 +121,7 @@ k8s.V1EnvVar(name="SCHEDULED_AT",value='{{ "{{ next_execution_date }}" }}'), # rest of the env vars are pulled from the container by making a GRPC call to optimus ], - {{ if eq $hookSchema.Type $.HookTypeFail -}} + {{ if eq $hookSchema.HookType $.HookTypeFail -}} trigger_rule="one_failed", {{ end -}} reattach_on_restart=True @@ -131,7 +133,7 @@ # create upstream sensors {{ $baseWindow := $.Job.Task.Window }} {{- range $_, $dependency := $.Job.Dependencies}} -{{- $dependencySchema := $dependency.Job.Task.Unit.GetTaskSchema $.Context $.TaskSchemaRequest }} +{{- $dependencySchema := $dependency.Job.Task.Unit.Info }} {{- if eq $dependency.Type $.JobSpecDependencyTypeIntra }} wait_{{$dependency.Job.Name | replace "-" "__dash__" | replace "." "__dot__"}} = SuperExternalTaskSensor( @@ -170,37 +172,37 @@ # set inter-dependencies between task and hooks {{- range $_, $task := .Job.Hooks }} -{{- $hookSchema := $task.Unit.GetHookSchema $.Context $.HookSchemaRequest }} -{{- if eq $hookSchema.Type $.HookTypePre }} +{{- $hookSchema := $task.Unit.Info }} +{{- if eq $hookSchema.HookType $.HookTypePre }} hook_{{$hookSchema.Name | replace "-" "__dash__"}} >> transformation_{{$baseTaskSchema.Name | replace "-" "__dash__" | replace "." "__dot__"}} {{- end -}} -{{- if eq $hookSchema.Type $.HookTypePost }} +{{- if eq $hookSchema.HookType $.HookTypePost }} transformation_{{$baseTaskSchema.Name | replace "-" "__dash__" | replace "." "__dot__"}} >> hook_{{$hookSchema.Name | replace "-" "__dash__"}} {{- end -}} -{{- if eq $hookSchema.Type $.HookTypeFail }} +{{- if eq $hookSchema.HookType $.HookTypeFail }} transformation_{{$baseTaskSchema.Name | replace "-" "__dash__" | replace "." "__dot__"}} >> hook_{{$hookSchema.Name | replace "-" "__dash__"}} {{- end -}} {{- end }} # set inter-dependencies between hooks and hooks {{- range $_, $t := .Job.Hooks }} -{{- $hookSchema := $t.Unit.GetHookSchema $.Context $.HookSchemaRequest }} +{{- $hookSchema := $t.Unit.Info }} {{- range $_, $depend := $t.DependsOn }} -{{- $dependHookSchema := $depend.Unit.GetHookSchema $.Context $.HookSchemaRequest }} +{{- $dependHookSchema := $depend.Unit.Info }} hook_{{$dependHookSchema.Name | replace "-" "__dash__"}} >> hook_{{$hookSchema.Name | replace "-" "__dash__"}} {{- end }} {{- end }} # arrange failure hook after post hooks {{- range $_, $task := .Job.Hooks -}} -{{- $hookSchema := $task.Unit.GetHookSchema $.Context $.HookSchemaRequest }} +{{- $hookSchema := $task.Unit.Info }} -{{- if eq $hookSchema.Type $.HookTypePost }} +{{- if eq $hookSchema.HookType $.HookTypePost }} hook_{{$hookSchema.Name | replace "-" "__dash__"}} >> [ {{- range $_, $ftask := $.Job.Hooks }} -{{- $fhookSchema := $ftask.Unit.GetHookSchema $.Context $.HookSchemaRequest }} -{{- if eq $fhookSchema.Type $.HookTypeFail }} hook_{{$fhookSchema.Name | replace "-" "__dash__"}}, {{- end -}} +{{- $fhookSchema := $ftask.Unit.Info }} +{{- if eq $fhookSchema.HookType $.HookTypeFail }} hook_{{$fhookSchema.Name | replace "-" "__dash__"}}, {{- end -}} {{- end -}} ] diff --git a/ext/scheduler/airflow2/resources/expected_compiled_template.py b/ext/scheduler/airflow2/resources/expected_compiled_template.py index 0173de092b..ea9ee070ef 100644 --- a/ext/scheduler/airflow2/resources/expected_compiled_template.py +++ b/ext/scheduler/airflow2/resources/expected_compiled_template.py @@ -1,3 +1,5 @@ +# Code generated by optimus dev. DO NOT EDIT. + from typing import Any, Callable, Dict, Optional from datetime import datetime, timedelta, timezone diff --git a/instance/context.go b/instance/context.go index ac081fbd5c..4510cc2eb9 100644 --- a/instance/context.go +++ b/instance/context.go @@ -31,6 +31,8 @@ var ( // Raw task assets may not be executable in there default state and needs to be // transformed before they can work as inputs. Input could be through // environment variables or as a file. +// It exposes .proj, .inst, .task variable names containing configs that can be +// used in job specification type ContextManager struct { namespace models.NamespaceSpec jobSpec models.JobSpec @@ -45,40 +47,35 @@ func (fm *ContextManager) Generate( runType models.InstanceType, runName string, ) (envMap map[string]string, fileMap map[string]string, err error) { - // project configs will be used for templating - // prefix project configs to avoid conflicts with project/instance configs - projectConfig := map[string]string{} - for key, val := range fm.getProjectConfigMap() { - projectConfig[fmt.Sprintf("%s%s", ProjectConfigPrefix, key)] = val - } - - // use namespace configs for templating. also, override project config with - // namespace's configs when present - for key, val := range fm.getNamespaceConfigMap() { - projectConfig[fmt.Sprintf("%s%s", ProjectConfigPrefix, key)] = val - } + projectPrefixedConfig, projRawConfig := fm.projectEnvs() // instance env will be used for templating instanceEnvMap, instanceFileMap := fm.getInstanceData(instanceSpec) // merge both - projectInstanceContext := MergeStringMap(instanceEnvMap, projectConfig) + projectInstanceContext := MergeInterfaceMapToInterface(instanceEnvMap, projectPrefixedConfig) + projectInstanceContext["proj"] = projRawConfig + projectInstanceContext["inst"] = instanceEnvMap // prepare configs envMap, err = fm.generateEnvs(runName, runType, projectInstanceContext) - - // transformation may need instance variables as well - envMap = MergeStringMap(envMap, instanceEnvMap) if err != nil { - return + return nil, nil, err + } + + // append instance envMap + for k, v := range instanceEnvMap { + if vs, ok := v.(string); ok { + envMap[k] = vs + } } // do the same for asset files // check if task needs to override the compilation behaviour - compiledAssetResponse, err := fm.jobSpec.Task.Unit.CompileTaskAssets(context.TODO(), models.CompileTaskAssetsRequest{ - TaskWindow: fm.jobSpec.Task.Window, - Config: models.TaskPluginConfigs{}.FromJobSpec(fm.jobSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(fm.jobSpec.Assets), + compiledAssetResponse, err := fm.jobSpec.Task.Unit.CLIMod.CompileAssets(context.Background(), models.CompileAssetsRequest{ + Window: fm.jobSpec.Task.Window, + Config: models.PluginConfigs{}.FromJobSpec(fm.jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(fm.jobSpec.Assets), InstanceSchedule: instanceSpec.ScheduledAt, InstanceData: instanceSpec.Data, }) @@ -88,14 +85,33 @@ func (fm *ContextManager) Generate( // append job spec assets to list of files need to write fileMap = MergeStringMap(instanceFileMap, compiledAssetResponse.Assets.ToJobSpec().ToMap()) - if fileMap, err = fm.engine.CompileFiles(fileMap, ConvertStringToInterfaceMap(projectInstanceContext)); err != nil { + if fileMap, err = fm.engine.CompileFiles(fileMap, projectInstanceContext); err != nil { return } return envMap, fileMap, nil } +func (fm *ContextManager) projectEnvs() (map[string]interface{}, map[string]interface{}) { + // project configs will be used for templating + // prefix project configs to avoid conflicts with project/instance configs + projectPrefixedConfig := map[string]interface{}{} + projRawConfig := map[string]interface{}{} + for key, val := range fm.getProjectConfigMap() { + projectPrefixedConfig[fmt.Sprintf("%s%s", ProjectConfigPrefix, key)] = val + projRawConfig[key] = val + } + + // use namespace configs for templating. also, override project config with + // namespace's configs when present + for key, val := range fm.getNamespaceConfigMap() { + projectPrefixedConfig[fmt.Sprintf("%s%s", ProjectConfigPrefix, key)] = val + projRawConfig[key] = val + } + return projectPrefixedConfig, projRawConfig +} + func (fm *ContextManager) generateEnvs(runName string, runType models.InstanceType, - projectInstanceContext map[string]string) (map[string]string, error) { + projectInstanceContext map[string]interface{}) (map[string]string, error) { transformationConfigs, hookConfigs, err := fm.getConfigMaps(fm.jobSpec, runName, runType) if err != nil { return nil, err @@ -108,28 +124,33 @@ func (fm *ContextManager) generateEnvs(runName string, runType models.InstanceTy // if this is requested for transformation, just return from here if runType == models.InstanceTypeTask { - return transformationConfigs, nil + return MergeInterfaceMapToString(transformationConfigs, nil), nil } // prefix transformation configs to avoid conflicts with project/instance configs - prefixedTransformationConfigs := map[string]string{} - for key, val := range transformationConfigs { - prefixedTransformationConfigs[fmt.Sprintf("%s%s", TaskConfigPrefix, key)] = val + prefixedTransformationConfigs := map[string]interface{}{} + for k, v := range transformationConfigs { + prefixedTransformationConfigs[fmt.Sprintf("%s%s", TaskConfigPrefix, k)] = v } // templatize configs of hook with transformation, project and instance - projectInstanceTransformationConfigs := MergeStringMap(projectInstanceContext, prefixedTransformationConfigs) + projectInstanceTransformationConfigs := MergeInterfaceMapToInterface(projectInstanceContext, prefixedTransformationConfigs) + projectInstanceTransformationConfigs["task"] = transformationConfigs if hookConfigs, err = fm.compileTemplates(hookConfigs, projectInstanceTransformationConfigs); err != nil { return nil, err } // merge transformation and hook configs - return MergeStringMap(prefixedTransformationConfigs, hookConfigs), nil + return MergeInterfaceMapToString(prefixedTransformationConfigs, hookConfigs), nil } -func (fm *ContextManager) compileTemplates(templateValueMap, templateContext map[string]string) (map[string]string, error) { +func (fm *ContextManager) compileTemplates(templateValueMap, templateContext map[string]interface{}) (map[string]interface{}, error) { for key, val := range templateValueMap { - compiledValue, err := fm.engine.CompileString(val, ConvertStringToInterfaceMap(templateContext)) + valString, ok := val.(string) + if !ok { + continue + } + compiledValue, err := fm.engine.CompileString(valString, templateContext) if err != nil { return nil, err } @@ -154,8 +175,8 @@ func (fm *ContextManager) getNamespaceConfigMap() map[string]string { return configMap } -func (fm *ContextManager) getInstanceData(instanceSpec models.InstanceSpec) (map[string]string, map[string]string) { - envMap := map[string]string{} +func (fm *ContextManager) getInstanceData(instanceSpec models.InstanceSpec) (map[string]interface{}, map[string]string) { + envMap := map[string]interface{}{} fileMap := map[string]string{} if instanceSpec.Data != nil { @@ -172,14 +193,14 @@ func (fm *ContextManager) getInstanceData(instanceSpec models.InstanceSpec) (map } func (fm *ContextManager) getConfigMaps(jobSpec models.JobSpec, runName string, - runType models.InstanceType) (map[string]string, - map[string]string, error) { - transformationMap := map[string]string{} + runType models.InstanceType) (map[string]interface{}, + map[string]interface{}, error) { + transformationMap := map[string]interface{}{} for _, val := range jobSpec.Task.Config { transformationMap[val.Name] = val.Value } - hookMap := map[string]string{} + hookMap := map[string]interface{}{} if runType == models.InstanceTypeHook { hook, err := jobSpec.GetHookByName(runName) if err != nil { @@ -211,35 +232,59 @@ func MergeStringMap(mp1, mp2 map[string]string) (mp3 map[string]string) { return mp3 } -func ConvertStringToInterfaceMap(i map[string]string) map[string]interface{} { - o := map[string]interface{}{} - for k, v := range i { - o[k] = v +func MergeInterfaceMapToInterface(mp1, mp2 map[string]interface{}) (mp3 map[string]interface{}) { + mp3 = make(map[string]interface{}) + for k, v := range mp1 { + mp3[k] = v + } + for k, v := range mp2 { + mp3[k] = v + } + return mp3 +} + +// merge two maps and return a map of string +// it will ignore whatever is not a string type +func MergeInterfaceMapToString(mp1, mp2 map[string]interface{}) (mp3 map[string]string) { + mp3 = make(map[string]string) + for k, v := range mp1 { + if vs, ok := v.(string); ok { + mp3[k] = vs + } + } + for k, v := range mp2 { + if vs, ok := v.(string); ok { + mp3[k] = vs + } } - return o + return mp3 } // DumpAssets used for dry run and does not effect actual execution of a job func DumpAssets(jobSpec models.JobSpec, scheduledAt time.Time, engine models.TemplateEngine, allowOverride bool) (map[string]string, error) { - jobDestination, err := jobSpec.Task.Unit.GenerateTaskDestination(context.TODO(), models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec.Assets), - PluginOptions: models.PluginOptions{ - DryRun: true, - }, - }) - if err != nil { - return nil, err + var jobDestination string + if jobSpec.Task.Unit.DependencyMod != nil { + jobDestinationResponse, err := jobSpec.Task.Unit.DependencyMod.GenerateDestination(context.TODO(), models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpec.Assets), + PluginOptions: models.PluginOptions{ + DryRun: true, + }, + }) + if err != nil { + return nil, err + } + jobDestination = jobDestinationResponse.Destination } assetsToDump := jobSpec.Assets.ToMap() if allowOverride { // check if task needs to override the compilation behaviour - compiledAssetResponse, err := jobSpec.Task.Unit.CompileTaskAssets(context.TODO(), models.CompileTaskAssetsRequest{ - TaskWindow: jobSpec.Task.Window, - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec.Assets), + compiledAssetResponse, err := jobSpec.Task.Unit.CLIMod.CompileAssets(context.TODO(), models.CompileAssetsRequest{ + Window: jobSpec.Task.Window, + Config: models.PluginConfigs{}.FromJobSpec(jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpec.Assets), InstanceSchedule: scheduledAt, InstanceData: []models.InstanceSpecData{ { diff --git a/instance/context_test.go b/instance/context_test.go index 57607a6187..b4e270b948 100644 --- a/instance/context_test.go +++ b/instance/context_test.go @@ -32,10 +32,11 @@ func TestContextManager(t *testing.T) { ProjectSpec: projectSpec, } - execUnit := new(mock.TaskPlugin) - execUnit.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit := new(mock.BasePlugin) + execUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "bq", }, nil) + cliMod := new(mock.CLIMod) jobSpec := models.JobSpec{ Name: "foo", @@ -49,7 +50,7 @@ func TestContextManager(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit, CLIMod: cliMod}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, @@ -69,6 +70,10 @@ func TestContextManager(t *testing.T) { Name: "BUCKET", Value: "{{.GLOBAL__bucket}}", }, + { + Name: "BUCKETX", + Value: "{{.proj.bucket}}", + }, { Name: "LOAD_METHOD", Value: "MERGE", @@ -111,14 +116,14 @@ func TestContextManager(t *testing.T) { }, } - execUnit.On("CompileTaskAssets", context.TODO(), models.CompileTaskAssetsRequest{ - TaskWindow: jobSpec.Task.Window, - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec.Assets), + cliMod.On("CompileAssets", context.TODO(), models.CompileAssetsRequest{ + Window: jobSpec.Task.Window, + Config: models.PluginConfigs{}.FromJobSpec(jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpec.Assets), InstanceSchedule: scheduledAt, InstanceData: instanceSpec.Data, - }).Return(models.CompileTaskAssetsResponse{Assets: models.TaskPluginAssets{ - models.TaskPluginAsset{ + }).Return(&models.CompileAssetsResponse{Assets: models.PluginAssets{ + models.PluginAsset{ Name: "query.sql", Value: "select * from table WHERE event_timestamp > '{{.EXECUTION_TIME}}'", }, @@ -135,6 +140,7 @@ func TestContextManager(t *testing.T) { assert.Equal(t, "22", envMap["BQ_VAL"]) assert.Equal(t, mockedTimeNow.Format(models.InstanceScheduledAtTimeLayout), envMap["EXECT"]) assert.Equal(t, projectSpec.Config["bucket"], envMap["BUCKET"]) + assert.Equal(t, projectSpec.Config["bucket"], envMap["BUCKETX"]) assert.Equal(t, fmt.Sprintf("select * from table WHERE event_timestamp > '%s'", mockedTimeNow.Format(models.InstanceScheduledAtTimeLayout)), @@ -159,15 +165,17 @@ func TestContextManager(t *testing.T) { ProjectSpec: projectSpec, } - execUnit := new(mock.TaskPlugin) - execUnit.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit := new(mock.BasePlugin) + execUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "bq", }, nil) + cliMod := new(mock.CLIMod) transporterHook := "transporter" - hookUnit := new(mock.HookPlugin) - hookUnit.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: transporterHook, + hookUnit := new(mock.BasePlugin) + hookUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: transporterHook, + PluginType: models.PluginTypeHook, }, nil) jobSpec := models.JobSpec{ @@ -182,7 +190,7 @@ func TestContextManager(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit, CLIMod: cliMod}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, @@ -216,6 +224,14 @@ func TestContextManager(t *testing.T) { Name: "INHERIT_CONFIG", Value: "{{.TASK__BQ_VAL}}", }, + { + Name: "INHERIT_CONFIG_AS_WELL", + Value: "{{.task.BQ_VAL}}", + }, + { + Name: "UNKNOWN", + Value: "{{.task.TT}}", + }, { Name: "FILTER_EXPRESSION", Value: "event_timestamp >= '{{.DSTART}}' AND event_timestamp < '{{.DEND}}'", @@ -225,7 +241,7 @@ func TestContextManager(t *testing.T) { Value: `{{.GLOBAL__transporterKafkaBroker}}`, }, }, - Unit: hookUnit, + Unit: &models.Plugin{Base: hookUnit}, }, }, } @@ -254,14 +270,14 @@ func TestContextManager(t *testing.T) { }, }, } - execUnit.On("CompileTaskAssets", context.TODO(), models.CompileTaskAssetsRequest{ - TaskWindow: jobSpec.Task.Window, - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec.Assets), + cliMod.On("CompileAssets", context.TODO(), models.CompileAssetsRequest{ + Window: jobSpec.Task.Window, + Config: models.PluginConfigs{}.FromJobSpec(jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpec.Assets), InstanceSchedule: scheduledAt, InstanceData: instanceSpec.Data, - }).Return(models.CompileTaskAssetsResponse{Assets: models.TaskPluginAssets{ - models.TaskPluginAsset{ + }).Return(&models.CompileAssetsResponse{Assets: models.PluginAssets{ + models.PluginAsset{ Name: "query.sql", Value: "select * from table WHERE event_timestamp > '{{.EXECUTION_TIME}}'", }, @@ -278,6 +294,8 @@ func TestContextManager(t *testing.T) { assert.Equal(t, "0.0.0.0:9092", envMap["PRODUCER_CONFIG_BOOTSTRAP_SERVERS"]) assert.Equal(t, "200", envMap["SAMPLE_CONFIG"]) assert.Equal(t, "22", envMap["INHERIT_CONFIG"]) + assert.Equal(t, "22", envMap["INHERIT_CONFIG_AS_WELL"]) + assert.Equal(t, "", envMap["UNKNOWN"]) assert.Equal(t, "22", envMap["TASK__BQ_VAL"]) assert.Equal(t, "event_timestamp >= '2020-11-10T23:00:00Z' AND event_timestamp < '2020-11-11T00:00:00Z'", envMap["FILTER_EXPRESSION"]) @@ -306,7 +324,8 @@ func TestContextManager(t *testing.T) { ProjectSpec: projectSpec, } - execUnit := new(mock.TaskPlugin) + execUnit := new(mock.BasePlugin) + cliMod := new(mock.CLIMod) jobSpec := models.JobSpec{ Name: "foo", @@ -320,7 +339,7 @@ func TestContextManager(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit, CLIMod: cliMod}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, @@ -386,14 +405,14 @@ func TestContextManager(t *testing.T) { }, } - execUnit.On("CompileTaskAssets", context.TODO(), models.CompileTaskAssetsRequest{ - TaskWindow: jobSpec.Task.Window, - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec.Assets), + cliMod.On("CompileAssets", context.TODO(), models.CompileAssetsRequest{ + Window: jobSpec.Task.Window, + Config: models.PluginConfigs{}.FromJobSpec(jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpec.Assets), InstanceSchedule: scheduledAt, InstanceData: instanceSpec.Data, - }).Return(models.CompileTaskAssetsResponse{Assets: models.TaskPluginAssets{ - models.TaskPluginAsset{ + }).Return(&models.CompileAssetsResponse{Assets: models.PluginAssets{ + models.PluginAsset{ Name: "query.sql", Value: "select * from table WHERE event_timestamp > '{{.EXECUTION_TIME}}'", }, diff --git a/instance/service.go b/instance/service.go index a7ede6476e..ae15177be2 100644 --- a/instance/service.go +++ b/instance/service.go @@ -78,12 +78,16 @@ func (s *Service) Register(jobSpec models.JobSpec, scheduledAt time.Time, } func (s *Service) PrepInstance(jobSpec models.JobSpec, scheduledAt time.Time) (models.InstanceSpec, error) { - jobDestination, err := jobSpec.Task.Unit.GenerateTaskDestination(context.TODO(), models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec.Assets), - }) - if err != nil { - return models.InstanceSpec{}, errors.Wrapf(err, "failed to generate destination for job %s", jobSpec.Name) + var jobDestination string + if jobSpec.Task.Unit.DependencyMod != nil { + jobDestinationResponse, err := jobSpec.Task.Unit.DependencyMod.GenerateDestination(context.TODO(), models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpec.Assets), + }) + if err != nil { + return models.InstanceSpec{}, errors.Wrapf(err, "failed to generate destination for job %s", jobSpec.Name) + } + jobDestination = jobDestinationResponse.Destination } return models.InstanceSpec{ @@ -110,7 +114,7 @@ func (s *Service) PrepInstance(jobSpec models.JobSpec, scheduledAt time.Time) (m }, { Name: ConfigKeyDestination, - Value: jobDestination.Destination, + Value: jobDestination, Type: models.InstanceDataTypeEnv, }, }, diff --git a/instance/service_test.go b/instance/service_test.go index 9fcddd80fe..df6018d30b 100644 --- a/instance/service_test.go +++ b/instance/service_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/odpf/optimus/store" - mock2 "github.com/stretchr/testify/mock" + "github.com/odpf/optimus/store" + "github.com/odpf/optimus/instance" "github.com/pkg/errors" "github.com/stretchr/testify/assert" @@ -18,10 +18,11 @@ import ( ) func TestService(t *testing.T) { - execUnit := new(mock.TaskPlugin) - execUnit.On("Name").Return("bq") - execUnit.On("GenerateTaskDestination", context.TODO(), mock2.AnythingOfType("models.GenerateTaskDestinationRequest")).Return( - models.GenerateTaskDestinationResponse{Destination: "proj.data.tab"}, nil) + execUnit := new(mock.BasePlugin) + execUnit.On("PluginInfo").Return(&models.PluginInfoResponse{Name: "bq"}, nil) + depMod := new(mock.DependencyResolverMod) + depMod.On("GenerateDestination", context.TODO(), mock2.AnythingOfType("models.GenerateDestinationRequest")).Return( + &models.GenerateDestinationResponse{Destination: "proj.data.tab"}, nil) jobSpec := models.JobSpec{ Name: "foo", Owner: "mee@mee", @@ -34,7 +35,7 @@ func TestService(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit, DependencyMod: depMod}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, diff --git a/job/compiler.go b/job/compiler.go index ffdd659f8a..e64d60272c 100644 --- a/job/compiler.go +++ b/job/compiler.go @@ -2,10 +2,11 @@ package job import ( "bytes" - "context" "text/template" "time" + "github.com/odpf/optimus/config" + "github.com/Masterminds/sprig/v3" "github.com/odpf/optimus/models" "github.com/pkg/errors" @@ -53,9 +54,6 @@ func (com *Compiler) Compile(namespaceSpec models.NamespaceSpec, jobSpec models. if err = tmpl.Execute(&buf, struct { Namespace models.NamespaceSpec Job models.JobSpec - TaskSchemaRequest models.GetTaskSchemaRequest - HookSchemaRequest models.GetHookSchemaRequest - Context context.Context Hostname string HookTypePre string HookTypePost string @@ -66,13 +64,11 @@ func (com *Compiler) Compile(namespaceSpec models.NamespaceSpec, jobSpec models. JobSpecDependencyTypeInter string JobSpecDependencyTypeExtra string SLAMissDurationInSec int64 + Version string }{ Namespace: namespaceSpec, Job: jobSpec, Hostname: com.hostname, - TaskSchemaRequest: models.GetTaskSchemaRequest{}, - HookSchemaRequest: models.GetHookSchemaRequest{}, - Context: context.Background(), HookTypePre: string(models.HookTypePre), HookTypePost: string(models.HookTypePost), HookTypeFail: string(models.HookTypeFail), @@ -82,6 +78,7 @@ func (com *Compiler) Compile(namespaceSpec models.NamespaceSpec, jobSpec models. JobSpecDependencyTypeInter: string(models.JobSpecDependencyTypeInter), JobSpecDependencyTypeExtra: string(models.JobSpecDependencyTypeExtra), SLAMissDurationInSec: slaMissDurationInSec, + Version: config.Version, }); err != nil { return models.Job{}, errors.Wrap(err, "failed to templatize job") } diff --git a/job/compiler_test.go b/job/compiler_test.go index 6306ef9c97..231ef0fce5 100644 --- a/job/compiler_test.go +++ b/job/compiler_test.go @@ -5,14 +5,11 @@ import ( "time" "github.com/odpf/optimus/job" - "github.com/odpf/optimus/mock" "github.com/odpf/optimus/models" "github.com/stretchr/testify/assert" ) func TestCompiler(t *testing.T) { - execUnit := new(mock.TaskPlugin) - projSpec := models.ProjectSpec{ Name: "foo-project", } @@ -47,7 +44,7 @@ func TestCompiler(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{}, Priority: 2000, Window: models.JobSpecTaskWindow{ Size: time.Hour, diff --git a/job/dependency_resolver.go b/job/dependency_resolver.go index d5e0296021..d9cf5100d6 100644 --- a/job/dependency_resolver.go +++ b/job/dependency_resolver.go @@ -45,20 +45,22 @@ func (r *dependencyResolver) Resolve(projectSpec models.ProjectSpec, projectJobS func (r *dependencyResolver) resolveInferredDependencies(jobSpec models.JobSpec, projectSpec models.ProjectSpec, projectJobSpecRepo store.ProjectJobSpecRepository, observer progress.Observer) (models.JobSpec, error) { - // get destinations of dependencies, assets should be - jobDependenciesDestination, err := jobSpec.Task.Unit.GenerateTaskDependencies(context.TODO(), - models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec.Assets), + // get destinations of dependencies, assets should be dependent on + var jobDependencies []string + if jobSpec.Task.Unit.DependencyMod != nil { + resp, err := jobSpec.Task.Unit.DependencyMod.GenerateDependencies(context.TODO(), models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpec.Assets), Project: projectSpec, - }, - ) - if err != nil { - return models.JobSpec{}, err + }) + if err != nil { + return models.JobSpec{}, err + } + jobDependencies = resp.Dependencies } // get job spec of these destinations and append to current jobSpec - for _, depDestination := range jobDependenciesDestination.Dependencies { + for _, depDestination := range jobDependencies { depSpec, depProj, err := projectJobSpecRepo.GetByDestination(depDestination) if err != nil { if err == store.ErrResourceNotFound { @@ -109,11 +111,7 @@ func (r *dependencyResolver) resolveStaticDependencies(jobSpec models.JobSpec, p func (r *dependencyResolver) resolveHookDependencies(jobSpec models.JobSpec) (models.JobSpec, error) { for hookIdx, jobHook := range jobSpec.Hooks { jobHook.DependsOn = nil - schema, err := jobHook.Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return models.JobSpec{}, err - } - for _, depends := range schema.DependsOn { + for _, depends := range jobHook.Unit.Info().DependsOn { dependentHook, err := jobSpec.GetHookByName(depends) if err == nil { jobHook.DependsOn = append(jobHook.DependsOn, &dependentHook) diff --git a/job/dependency_resolver_test.go b/job/dependency_resolver_test.go index 3114754c4c..9fe0204dd5 100644 --- a/job/dependency_resolver_test.go +++ b/job/dependency_resolver_test.go @@ -31,12 +31,12 @@ func TestDependencyResolver(t *testing.T) { } t.Run("it should resolve runtime dependencies", func(t *testing.T) { - execUnit1 := new(mock.TaskPlugin) + execUnit1 := new(mock.DependencyResolverMod) defer execUnit1.AssertExpectations(t) - hookUnit1 := new(mock.HookPlugin) + hookUnit1 := new(mock.BasePlugin) defer hookUnit1.AssertExpectations(t) - hookUnit2 := new(mock.HookPlugin) + hookUnit2 := new(mock.BasePlugin) defer hookUnit2.AssertExpectations(t) jobSpec1 := models.JobSpec{ @@ -48,7 +48,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{DependencyMod: execUnit1}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -60,12 +60,12 @@ func TestDependencyResolver(t *testing.T) { Hooks: []models.JobSpecHook{ { Config: nil, - Unit: hookUnit1, + Unit: &models.Plugin{Base: hookUnit1}, DependsOn: nil, }, { Config: nil, - Unit: hookUnit2, + Unit: &models.Plugin{Base: hookUnit2}, DependsOn: nil, }, }, @@ -79,7 +79,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{DependencyMod: execUnit1}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -94,24 +94,24 @@ func TestDependencyResolver(t *testing.T) { jobSpecRepository.On("GetByDestination", "project.dataset.table2_destination").Return(jobSpec2, projectSpec, nil) defer jobSpecRepository.AssertExpectations(t) - unitData := models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec1.Assets), + unitData := models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec, } - unitData2 := models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec2.Assets), + unitData2 := models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec2.Assets), Project: projectSpec, } // task dependencies - execUnit1.On("GenerateTaskDependencies", context.TODO(), unitData).Return(models.GenerateTaskDependenciesResponse{Dependencies: []string{"project.dataset.table2_destination"}}, nil) - execUnit1.On("GenerateTaskDependencies", context.TODO(), unitData2).Return(models.GenerateTaskDependenciesResponse{}, nil) + execUnit1.On("GenerateDependencies", context.TODO(), unitData).Return(&models.GenerateDependenciesResponse{Dependencies: []string{"project.dataset.table2_destination"}}, nil) + execUnit1.On("GenerateDependencies", context.TODO(), unitData2).Return(&models.GenerateDependenciesResponse{}, nil) // hook dependency - hookUnit1.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ + hookUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "hook1", }, nil) - hookUnit2.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ + hookUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "hook2", DependsOn: []string{"hook1"}, }, nil) @@ -129,7 +129,7 @@ func TestDependencyResolver(t *testing.T) { assert.Equal(t, []*models.JobSpecHook{&resolvedJobSpec1.Hooks[0]}, resolvedJobSpec1.Hooks[1].DependsOn) }) t.Run("it should resolve all dependencies including static unresolved dependency", func(t *testing.T) { - execUnit := new(mock.TaskPlugin) + execUnit := new(mock.DependencyResolverMod) defer execUnit.AssertExpectations(t) jobSpec3 := models.JobSpec{ @@ -141,7 +141,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -160,7 +160,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -179,7 +179,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -194,19 +194,19 @@ func TestDependencyResolver(t *testing.T) { jobSpecRepository.On("GetByDestination", "project.dataset.table2_destination").Return(jobSpec2, projectSpec, nil) defer jobSpecRepository.AssertExpectations(t) - unitData := models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec1.Assets), + unitData := models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec, } - unitData2 := models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec2.Assets), + unitData2 := models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec2.Assets), Project: projectSpec, } - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData).Return(models.GenerateTaskDependenciesResponse{ + execUnit.On("GenerateDependencies", context.TODO(), unitData).Return(&models.GenerateDependenciesResponse{ Dependencies: []string{"project.dataset.table2_destination"}, }, nil) - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData2).Return(models.GenerateTaskDependenciesResponse{}, nil) + execUnit.On("GenerateDependencies", context.TODO(), unitData2).Return(&models.GenerateDependenciesResponse{}, nil) resolver := job.NewDependencyResolver() resolvedJobSpec1, err := resolver.Resolve(projectSpec, jobSpecRepository, jobSpec1, nil) @@ -222,7 +222,7 @@ func TestDependencyResolver(t *testing.T) { }) t.Run("should fail if GetByDestination fails", func(t *testing.T) { - execUnit := new(mock.TaskPlugin) + execUnit := new(mock.DependencyResolverMod) defer execUnit.AssertExpectations(t) jobSpec1 := models.JobSpec{ @@ -234,7 +234,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -253,7 +253,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -268,9 +268,9 @@ func TestDependencyResolver(t *testing.T) { jobSpecRepository.On("GetByDestination", "project.dataset.table2_destination").Return(jobSpec2, projectSpec, errors.New("random error")) defer jobSpecRepository.AssertExpectations(t) - unitData := models.GenerateTaskDependenciesRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec} - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData).Return( - models.GenerateTaskDependenciesResponse{Dependencies: []string{"project.dataset.table2_destination"}}, nil) + unitData := models.GenerateDependenciesRequest{Config: models.PluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec} + execUnit.On("GenerateDependencies", context.Background(), unitData).Return( + &models.GenerateDependenciesResponse{Dependencies: []string{"project.dataset.table2_destination"}}, nil) resolver := job.NewDependencyResolver() resolvedJobSpec1, err := resolver.Resolve(projectSpec, jobSpecRepository, jobSpec1, nil) @@ -281,8 +281,8 @@ func TestDependencyResolver(t *testing.T) { assert.Equal(t, models.JobSpec{}, resolvedJobSpec1) }) - t.Run("should fail if GenerateTaskDependencies fails", func(t *testing.T) { - execUnit := new(mock.TaskPlugin) + t.Run("should fail if GenerateDependencies fails", func(t *testing.T) { + execUnit := new(mock.DependencyResolverMod) defer execUnit.AssertExpectations(t) jobSpec1 := models.JobSpec{ @@ -294,7 +294,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -308,8 +308,8 @@ func TestDependencyResolver(t *testing.T) { jobSpecRepository := new(mock.ProjectJobSpecRepository) defer jobSpecRepository.AssertExpectations(t) - unitData := models.GenerateTaskDependenciesRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec} - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData).Return(models.GenerateTaskDependenciesResponse{}, errors.New("random error")) + unitData := models.GenerateDependenciesRequest{Config: models.PluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec} + execUnit.On("GenerateDependencies", context.Background(), unitData).Return(&models.GenerateDependenciesResponse{}, errors.New("random error")) resolver := job.NewDependencyResolver() resolvedJobSpec1, err := resolver.Resolve(projectSpec, jobSpecRepository, jobSpec1, nil) @@ -319,7 +319,7 @@ func TestDependencyResolver(t *testing.T) { }) t.Run("should fail if job destination is undefined", func(t *testing.T) { - execUnit := new(mock.TaskPlugin) + execUnit := new(mock.DependencyResolverMod) defer execUnit.AssertExpectations(t) jobSpec1 := models.JobSpec{ @@ -331,7 +331,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -346,8 +346,8 @@ func TestDependencyResolver(t *testing.T) { jobSpecRepository.On("GetByDestination", "project.dataset.table3_destination").Return(nil, nil, errors.New("spec not found")) defer jobSpecRepository.AssertExpectations(t) - unitData := models.GenerateTaskDependenciesRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec} - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData).Return(models.GenerateTaskDependenciesResponse{ + unitData := models.GenerateDependenciesRequest{Config: models.PluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec} + execUnit.On("GenerateDependencies", context.Background(), unitData).Return(&models.GenerateDependenciesResponse{ Dependencies: []string{"project.dataset.table3_destination"}}, nil) resolver := job.NewDependencyResolver() @@ -358,7 +358,7 @@ func TestDependencyResolver(t *testing.T) { }) t.Run("it should fail for unknown static dependency", func(t *testing.T) { - execUnit := new(mock.TaskPlugin) + execUnit := new(mock.DependencyResolverMod) defer execUnit.AssertExpectations(t) jobSpec1 := models.JobSpec{ @@ -370,7 +370,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -389,7 +389,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -405,8 +405,8 @@ func TestDependencyResolver(t *testing.T) { jobSpecRepository.On("GetByName", "static_dep").Return(nil, errors.New("spec not found")) defer jobSpecRepository.AssertExpectations(t) - unitData2 := models.GenerateTaskDependenciesRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec2.Assets), Project: projectSpec} - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData2).Return(models.GenerateTaskDependenciesResponse{ + unitData2 := models.GenerateDependenciesRequest{Config: models.PluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec2.Assets), Project: projectSpec} + execUnit.On("GenerateDependencies", context.Background(), unitData2).Return(&models.GenerateDependenciesResponse{ Dependencies: []string{"project.dataset.table1_destination"}, }, nil) @@ -416,7 +416,7 @@ func TestDependencyResolver(t *testing.T) { }) t.Run("it should resolve any unresolved static dependency", func(t *testing.T) { - execUnit := new(mock.TaskPlugin) + execUnit := new(mock.DependencyResolverMod) defer execUnit.AssertExpectations(t) jobSpec3 := models.JobSpec{ @@ -428,7 +428,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -447,7 +447,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -467,7 +467,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -483,19 +483,19 @@ func TestDependencyResolver(t *testing.T) { jobSpecRepository.On("GetByName", "test3").Return(jobSpec3, namespaceSpec, nil) defer jobSpecRepository.AssertExpectations(t) - unitData := models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec1.Assets), + unitData := models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec, } - unitData2 := models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec2.Assets), + unitData2 := models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec2.Assets), Project: projectSpec, } - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData).Return(models.GenerateTaskDependenciesResponse{ + execUnit.On("GenerateDependencies", context.Background(), unitData).Return(&models.GenerateDependenciesResponse{ Dependencies: []string{"project.dataset.table2_destination"}, }, nil) - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData2).Return(models.GenerateTaskDependenciesResponse{}, nil) + execUnit.On("GenerateDependencies", context.Background(), unitData2).Return(&models.GenerateDependenciesResponse{}, nil) resolver := job.NewDependencyResolver() resolvedJobSpec1, err := resolver.Resolve(projectSpec, jobSpecRepository, jobSpec1, nil) @@ -520,7 +520,7 @@ func TestDependencyResolver(t *testing.T) { }, } - execUnit := new(mock.TaskPlugin) + execUnit := new(mock.DependencyResolverMod) defer execUnit.AssertExpectations(t) jobSpec3 := models.JobSpec{ @@ -532,7 +532,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -551,7 +551,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -571,7 +571,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -590,7 +590,7 @@ func TestDependencyResolver(t *testing.T) { Interval: "@daily", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{DependencyMod: execUnit}, Config: models.JobSpecConfigs{ { Name: "foo", @@ -607,22 +607,22 @@ func TestDependencyResolver(t *testing.T) { jobSpecRepository.On("GetByName", "test3").Return(jobSpec3, namespaceSpec, nil) defer jobSpecRepository.AssertExpectations(t) - unitData := models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec1.Assets), + unitData := models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec1.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec1.Assets), Project: projectSpec, } - unitData2 := models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpec2.Assets), + unitData2 := models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec2.Task.Config), Assets: models.PluginAssets{}.FromJobSpec(jobSpec2.Assets), Project: projectSpec, } - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData).Return(models.GenerateTaskDependenciesResponse{ + execUnit.On("GenerateDependencies", context.Background(), unitData).Return(&models.GenerateDependenciesResponse{ Dependencies: []string{ "project.dataset.table2_destination", "project.dataset.table2_external_destination", // inter optimus dependency }, }, nil) - execUnit.On("GenerateTaskDependencies", context.TODO(), unitData2).Return(models.GenerateTaskDependenciesResponse{}, nil) + execUnit.On("GenerateDependencies", context.Background(), unitData2).Return(&models.GenerateDependenciesResponse{}, nil) resolver := job.NewDependencyResolver() resolvedJobSpec1, err := resolver.Resolve(projectSpec, jobSpecRepository, jobSpec1, nil) diff --git a/job/service.go b/job/service.go index d7c7850d97..73df451d4f 100644 --- a/job/service.go +++ b/job/service.go @@ -159,9 +159,9 @@ func (srv *Service) Check(namespace models.NamespaceSpec, jobSpecs []models.JobS runner.Add(func(currentSpec models.JobSpec) func() (interface{}, error) { return func() (interface{}, error) { // check dependencies - if _, err := currentSpec.Task.Unit.GenerateTaskDependencies(context.TODO(), models.GenerateTaskDependenciesRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(currentSpec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(currentSpec.Assets), + if _, err := currentSpec.Task.Unit.DependencyMod.GenerateDependencies(context.TODO(), models.GenerateDependenciesRequest{ + Config: models.PluginConfigs{}.FromJobSpec(currentSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(currentSpec.Assets), Project: namespace.ProjectSpec, PluginOptions: models.PluginOptions{ DryRun: true, diff --git a/main.go b/main.go index d433b327c5..214297aa3f 100644 --- a/main.go +++ b/main.go @@ -62,8 +62,7 @@ func main() { command := cmd.New( log.New(os.Stderr, "", 0), configuration, - models.TaskRegistry, - models.HookRegistry, + models.PluginRegistry, models.DatastoreRegistry, ) if err := command.Execute(); err != nil { diff --git a/meta/job_adapter.go b/meta/job_adapter.go index ce3df9062c..7b61c054b9 100644 --- a/meta/job_adapter.go +++ b/meta/job_adapter.go @@ -6,7 +6,6 @@ import ( "time" "github.com/gogo/protobuf/proto" - "github.com/golang/protobuf/ptypes" pb "github.com/odpf/optimus/api/proto/odpf/metadata/optimus" "github.com/odpf/optimus/models" "google.golang.org/protobuf/types/known/timestamppb" @@ -20,41 +19,39 @@ func (a JobAdapter) buildUrn(projectSpec models.ProjectSpec, jobSpec models.JobS } func (a JobAdapter) FromJobSpec(namespaceSpec models.NamespaceSpec, jobSpec models.JobSpec) (*models.JobMetadata, error) { - taskSchema, err := jobSpec.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) - if err != nil { - return nil, err - } + taskSchema := jobSpec.Task.Unit.Info() - taskPluginConfigs := models.TaskPluginConfigs{} + taskPluginConfigs := models.PluginConfigs{} for _, c := range jobSpec.Task.Config { - taskPluginConfigs = append(taskPluginConfigs, models.TaskPluginConfig{ + taskPluginConfigs = append(taskPluginConfigs, models.PluginConfig{ Name: c.Name, Value: c.Value, }) } - taskPluginAssets := models.TaskPluginAssets{} + taskPluginAssets := models.PluginAssets{} for _, c := range jobSpec.Assets.GetAll() { - taskPluginAssets = append(taskPluginAssets, models.TaskPluginAsset{ + taskPluginAssets = append(taskPluginAssets, models.PluginAsset{ Name: c.Name, Value: c.Value, }) } - taskDestination, err := jobSpec.Task.Unit.GenerateTaskDestination(context.TODO(), models.GenerateTaskDestinationRequest{ - Config: taskPluginConfigs, - Assets: taskPluginAssets, - }) - if err != nil { - return nil, err + var jobDestination string + if jobSpec.Task.Unit.DependencyMod != nil { + jobDestinationResponse, err := jobSpec.Task.Unit.DependencyMod.GenerateDestination(context.TODO(), models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpec.Assets), + }) + if err != nil { + return nil, err + } + jobDestination = jobDestinationResponse.Destination } - if err != nil { - return nil, err - } taskMetadata := models.JobTaskMetadata{ Name: taskSchema.Name, Image: taskSchema.Image, Description: taskSchema.Description, - Destination: taskDestination.Destination, + Destination: jobDestination, Config: jobSpec.Task.Config, Window: jobSpec.Task.Window, Priority: jobSpec.Task.Priority, @@ -85,16 +82,13 @@ func (a JobAdapter) FromJobSpec(namespaceSpec models.NamespaceSpec, jobSpec mode } for _, hook := range jobSpec.Hooks { - schema, err := hook.Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return &resourceMetadata, err - } + schema := hook.Unit.Info() resourceMetadata.Hooks = append(resourceMetadata.Hooks, models.JobHookMetadata{ Name: schema.Name, Image: schema.Image, Description: schema.Description, Config: hook.Config, - Type: schema.Type, + Type: schema.HookType, DependsOn: schema.DependsOn, }) } @@ -109,10 +103,7 @@ func (a JobAdapter) CompileKey(urn string) ([]byte, error) { } func (a JobAdapter) CompileMessage(jobMetadata *models.JobMetadata) ([]byte, error) { - timestamp, err := ptypes.TimestampProto(time.Now()) - if err != nil { - return nil, err - } + timestamp := timestamppb.New(time.Now()) jobSchedule, err := a.compileJobSchedule(jobMetadata) if err != nil { @@ -188,17 +179,11 @@ func (a JobAdapter) compileHooks(resource *models.JobMetadata) (hooks []*pb.JobH } func (a JobAdapter) compileJobSchedule(resource *models.JobMetadata) (*pb.JobSchedule, error) { - scheduleStartDate, err := ptypes.TimestampProto(resource.Schedule.StartDate) - if err != nil { - return nil, err - } + scheduleStartDate := timestamppb.New(resource.Schedule.StartDate) var scheduleEndDate *timestamppb.Timestamp if resource.Schedule.EndDate != nil { - scheduleEndDate, err = ptypes.TimestampProto(*resource.Schedule.EndDate) - if err != nil { - return nil, err - } + scheduleEndDate = timestamppb.New(*resource.Schedule.EndDate) } return &pb.JobSchedule{ diff --git a/meta/job_adapter_test.go b/meta/job_adapter_test.go index 2e5d1a5464..4c3978ac3a 100644 --- a/meta/job_adapter_test.go +++ b/meta/job_adapter_test.go @@ -27,8 +27,9 @@ func TestJobAdapter(t *testing.T) { ProjectSpec: projectSpec, } - execUnit := new(mock.TaskPlugin) - hookUnit := new(mock.HookPlugin) + execUnit := new(mock.BasePlugin) + depMod := new(mock.DependencyResolverMod) + hookUnit := new(mock.BasePlugin) jobSpecs := []models.JobSpec{ { @@ -45,7 +46,7 @@ func TestJobAdapter(t *testing.T) { Interval: "* * * * *", }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit, DependencyMod: depMod}, Config: models.JobSpecConfigs{ { Name: "do", @@ -87,28 +88,28 @@ func TestJobAdapter(t *testing.T) { Value: `{{.GLOBAL__transporterKafkaBroker}}`, }, }, - Unit: hookUnit, + Unit: &models.Plugin{Base: hookUnit}, }, }, }, } - execUnit.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "bq2bq", Image: "image", Description: "description", }, nil) - execUnit.On("GenerateTaskDestination", context.TODO(), models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobSpecs[0].Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobSpecs[0].Assets), - }).Return(models.GenerateTaskDestinationResponse{Destination: "destination_table"}, nil) + depMod.On("GenerateDestination", context.TODO(), models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobSpecs[0].Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobSpecs[0].Assets), + }).Return(&models.GenerateDestinationResponse{Destination: "destination_table"}, nil) - hookUnit.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ + hookUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "transporter", Description: "h_description", Image: "h_image", DependsOn: []string{"some_value"}, - Type: models.HookTypePost, + HookType: models.HookTypePost, }, nil) t.Run("should build JobMetadata from JobSpec without any error", func(t *testing.T) { diff --git a/mock/hook.go b/mock/hook.go deleted file mode 100644 index 31632c7761..0000000000 --- a/mock/hook.go +++ /dev/null @@ -1,55 +0,0 @@ -package mock - -import ( - "context" - - "github.com/odpf/optimus/models" - "github.com/stretchr/testify/mock" -) - -type SupportedHookRepo struct { - mock.Mock -} - -func (repo *SupportedHookRepo) GetByName(name string) (models.HookPlugin, error) { - args := repo.Called(name) - return args.Get(0).(models.HookPlugin), args.Error(1) -} - -func (repo *SupportedHookRepo) GetAll() []models.HookPlugin { - args := repo.Called() - return args.Get(0).([]models.HookPlugin) -} - -func (repo *SupportedHookRepo) Add(t models.HookPlugin) error { - return repo.Called(t).Error(0) -} - -type HookPlugin struct { - mock.Mock `hash:"-"` -} - -func (repo *HookPlugin) GetHookSchema(ctx context.Context, request models.GetHookSchemaRequest) (models.GetHookSchemaResponse, error) { - args := repo.Called(ctx, request) - return args.Get(0).(models.GetHookSchemaResponse), args.Error(1) -} - -func (repo *HookPlugin) GetHookQuestions(ctx context.Context, request models.GetHookQuestionsRequest) (models.GetHookQuestionsResponse, error) { - args := repo.Called(ctx, request) - return args.Get(0).(models.GetHookQuestionsResponse), args.Error(1) -} - -func (repo *HookPlugin) ValidateHookQuestion(ctx context.Context, request models.ValidateHookQuestionRequest) (models.ValidateHookQuestionResponse, error) { - args := repo.Called(ctx, request) - return args.Get(0).(models.ValidateHookQuestionResponse), args.Error(1) -} - -func (repo *HookPlugin) DefaultHookConfig(ctx context.Context, request models.DefaultHookConfigRequest) (models.DefaultHookConfigResponse, error) { - args := repo.Called(ctx, request) - return args.Get(0).(models.DefaultHookConfigResponse), args.Error(1) -} - -func (repo *HookPlugin) DefaultHookAssets(ctx context.Context, request models.DefaultHookAssetsRequest) (models.DefaultHookAssetsResponse, error) { - args := repo.Called(ctx, request) - return args.Get(0).(models.DefaultHookAssetsResponse), args.Error(1) -} diff --git a/mock/plugin.go b/mock/plugin.go new file mode 100644 index 0000000000..405893f758 --- /dev/null +++ b/mock/plugin.go @@ -0,0 +1,104 @@ +package mock + +import ( + "context" + + "github.com/odpf/optimus/models" + "github.com/stretchr/testify/mock" +) + +type SupportedPluginRepo struct { + mock.Mock +} + +func (repo *SupportedPluginRepo) Add(plugin models.BasePlugin, mod models.CommandLineMod, mod2 models.DependencyResolverMod) error { + return repo.Called(plugin, mod, mod2).Error(0) +} + +func (repo *SupportedPluginRepo) GetByName(s string) (*models.Plugin, error) { + args := repo.Called(s) + return args.Get(0).(*models.Plugin), args.Error(1) +} + +func (repo *SupportedPluginRepo) GetAll() []*models.Plugin { + args := repo.Called() + return args.Get(0).([]*models.Plugin) +} + +func (repo *SupportedPluginRepo) GetTasks() []*models.Plugin { + panic("implement me") +} + +func (repo *SupportedPluginRepo) GetHooks() []*models.Plugin { + panic("implement me") +} + +func (repo *SupportedPluginRepo) GetCommandLines() []models.CommandLineMod { + panic("implement me") +} + +func (repo *SupportedPluginRepo) GetDependencyResolvers() []models.DependencyResolverMod { + panic("implement me") +} + +type BasePlugin struct { + mock.Mock `hash:"-"` +} + +func (repo *BasePlugin) PluginInfo() (*models.PluginInfoResponse, error) { + args := repo.Called() + return args.Get(0).(*models.PluginInfoResponse), args.Error(1) +} + +type CLIMod struct { + mock.Mock `hash:"-"` +} + +func (repo *CLIMod) PluginInfo() (*models.PluginInfoResponse, error) { + args := repo.Called() + return args.Get(0).(*models.PluginInfoResponse), args.Error(1) +} + +func (repo *CLIMod) DefaultConfig(ctx context.Context, inp models.DefaultConfigRequest) (*models.DefaultConfigResponse, error) { + args := repo.Called(ctx, inp) + return args.Get(0).(*models.DefaultConfigResponse), args.Error(1) +} + +func (repo *CLIMod) DefaultAssets(ctx context.Context, inp models.DefaultAssetsRequest) (*models.DefaultAssetsResponse, error) { + args := repo.Called(ctx, inp) + return args.Get(0).(*models.DefaultAssetsResponse), args.Error(1) +} + +func (repo *CLIMod) CompileAssets(ctx context.Context, inp models.CompileAssetsRequest) (*models.CompileAssetsResponse, error) { + args := repo.Called(ctx, inp) + return args.Get(0).(*models.CompileAssetsResponse), args.Error(1) +} + +func (repo *CLIMod) GetQuestions(ctx context.Context, inp models.GetQuestionsRequest) (*models.GetQuestionsResponse, error) { + args := repo.Called(ctx, inp) + return args.Get(0).(*models.GetQuestionsResponse), args.Error(1) +} + +func (repo *CLIMod) ValidateQuestion(ctx context.Context, inp models.ValidateQuestionRequest) (*models.ValidateQuestionResponse, error) { + args := repo.Called(ctx, inp) + return args.Get(0).(*models.ValidateQuestionResponse), args.Error(1) +} + +type DependencyResolverMod struct { + mock.Mock `hash:"-"` +} + +func (repo *DependencyResolverMod) PluginInfo() (*models.PluginInfoResponse, error) { + args := repo.Called() + return args.Get(0).(*models.PluginInfoResponse), args.Error(1) +} + +func (repo *DependencyResolverMod) GenerateDestination(ctx context.Context, inp models.GenerateDestinationRequest) (*models.GenerateDestinationResponse, error) { + args := repo.Called(ctx, inp) + return args.Get(0).(*models.GenerateDestinationResponse), args.Error(1) +} + +func (repo *DependencyResolverMod) GenerateDependencies(ctx context.Context, inp models.GenerateDependenciesRequest) (*models.GenerateDependenciesResponse, error) { + args := repo.Called(ctx, inp) + return args.Get(0).(*models.GenerateDependenciesResponse), args.Error(1) +} diff --git a/mock/task.go b/mock/task.go deleted file mode 100644 index fb4e4c708b..0000000000 --- a/mock/task.go +++ /dev/null @@ -1,70 +0,0 @@ -package mock - -import ( - "context" - - "github.com/odpf/optimus/models" - "github.com/stretchr/testify/mock" -) - -type SupportedTaskRepo struct { - mock.Mock -} - -func (repo *SupportedTaskRepo) GetByName(name string) (models.TaskPlugin, error) { - args := repo.Called(name) - return args.Get(0).(models.TaskPlugin), args.Error(1) -} - -func (repo *SupportedTaskRepo) GetAll() []models.TaskPlugin { - args := repo.Called() - return args.Get(0).([]models.TaskPlugin) -} - -func (repo *SupportedTaskRepo) Add(t models.TaskPlugin) error { - return repo.Called(t).Error(0) -} - -type TaskPlugin struct { - mock.Mock `hash:"-"` -} - -func (repo *TaskPlugin) GetTaskSchema(ctx context.Context, inp models.GetTaskSchemaRequest) (models.GetTaskSchemaResponse, error) { - args := repo.Called(ctx, inp) - return args.Get(0).(models.GetTaskSchemaResponse), args.Error(1) -} - -func (repo *TaskPlugin) DefaultTaskConfig(ctx context.Context, inp models.DefaultTaskConfigRequest) (models.DefaultTaskConfigResponse, error) { - args := repo.Called(ctx, inp) - return args.Get(0).(models.DefaultTaskConfigResponse), args.Error(1) -} - -func (repo *TaskPlugin) DefaultTaskAssets(ctx context.Context, inp models.DefaultTaskAssetsRequest) (models.DefaultTaskAssetsResponse, error) { - args := repo.Called(ctx, inp) - return args.Get(0).(models.DefaultTaskAssetsResponse), args.Error(1) -} - -func (repo *TaskPlugin) CompileTaskAssets(ctx context.Context, inp models.CompileTaskAssetsRequest) (models.CompileTaskAssetsResponse, error) { - args := repo.Called(ctx, inp) - return args.Get(0).(models.CompileTaskAssetsResponse), args.Error(1) -} - -func (repo *TaskPlugin) GetTaskQuestions(ctx context.Context, inp models.GetTaskQuestionsRequest) (models.GetTaskQuestionsResponse, error) { - args := repo.Called(ctx, inp) - return args.Get(0).(models.GetTaskQuestionsResponse), args.Error(1) -} - -func (repo *TaskPlugin) ValidateTaskQuestion(ctx context.Context, inp models.ValidateTaskQuestionRequest) (models.ValidateTaskQuestionResponse, error) { - args := repo.Called(ctx, inp) - return args.Get(0).(models.ValidateTaskQuestionResponse), args.Error(1) -} - -func (repo *TaskPlugin) GenerateTaskDestination(ctx context.Context, inp models.GenerateTaskDestinationRequest) (models.GenerateTaskDestinationResponse, error) { - args := repo.Called(ctx, inp) - return args.Get(0).(models.GenerateTaskDestinationResponse), args.Error(1) -} - -func (repo *TaskPlugin) GenerateTaskDependencies(ctx context.Context, inp models.GenerateTaskDependenciesRequest) (models.GenerateTaskDependenciesResponse, error) { - args := repo.Called(ctx, inp) - return args.Get(0).(models.GenerateTaskDependenciesResponse), args.Error(1) -} diff --git a/models/hook.go b/models/hook.go deleted file mode 100644 index eec48e3841..0000000000 --- a/models/hook.go +++ /dev/null @@ -1,238 +0,0 @@ -package models - -import ( - "context" - "strings" - - "github.com/pkg/errors" -) - -const ( - HookTypePre HookType = "pre" - HookTypePost HookType = "post" - HookTypeFail HookType = "fail" -) - -type HookType string - -func (ht HookType) String() string { - return string(ht) -} - -// HookPlugin needs to be implemented to register a hook -type HookPlugin interface { - GetHookSchema(context.Context, GetHookSchemaRequest) (GetHookSchemaResponse, error) - - // GetHookQuestions list down all the cli inputs required to generate spec files - // name used for question will be directly mapped to DefaultHookConfig() parameters - GetHookQuestions(context.Context, GetHookQuestionsRequest) (GetHookQuestionsResponse, error) - ValidateHookQuestion(context.Context, ValidateHookQuestionRequest) (ValidateHookQuestionResponse, error) - - // DefaultHookConfig will be passed down to execution unit as env vars - // they will be generated based on results of AskQuestions - // if DryRun is true in PluginOptions, should not throw error for missing inputs - // includes parent task configs - DefaultHookConfig(context.Context, DefaultHookConfigRequest) (DefaultHookConfigResponse, error) - - // DefaultHookAssets will be passed down to execution unit as files - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultHookAssets(context.Context, DefaultHookAssetsRequest) (DefaultHookAssetsResponse, error) -} - -type GetHookSchemaRequest struct{} - -type GetHookSchemaResponse struct { - Name string - Description string - Image string - - // DependsOn returns list of hooks this should be executed after - DependsOn []string - - // Type provides the place of execution, could be before the transformation - // after the transformation, etc - Type HookType - - // SecretPath will be mounted inside the container as volume - // e.g. /opt/secret/auth.json - // here auth.json should be a key in kube secret which gets - // translated to a file mounted in provided path - SecretPath string -} - -type GetHookQuestionsRequest struct { - JobName string - PluginOptions -} - -type GetHookQuestionsResponse struct { - Questions PluginQuestions -} - -type ValidateHookQuestionRequest struct { - PluginOptions - - Answer PluginAnswer -} - -type ValidateHookQuestionResponse struct { - Success bool - Error string -} - -type HookPluginConfig struct { - Name string - Value string -} - -type HookPluginConfigs []HookPluginConfig - -func (c HookPluginConfigs) Get(name string) (HookPluginConfig, bool) { - for _, con := range c { - if strings.ToLower(con.Name) == strings.ToLower(name) { - return con, true - } - } - return HookPluginConfig{}, false -} - -func (c HookPluginConfigs) FromJobSpec(jobSpecConfig JobSpecConfigs) HookPluginConfigs { - taskPluginConfigs := HookPluginConfigs{} - for _, c := range jobSpecConfig { - taskPluginConfigs = append(taskPluginConfigs, HookPluginConfig{ - Name: c.Name, - Value: c.Value, - }) - } - return taskPluginConfigs -} - -func (c HookPluginConfigs) ToJobSpec() JobSpecConfigs { - jsConfigs := JobSpecConfigs{} - for _, c := range c { - jsConfigs = append(jsConfigs, JobSpecConfigItem{ - Name: c.Name, - Value: c.Value, - }) - } - return jsConfigs -} - -type DefaultHookConfigRequest struct { - PluginOptions - - Answers PluginAnswers - - // TaskConfig of the parent on which this task belongs to - TaskConfig TaskPluginConfigs -} - -type DefaultHookConfigResponse struct { - Config HookPluginConfigs -} - -type HookPluginAsset struct { - Name string - Value string -} - -type HookPluginAssets []HookPluginAsset - -func (c HookPluginAssets) Get(name string) (HookPluginAsset, bool) { - for _, con := range c { - if strings.ToLower(con.Name) == strings.ToLower(name) { - return con, true - } - } - return HookPluginAsset{}, false -} - -func (c HookPluginAssets) FromJobSpec(jobSpecAssets JobAssets) HookPluginAssets { - taskPluginAssets := HookPluginAssets{} - for _, c := range jobSpecAssets.GetAll() { - taskPluginAssets = append(taskPluginAssets, HookPluginAsset{ - Name: c.Name, - Value: c.Value, - }) - } - return taskPluginAssets -} - -func (c HookPluginAssets) ToJobSpec() *JobAssets { - jsAssets := []JobSpecAsset{} - for _, c := range c { - jsAssets = append(jsAssets, JobSpecAsset{ - Name: c.Name, - Value: c.Value, - }) - } - return JobAssets{}.New(jsAssets) -} - -type DefaultHookAssetsRequest struct { - PluginOptions - - Answers PluginAnswers - // TaskConfig of the parent on which this task belongs to - TaskConfig TaskPluginConfigs -} - -type DefaultHookAssetsResponse struct { - Assets HookPluginAssets -} - -var ( - // HookRegistry are a list of hooks that are supported in a job - HookRegistry = &supportedHooks{ - data: map[string]HookPlugin{}, - } - ErrUnsupportedHook = errors.New("unsupported hook requested") -) - -type HookRepo interface { - GetByName(string) (HookPlugin, error) - GetAll() []HookPlugin - Add(HookPlugin) error -} - -type supportedHooks struct { - data map[string]HookPlugin -} - -func (s *supportedHooks) GetByName(name string) (HookPlugin, error) { - if unit, ok := s.data[name]; ok { - return unit, nil - } - return nil, errors.Wrap(ErrUnsupportedHook, name) -} - -func (s *supportedHooks) GetAll() []HookPlugin { - list := []HookPlugin{} - for _, unit := range s.data { - list = append(list, unit) - } - return list -} - -func (s *supportedHooks) Add(newUnit HookPlugin) error { - schema, err := newUnit.GetHookSchema(context.TODO(), GetHookSchemaRequest{}) - if err != nil { - return err - } - if schema.Name == "" { - return errors.New("hook name cannot be empty") - } - - // check if name is already used - if _, ok := s.data[schema.Name]; ok { - return errors.Errorf("hook name already in use %s", schema.Name) - } - - // image is a required field - if schema.Image == "" { - return errors.New("hook image cannot be empty") - } - - s.data[schema.Name] = newUnit - return nil -} diff --git a/models/job.go b/models/job.go index f1eadf3dba..99a9b35bd4 100644 --- a/models/job.go +++ b/models/job.go @@ -66,11 +66,7 @@ func (js JobSpec) GetName() string { func (js JobSpec) GetHookByName(name string) (JobSpecHook, error) { for _, hook := range js.Hooks { - schema, err := hook.Unit.GetHookSchema(context.Background(), GetHookSchemaRequest{}) - if err != nil { - return JobSpecHook{}, err - } - if schema.Name == name { + if hook.Unit.Info().Name == name { return hook, nil } } @@ -111,7 +107,7 @@ type JobSpecNotifier struct { } type JobSpecTask struct { - Unit TaskPlugin + Unit *Plugin Config JobSpecConfigs Window JobSpecTaskWindow Priority int @@ -207,7 +203,7 @@ func (w *JobSpecTaskWindow) getWindowDate(today time.Time, windowSize, windowOff type JobSpecHook struct { Config JobSpecConfigs - Unit HookPlugin + Unit *Plugin DependsOn []*JobSpecHook } diff --git a/models/plugin.go b/models/plugin.go new file mode 100644 index 0000000000..c21c731488 --- /dev/null +++ b/models/plugin.go @@ -0,0 +1,463 @@ +package models + +import ( + "context" + "strings" + "time" + + "github.com/pkg/errors" +) + +const ( + // plugin interfaces and mods exposed to users + PluginTypeBase = "base" + + // plugin modes are optional and implemented as needed + ModTypeCLI PluginMod = "cli" + ModTypeDependencyResolver PluginMod = "dependencyresolver" + + HookTypePre HookType = "pre" + HookTypePost HookType = "post" + HookTypeFail HookType = "fail" +) + +var ( + // plugin types + PluginTypeTask = PluginType(InstanceTypeTask.String()) + PluginTypeHook = PluginType(InstanceTypeHook.String()) +) + +type PluginType string +type PluginMod string + +func (pm PluginMod) String() string { + return string(pm) +} + +type HookType string + +func (ht HookType) String() string { + return string(ht) +} + +// BasePlugin needs to be implemented by all the plugins +type BasePlugin interface { + PluginInfo() (*PluginInfoResponse, error) +} + +type PluginInfoRequest struct{} + +type PluginInfoResponse struct { + // Name should as simple as possible with no special characters + // should start with a character, better if all lowercase + Name string + Description string + PluginType PluginType + PluginMods []PluginMod + + PluginVersion string + APIVersion []string + + // Image is the full path to docker container that will be + // scheduled for execution + Image string + + // SecretPath will be mounted inside the container as volume + // e.g. /opt/secret/auth.json + // here auth.json should be a key in kube secret which gets + // translated to a file mounted in provided path + SecretPath string + + // DependsOn returns list of hooks this should be executed after + DependsOn []string + // PluginType provides the place of execution, could be before the transformation + // after the transformation, etc + HookType HookType +} + +// CommandLineMod needs to be implemented by plugins to interact with optimus CLI +type CommandLineMod interface { + BasePlugin + + // GetQuestions list down all the cli inputs required to generate spec files + // name used for question will be directly mapped to DefaultConfig() parameters + GetQuestions(context.Context, GetQuestionsRequest) (*GetQuestionsResponse, error) + ValidateQuestion(context.Context, ValidateQuestionRequest) (*ValidateQuestionResponse, error) + + // DefaultConfig will be passed down to execution unit as env vars + // they will be generated based on results of AskQuestions + // if DryRun is true in PluginOptions, should not throw error for missing inputs + DefaultConfig(context.Context, DefaultConfigRequest) (*DefaultConfigResponse, error) + + // DefaultAssets will be passed down to execution unit as files + // if DryRun is true in PluginOptions, should not throw error for missing inputs + DefaultAssets(context.Context, DefaultAssetsRequest) (*DefaultAssetsResponse, error) + + // CompileAssets overrides default asset compilation + CompileAssets(context.Context, CompileAssetsRequest) (*CompileAssetsResponse, error) +} + +// DependencyResolverMod needs to be implemented for automatic dependency resolution of tasks +type DependencyResolverMod interface { + BasePlugin + + // GenerateTaskDestination derive destination from config and assets + GenerateDestination(context.Context, GenerateDestinationRequest) (*GenerateDestinationResponse, error) + + // GetDependencies returns names of job destination on which this unit + // is dependent on + GenerateDependencies(context.Context, GenerateDependenciesRequest) (*GenerateDependenciesResponse, error) +} + +type PluginOptions struct { + DryRun bool +} + +type PluginQuestion struct { + Name string + Prompt string + Help string + Default string + Multiselect []string + + SubQuestions []PluginSubQuestion +} + +type PluginSubQuestion struct { + // IfValue is used as an if condition to match with user input + // if user value matches this only then ask sub questions + IfValue string + Questions PluginQuestions +} + +type PluginQuestions []PluginQuestion + +func (q PluginQuestions) Get(name string) (PluginQuestion, bool) { + for _, que := range q { + if strings.ToLower(que.Name) == strings.ToLower(name) { + return que, true + } + } + return PluginQuestion{}, false +} + +type PluginAnswer struct { + Question PluginQuestion + Value string +} + +type PluginAnswers []PluginAnswer + +func (ans PluginAnswers) Get(name string) (PluginAnswer, bool) { + for _, a := range ans { + if strings.ToLower(a.Question.Name) == strings.ToLower(name) { + return a, true + } + } + return PluginAnswer{}, false +} + +type GetQuestionsRequest struct { + JobName string + PluginOptions +} + +type GetQuestionsResponse struct { + Questions PluginQuestions +} + +type ValidateQuestionRequest struct { + PluginOptions + + Answer PluginAnswer +} + +type ValidateQuestionResponse struct { + Success bool + Error string +} + +type PluginConfig struct { + Name string + Value string +} + +type PluginConfigs []PluginConfig + +func (c PluginConfigs) Get(name string) (PluginConfig, bool) { + for _, con := range c { + if strings.ToLower(con.Name) == strings.ToLower(name) { + return con, true + } + } + return PluginConfig{}, false +} + +func (c PluginConfigs) FromJobSpec(jobSpecConfig JobSpecConfigs) PluginConfigs { + taskPluginConfigs := PluginConfigs{} + for _, c := range jobSpecConfig { + taskPluginConfigs = append(taskPluginConfigs, PluginConfig{ + + Name: c.Name, + Value: c.Value, + }) + } + return taskPluginConfigs +} + +func (c PluginConfigs) ToJobSpec() JobSpecConfigs { + jsConfigs := JobSpecConfigs{} + for _, c := range c { + jsConfigs = append(jsConfigs, JobSpecConfigItem{ + Name: c.Name, + Value: c.Value, + }) + } + return jsConfigs +} + +type DefaultConfigRequest struct { + PluginOptions + + Answers PluginAnswers +} + +type DefaultConfigResponse struct { + Config PluginConfigs +} + +type PluginAsset struct { + Name string + Value string +} + +type PluginAssets []PluginAsset + +func (c PluginAssets) Get(name string) (PluginAsset, bool) { + for _, con := range c { + if strings.ToLower(con.Name) == strings.ToLower(name) { + return con, true + } + } + return PluginAsset{}, false +} + +func (c PluginAssets) FromJobSpec(jobSpecAssets JobAssets) PluginAssets { + taskPluginAssets := PluginAssets{} + for _, c := range jobSpecAssets.GetAll() { + taskPluginAssets = append(taskPluginAssets, PluginAsset{ + Name: c.Name, + Value: c.Value, + }) + } + return taskPluginAssets +} + +func (c PluginAssets) ToJobSpec() *JobAssets { + jsAssets := []JobSpecAsset{} + for _, c := range c { + jsAssets = append(jsAssets, JobSpecAsset{ + Name: c.Name, + Value: c.Value, + }) + } + return JobAssets{}.New(jsAssets) +} + +type DefaultAssetsRequest struct { + PluginOptions + + Answers PluginAnswers +} + +type DefaultAssetsResponse struct { + Assets PluginAssets +} + +type CompileAssetsRequest struct { + PluginOptions + + // Task configs + Config PluginConfigs + Window JobSpecTaskWindow + + // Job assets + Assets PluginAssets + + // the instance for which these assets are being compiled for + InstanceData []InstanceSpecData + InstanceSchedule time.Time +} + +type CompileAssetsResponse struct { + Assets PluginAssets +} + +type GenerateDestinationRequest struct { + // Task configs + Config PluginConfigs + + // Job assets + Assets PluginAssets + + // Job project + Project ProjectSpec + + PluginOptions +} + +type GenerateDestinationResponse struct { + Destination string +} + +type GenerateDependenciesRequest struct { + // Task configs + Config PluginConfigs + + // Job assets + Assets PluginAssets + + // Job project + Project ProjectSpec + + PluginOptions +} + +type GenerateDependenciesResponse struct { + Dependencies []string +} + +var ( + // PluginRegistry holds all supported plugins for this run + PluginRegistry PluginRepository = NewPluginRepository() + ErrUnsupportedPlugin = errors.New("unsupported plugin requested, make sure its correctly installed") +) + +type PluginRepository interface { + Add(BasePlugin, CommandLineMod, DependencyResolverMod) error + GetByName(string) (*Plugin, error) + GetAll() []*Plugin + GetTasks() []*Plugin + GetHooks() []*Plugin + GetCommandLines() []CommandLineMod + GetDependencyResolvers() []DependencyResolverMod +} + +// Plugin is an extensible module implemented outside the core optimus boundaries +type Plugin struct { + // Base is implemented by all the plugins + Base BasePlugin + + // Mods apply multiple modifications to existing registered plugins which + // can be used in different circumstances + CLIMod CommandLineMod + DependencyMod DependencyResolverMod +} + +func (p *Plugin) Info() *PluginInfoResponse { + resp, _ := p.Base.PluginInfo() + return resp +} + +type registeredPlugins struct { + data map[string]*Plugin +} + +func (s *registeredPlugins) GetByName(name string) (*Plugin, error) { + if unit, ok := s.data[name]; ok { + return unit, nil + } + return nil, errors.Wrap(ErrUnsupportedPlugin, name) +} + +func (s *registeredPlugins) GetAll() []*Plugin { + var list []*Plugin + for _, unit := range s.data { + list = append(list, unit) + } + return list +} + +func (s *registeredPlugins) GetDependencyResolvers() []DependencyResolverMod { + var list []DependencyResolverMod + for _, unit := range s.data { + if unit.DependencyMod != nil { + list = append(list, unit.DependencyMod) + } + } + return list +} + +func (s *registeredPlugins) GetCommandLines() []CommandLineMod { + var list []CommandLineMod + for _, unit := range s.data { + if unit.CLIMod != nil { + list = append(list, unit.CLIMod) + } + } + return list +} + +func (s *registeredPlugins) GetTasks() []*Plugin { + var list []*Plugin + for _, unit := range s.data { + if unit.DependencyMod != nil { + list = append(list, unit) + } + } + return list +} + +func (s *registeredPlugins) GetHooks() []*Plugin { + var list []*Plugin + for _, unit := range s.data { + if unit.Info().PluginType == PluginTypeHook { + list = append(list, unit) + } + } + return list +} + +func (s *registeredPlugins) Add(baseMod BasePlugin, cliMod CommandLineMod, drMod DependencyResolverMod) error { + info, err := baseMod.PluginInfo() + if err != nil { + return err + } + if info.Name == "" { + return errors.New("plugin name cannot be empty") + } + + // check if name is already used + if _, ok := s.data[info.Name]; ok { + return errors.Errorf("plugin name already in use %s", info.Name) + } + + // image is a required field + if info.Image == "" { + return errors.New("plugin image cannot be empty") + } + + // version is a required field + if info.PluginVersion == "" { + return errors.New("plugin version cannot be empty") + } + + switch info.PluginType { + case PluginTypeTask: + case PluginTypeHook: + break + default: + return ErrUnsupportedPlugin + } + + s.data[info.Name] = &Plugin{ + Base: baseMod, + CLIMod: cliMod, + DependencyMod: drMod, + } + return nil +} + +func NewPluginRepository() *registeredPlugins { + return ®isteredPlugins{data: map[string]*Plugin{}} +} diff --git a/models/task.go b/models/task.go deleted file mode 100644 index ee40bc5533..0000000000 --- a/models/task.go +++ /dev/null @@ -1,360 +0,0 @@ -package models - -import ( - "context" - "strings" - "time" - - "github.com/pkg/errors" -) - -// TaskPlugin needs to be implemented to register a task -type TaskPlugin interface { - GetTaskSchema(context.Context, GetTaskSchemaRequest) (GetTaskSchemaResponse, error) - - // GetTaskQuestions list down all the cli inputs required to generate spec files - // name used for question will be directly mapped to DefaultTaskConfig() parameters - GetTaskQuestions(context.Context, GetTaskQuestionsRequest) (GetTaskQuestionsResponse, error) - ValidateTaskQuestion(context.Context, ValidateTaskQuestionRequest) (ValidateTaskQuestionResponse, error) - - // DefaultTaskConfig will be passed down to execution unit as env vars - // they will be generated based on results of AskQuestions - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultTaskConfig(context.Context, DefaultTaskConfigRequest) (DefaultTaskConfigResponse, error) - - // DefaultTaskAssets will be passed down to execution unit as files - // if DryRun is true in PluginOptions, should not throw error for missing inputs - DefaultTaskAssets(context.Context, DefaultTaskAssetsRequest) (DefaultTaskAssetsResponse, error) - - // CompileTaskAssets overrides default asset compilation - CompileTaskAssets(context.Context, CompileTaskAssetsRequest) (CompileTaskAssetsResponse, error) - - // GenerateTaskDestination derive destination from config and assets - GenerateTaskDestination(context.Context, GenerateTaskDestinationRequest) (GenerateTaskDestinationResponse, error) - - // GetDependencies returns names of job destination on which this unit - // is dependent on - GenerateTaskDependencies(context.Context, GenerateTaskDependenciesRequest) (GenerateTaskDependenciesResponse, error) -} - -type PluginOptions struct { - DryRun bool -} - -type GetTaskSchemaRequest struct{} - -type GetTaskSchemaResponse struct { - // Name should as simple as possible with no special characters - // should start with a character, better if all lowercase - Name string - Description string - - // Image is the full path to docker container that will be - // scheduled for execution - Image string - - // SecretPath will be mounted inside the container as volume - // e.g. /opt/secret/auth.json - // here auth.json should be a key in kube secret which gets - // translated to a file mounted in provided path - SecretPath string -} - -type PluginQuestion struct { - Name string - Prompt string - Help string - Default string - Multiselect []string - - SubQuestions []PluginSubQuestion -} - -type PluginSubQuestion struct { - // IfValue is used as an if condition to match with user input - // if user value matches this only then ask sub questions - IfValue string - Questions PluginQuestions -} - -type PluginQuestions []PluginQuestion - -func (q PluginQuestions) Get(name string) (PluginQuestion, bool) { - for _, que := range q { - if strings.ToLower(que.Name) == strings.ToLower(name) { - return que, true - } - } - return PluginQuestion{}, false -} - -type PluginAnswer struct { - Question PluginQuestion - Value string -} - -type PluginAnswers []PluginAnswer - -func (ans PluginAnswers) Get(name string) (PluginAnswer, bool) { - for _, a := range ans { - if strings.ToLower(a.Question.Name) == strings.ToLower(name) { - return a, true - } - } - return PluginAnswer{}, false -} - -type GetTaskQuestionsRequest struct { - JobName string - PluginOptions -} - -type GetTaskQuestionsResponse struct { - Questions PluginQuestions -} - -type ValidateTaskQuestionRequest struct { - PluginOptions - - Answer PluginAnswer -} - -type ValidateTaskQuestionResponse struct { - Success bool - Error string -} - -type TaskPluginConfig struct { - Name string - Value string -} - -type TaskPluginConfigs []TaskPluginConfig - -func (c TaskPluginConfigs) Get(name string) (TaskPluginConfig, bool) { - for _, con := range c { - if strings.ToLower(con.Name) == strings.ToLower(name) { - return con, true - } - } - return TaskPluginConfig{}, false -} - -func (c TaskPluginConfigs) FromJobSpec(jobSpecConfig JobSpecConfigs) TaskPluginConfigs { - taskPluginConfigs := TaskPluginConfigs{} - for _, c := range jobSpecConfig { - taskPluginConfigs = append(taskPluginConfigs, TaskPluginConfig{ - - Name: c.Name, - Value: c.Value, - }) - } - return taskPluginConfigs -} - -func (c TaskPluginConfigs) ToJobSpec() JobSpecConfigs { - jsConfigs := JobSpecConfigs{} - for _, c := range c { - jsConfigs = append(jsConfigs, JobSpecConfigItem{ - Name: c.Name, - Value: c.Value, - }) - } - return jsConfigs -} - -type DefaultTaskConfigRequest struct { - PluginOptions - - Answers PluginAnswers -} - -type DefaultTaskConfigResponse struct { - Config TaskPluginConfigs -} - -type TaskPluginAsset struct { - Name string - Value string -} - -type TaskPluginAssets []TaskPluginAsset - -func (c TaskPluginAssets) Get(name string) (TaskPluginAsset, bool) { - for _, con := range c { - if strings.ToLower(con.Name) == strings.ToLower(name) { - return con, true - } - } - return TaskPluginAsset{}, false -} - -func (c TaskPluginAssets) FromJobSpec(jobSpecAssets JobAssets) TaskPluginAssets { - taskPluginAssets := TaskPluginAssets{} - for _, c := range jobSpecAssets.GetAll() { - taskPluginAssets = append(taskPluginAssets, TaskPluginAsset{ - Name: c.Name, - Value: c.Value, - }) - } - return taskPluginAssets -} - -func (c TaskPluginAssets) ToJobSpec() *JobAssets { - jsAssets := []JobSpecAsset{} - for _, c := range c { - jsAssets = append(jsAssets, JobSpecAsset{ - Name: c.Name, - Value: c.Value, - }) - } - return JobAssets{}.New(jsAssets) -} - -type DefaultTaskAssetsRequest struct { - PluginOptions - - Answers PluginAnswers -} - -type DefaultTaskAssetsResponse struct { - Assets TaskPluginAssets -} - -type CompileTaskAssetsRequest struct { - PluginOptions - - // Task configs - Config TaskPluginConfigs - TaskWindow JobSpecTaskWindow - - // Job assets - Assets TaskPluginAssets - - // the instance for which these assets are being compiled for - InstanceData []InstanceSpecData - InstanceSchedule time.Time -} - -type CompileTaskAssetsResponse struct { - Assets TaskPluginAssets -} - -type GenerateTaskDestinationRequest struct { - // Task configs - Config TaskPluginConfigs - - // Job assets - Assets TaskPluginAssets - - // Job project - Project ProjectSpec - - PluginOptions -} - -type GenerateTaskDestinationResponse struct { - Destination string -} - -type GenerateTaskDependenciesRequest struct { - // Task configs - Config TaskPluginConfigs - - // Job assets - Assets TaskPluginAssets - - // Job project - Project ProjectSpec - - PluginOptions -} - -type GenerateTaskDependenciesResponse struct { - Dependencies []string -} - -var ( - // TaskRegistry is a list of tasks that are supported as base task in a job - TaskRegistry TaskPluginRepository = NewTaskPluginRepository() - ErrUnsupportedTask = errors.New("unsupported task requested") -) - -type TaskPluginRepository interface { - GetByName(string) (TaskPlugin, error) - GetAll() []TaskPlugin - Add(TaskPlugin) error -} - -type supportedTasks struct { - data map[string]TaskPlugin -} - -func (s *supportedTasks) GetByName(name string) (TaskPlugin, error) { - if unit, ok := s.data[name]; ok { - return unit, nil - } - return nil, errors.Wrap(ErrUnsupportedTask, name) -} - -func (s *supportedTasks) GetAll() []TaskPlugin { - var list []TaskPlugin - for _, unit := range s.data { - list = append(list, unit) - } - return list -} - -func (s *supportedTasks) Add(newUnit TaskPlugin) error { - schema, err := newUnit.GetTaskSchema(context.Background(), GetTaskSchemaRequest{}) - if err != nil { - return err - } - if schema.Name == "" { - return errors.New("task name cannot be empty") - } - - // check if name is already used - if _, ok := s.data[schema.Name]; ok { - return errors.Errorf("task name already in use %s", schema.Name) - } - - // image is a required field - if schema.Image == "" { - return errors.New("task image cannot be empty") - } - - // check if we can add the provided task - nAssets, err := newUnit.DefaultTaskAssets(context.Background(), DefaultTaskAssetsRequest{ - PluginOptions: PluginOptions{ - DryRun: true, - }, - }) - if err != nil { - return err - } - for _, existingTask := range s.data { - response, _ := existingTask.DefaultTaskAssets(context.Background(), DefaultTaskAssetsRequest{ - PluginOptions: PluginOptions{ - DryRun: true, - }, - }) - - // config file names need to be unique in assets folder - // so each asset name should be unique - for _, ekey := range response.Assets { - for _, nkey := range nAssets.Assets { - if nkey.Name == ekey.Name { - return errors.Errorf("asset file name already in use %s", nkey.Name) - } - } - } - } - - s.data[schema.Name] = newUnit - return nil -} - -func NewTaskPluginRepository() *supportedTasks { - return &supportedTasks{data: map[string]TaskPlugin{}} -} diff --git a/plugin/base/base.go b/plugin/base/base.go new file mode 100644 index 0000000000..0fd4193940 --- /dev/null +++ b/plugin/base/base.go @@ -0,0 +1,34 @@ +package base + +import ( + hplugin "github.com/hashicorp/go-plugin" +) + +const ( + // ProtocolVersion is the version that must match between core + // and plugins. This should be bumped whenever a change happens in + // one or the other that makes it so that they can't safely communicate. + // This could be adding a new interface value, methods, etc. + ProtocolVersion = 1 + + // Magic values + // should always remain constant + MagicCookieKey = "OP_PLUGIN_MAGIC_COOKIE" + MagicCookieValue = "ksxR4BqCT81whVF2dVEUpYZXwM3pazSkP4IbVc6f2Kns57ypp2c0z0GzQNMdHSUk" +) + +var ( + // Handshake is used to just do a basic handshake between + // a plugin and host. If the handshake fails, a user friendly error is shown. + // This prevents users from executing bad plugins or executing a plugin + // directory. It is a UX feature, not a security feature. + Handshake = hplugin.HandshakeConfig{ + // Need to be set as needed + ProtocolVersion: ProtocolVersion, + + // Magic cookie key and value are just there to make sure you want to connect + // with optimus core, this is not authentication + MagicCookieKey: MagicCookieKey, + MagicCookieValue: MagicCookieValue, + } +) diff --git a/plugin/base/client.go b/plugin/base/client.go new file mode 100644 index 0000000000..bf555e24b8 --- /dev/null +++ b/plugin/base/client.go @@ -0,0 +1,91 @@ +package base + +import ( + "context" + "fmt" + "os" + "strings" + + "github.com/hashicorp/go-hclog" + + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" + "github.com/odpf/optimus/models" +) + +// GRPCClient will be used by core to talk over grpc with plugins +type GRPCClient struct { + Client pbp.BaseClient + Logger hclog.Logger + + // plugin name + Name string +} + +func (m *GRPCClient) PluginInfo() (*models.PluginInfoResponse, error) { + resp, err := m.Client.PluginInfo(context.Background(), &pbp.PluginInfoRequest{}) + if err != nil { + m.makeFatal(err) + return nil, err + } + m.Name = resp.Name + + var ptype models.PluginType + switch resp.PluginType { + case pbp.PluginType_PluginType_TASK: + ptype = models.PluginTypeTask + case pbp.PluginType_PluginType_HOOK: + ptype = models.PluginTypeHook + default: + return nil, fmt.Errorf("plugin is of unknown type: %q", resp.GetPluginType().String()) + } + + var mtype []models.PluginMod + for _, mod := range resp.PluginMods { + switch mod { + case pbp.PluginMod_PluginMod_CLI: + mtype = append(mtype, models.ModTypeCLI) + case pbp.PluginMod_PluginMod_DEPENDENCYRESOLVER: + mtype = append(mtype, models.ModTypeDependencyResolver) + default: + return nil, fmt.Errorf("plugin mod is of unknown type: %q", mod.String()) + } + } + + var htype models.HookType + switch resp.HookType { + case pbp.HookType_HookType_PRE: + htype = models.HookTypePre + case pbp.HookType_HookType_POST: + htype = models.HookTypePost + case pbp.HookType_HookType_FAIL: + htype = models.HookTypeFail + default: + if resp.PluginType == pbp.PluginType_PluginType_HOOK { + return nil, fmt.Errorf("hook is of unknown type: %q", resp.GetHookType().String()) + } + } + + return &models.PluginInfoResponse{ + Name: resp.Name, + Description: resp.Description, + PluginType: ptype, + PluginMods: mtype, + PluginVersion: resp.PluginVersion, + APIVersion: resp.ApiVersion, + Image: resp.Image, + SecretPath: resp.SecretPath, + DependsOn: resp.DependsOn, + HookType: htype, + }, nil +} + +func (m *GRPCClient) makeFatal(err error) { + if strings.Contains(err.Error(), "connection refused") && strings.Contains(err.Error(), "dial unix") { + m.Logger.Error(fmt.Sprintf("Core communication failed with: %s", err.Error())) + } + m.Logger.Error(fmt.Sprintf("Exiting application, plugin crashed %s", m.Name)) + + // TODO(kush.sharma): once plugins are more stable and we have strict checks + // we can remove this fail + os.Exit(1) +} diff --git a/plugin/base/connector.go b/plugin/base/connector.go new file mode 100644 index 0000000000..2189ea6133 --- /dev/null +++ b/plugin/base/connector.go @@ -0,0 +1,61 @@ +package base + +import ( + "context" + + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-plugin" + + "github.com/odpf/optimus/models" + + hplugin "github.com/hashicorp/go-plugin" + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" + "google.golang.org/grpc" +) + +var _ hplugin.GRPCPlugin = &Connector{} + +type Connector struct { + hplugin.NetRPCUnsupportedPlugin + hplugin.GRPCPlugin + + impl models.BasePlugin + logger hclog.Logger +} + +func (p *Connector) GRPCServer(broker *hplugin.GRPCBroker, s *grpc.Server) error { + pbp.RegisterBaseServer(s, &GRPCServer{ + Impl: p.impl, + }) + return nil +} + +func (p *Connector) GRPCClient(ctx context.Context, broker *hplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { + return &GRPCClient{ + Client: pbp.NewBaseClient(c), + }, nil +} + +func NewPlugin(impl interface{}, logger hclog.Logger) *Connector { + return &Connector{ + impl: impl.(models.BasePlugin), + logger: logger, + } +} + +func NewPluginClient(logger hclog.Logger) *Connector { + return &Connector{ + logger: logger, + } +} + +func Serve(t interface{}, logger hclog.Logger) { + hplugin.Serve(&hplugin.ServeConfig{ + HandshakeConfig: Handshake, + Plugins: map[string]plugin.Plugin{ + models.PluginTypeBase: NewPlugin(t, logger), + }, + GRPCServer: plugin.DefaultGRPCServer, + Logger: logger, + }) +} diff --git a/plugin/base/server.go b/plugin/base/server.go new file mode 100644 index 0000000000..a30c3ab0b5 --- /dev/null +++ b/plugin/base/server.go @@ -0,0 +1,65 @@ +package base + +import ( + "context" + "fmt" + + "github.com/odpf/optimus/models" + + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" +) + +// GRPCServer will be used by plugins, this is working as proto adapter +type GRPCServer struct { + // This is the real implementation coming from plugin + Impl models.BasePlugin + + pbp.UnimplementedBaseServer +} + +func (s *GRPCServer) PluginInfo(ctx context.Context, req *pbp.PluginInfoRequest) (*pbp.PluginInfoResponse, error) { + n, err := s.Impl.PluginInfo() + if err != nil { + return nil, err + } + + ptype := pbp.PluginType_PluginType_HOOK + switch n.PluginType { + case models.PluginTypeTask: + ptype = pbp.PluginType_PluginType_TASK + } + + var mtype []pbp.PluginMod + for _, mod := range n.PluginMods { + switch mod { + case models.ModTypeCLI: + mtype = append(mtype, pbp.PluginMod_PluginMod_CLI) + case models.ModTypeDependencyResolver: + mtype = append(mtype, pbp.PluginMod_PluginMod_DEPENDENCYRESOLVER) + default: + return nil, fmt.Errorf("plugin mod is of unknown type: %s", mod) + } + } + + htype := pbp.HookType_HookType_UNKNOWN + switch n.HookType { + case models.HookTypePre: + htype = pbp.HookType_HookType_PRE + case models.HookTypePost: + htype = pbp.HookType_HookType_POST + case models.HookTypeFail: + htype = pbp.HookType_HookType_FAIL + } + return &pbp.PluginInfoResponse{ + Name: n.Name, + PluginType: ptype, + PluginMods: mtype, + PluginVersion: n.PluginVersion, + ApiVersion: n.APIVersion, + Description: n.Description, + Image: n.Image, + DependsOn: n.DependsOn, + HookType: htype, + SecretPath: n.SecretPath, + }, nil +} diff --git a/plugin/hook/adapter.go b/plugin/cli/adapter.go similarity index 60% rename from plugin/hook/adapter.go rename to plugin/cli/adapter.go index 481a28713f..a29a961398 100644 --- a/plugin/hook/adapter.go +++ b/plugin/cli/adapter.go @@ -1,11 +1,11 @@ -package hook +package cli import ( - pb "github.com/odpf/optimus/api/proto/odpf/optimus" + pb "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" "github.com/odpf/optimus/models" ) -func adaptQuestionToProto(q models.PluginQuestion) *pb.PluginQuestion { +func AdaptQuestionToProto(q models.PluginQuestion) *pb.PluginQuestion { pq := &pb.PluginQuestion{ Name: q.Name, Prompt: q.Prompt, @@ -21,7 +21,7 @@ func adaptQuestionToProto(q models.PluginQuestion) *pb.PluginQuestion { Questions: []*pb.PluginQuestion{}, } for _, sqq := range sq.Questions { - protoSubQ.Questions = append(protoSubQ.Questions, adaptQuestionToProto(sqq)) + protoSubQ.Questions = append(protoSubQ.Questions, AdaptQuestionToProto(sqq)) } protoSubQuestions = append(protoSubQuestions, protoSubQ) } @@ -30,7 +30,7 @@ func adaptQuestionToProto(q models.PluginQuestion) *pb.PluginQuestion { return pq } -func adaptQuestionFromProto(q *pb.PluginQuestion) models.PluginQuestion { +func AdaptQuestionFromProto(q *pb.PluginQuestion) models.PluginQuestion { pq := models.PluginQuestion{ Name: q.Name, Prompt: q.Prompt, @@ -46,7 +46,7 @@ func adaptQuestionFromProto(q *pb.PluginQuestion) models.PluginQuestion { Questions: models.PluginQuestions{}, } for _, q := range protoSubQ.Questions { - subQ.Questions = append(subQ.Questions, adaptQuestionFromProto(q)) + subQ.Questions = append(subQ.Questions, AdaptQuestionFromProto(q)) } pq.SubQuestions = append(pq.SubQuestions, subQ) } @@ -54,12 +54,12 @@ func adaptQuestionFromProto(q *pb.PluginQuestion) models.PluginQuestion { return pq } -func adaptConfigsToProto(c models.HookPluginConfigs) *pb.HookConfigs { - tc := &pb.HookConfigs{ - Configs: []*pb.HookConfigs_Config{}, +func AdaptConfigsToProto(c models.PluginConfigs) *pb.Configs { + tc := &pb.Configs{ + Configs: []*pb.Configs_Config{}, } for _, c := range c { - tc.Configs = append(tc.Configs, &pb.HookConfigs_Config{ + tc.Configs = append(tc.Configs, &pb.Configs_Config{ Name: c.Name, Value: c.Value, }) @@ -67,10 +67,10 @@ func adaptConfigsToProto(c models.HookPluginConfigs) *pb.HookConfigs { return tc } -func adaptConfigFromProto(a *pb.HookConfigs) models.HookPluginConfigs { - tc := models.HookPluginConfigs{} +func AdaptConfigsFromProto(a *pb.Configs) models.PluginConfigs { + tc := models.PluginConfigs{} for _, c := range a.Configs { - tc = append(tc, models.HookPluginConfig{ + tc = append(tc, models.PluginConfig{ Name: c.Name, Value: c.Value, }) @@ -78,12 +78,12 @@ func adaptConfigFromProto(a *pb.HookConfigs) models.HookPluginConfigs { return tc } -func adaptAssetsToProto(a models.HookPluginAssets) *pb.HookAssets { - tc := &pb.HookAssets{ - Assets: []*pb.HookAssets_Asset{}, +func AdaptAssetsToProto(a models.PluginAssets) *pb.Assets { + tc := &pb.Assets{ + Assets: []*pb.Assets_Asset{}, } for _, c := range a { - tc.Assets = append(tc.Assets, &pb.HookAssets_Asset{ + tc.Assets = append(tc.Assets, &pb.Assets_Asset{ Name: c.Name, Value: c.Value, }) @@ -91,10 +91,10 @@ func adaptAssetsToProto(a models.HookPluginAssets) *pb.HookAssets { return tc } -func adaptAssetsFromProto(a *pb.HookAssets) models.HookPluginAssets { - tc := models.HookPluginAssets{} +func AdaptAssetsFromProto(a *pb.Assets) models.PluginAssets { + tc := models.PluginAssets{} for _, c := range a.Assets { - tc = append(tc, models.HookPluginAsset{ + tc = append(tc, models.PluginAsset{ Name: c.Name, Value: c.Value, }) diff --git a/plugin/cli/client.go b/plugin/cli/client.go new file mode 100644 index 0000000000..05f8c2d4a4 --- /dev/null +++ b/plugin/cli/client.go @@ -0,0 +1,132 @@ +package cli + +import ( + "context" + "strings" + + "github.com/odpf/optimus/plugin/base" + + "google.golang.org/protobuf/types/known/durationpb" + + "google.golang.org/protobuf/types/known/timestamppb" + + pb "github.com/odpf/optimus/api/proto/odpf/optimus" + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" + "github.com/odpf/optimus/models" +) + +// GRPCClient will be used by core to talk over grpc with plugins +type GRPCClient struct { + client pbp.CLIModClient + + baseClient *base.GRPCClient +} + +func (m *GRPCClient) PluginInfo() (*models.PluginInfoResponse, error) { + return m.baseClient.PluginInfo() +} + +func (m *GRPCClient) GetQuestions(ctx context.Context, request models.GetQuestionsRequest) (*models.GetQuestionsResponse, error) { + resp, err := m.client.GetQuestions(ctx, &pbp.GetQuestionsRequest{ + JobName: request.JobName, + Options: &pbp.PluginOptions{DryRun: request.DryRun}, + }) + if err != nil { + return nil, err + } + var questions []models.PluginQuestion + for _, q := range resp.Questions { + questions = append(questions, AdaptQuestionFromProto(q)) + } + return &models.GetQuestionsResponse{ + Questions: questions, + }, nil +} + +func (m *GRPCClient) ValidateQuestion(ctx context.Context, request models.ValidateQuestionRequest) (*models.ValidateQuestionResponse, error) { + resp, err := m.client.ValidateQuestion(ctx, &pbp.ValidateQuestionRequest{ + Options: &pbp.PluginOptions{DryRun: request.DryRun}, + Answer: &pbp.PluginAnswer{ + Question: AdaptQuestionToProto(request.Answer.Question), + Value: request.Answer.Value, + }, + }) + if err != nil { + return nil, err + } + return &models.ValidateQuestionResponse{ + Success: resp.Success, + Error: resp.Error, + }, nil +} + +func (m *GRPCClient) DefaultConfig(ctx context.Context, request models.DefaultConfigRequest) (*models.DefaultConfigResponse, error) { + var answers []*pbp.PluginAnswer + for _, a := range request.Answers { + answers = append(answers, &pbp.PluginAnswer{ + Question: AdaptQuestionToProto(a.Question), + Value: a.Value, + }) + } + resp, err := m.client.DefaultConfig(ctx, &pbp.DefaultConfigRequest{ + Options: &pbp.PluginOptions{DryRun: request.DryRun}, + Answers: answers, + }) + if err != nil { + return nil, err + } + return &models.DefaultConfigResponse{ + Config: AdaptConfigsFromProto(resp.Config), + }, nil +} + +func (m *GRPCClient) DefaultAssets(ctx context.Context, request models.DefaultAssetsRequest) (*models.DefaultAssetsResponse, error) { + var answers []*pbp.PluginAnswer + for _, a := range request.Answers { + answers = append(answers, &pbp.PluginAnswer{ + Question: AdaptQuestionToProto(a.Question), + Value: a.Value, + }) + } + resp, err := m.client.DefaultAssets(ctx, &pbp.DefaultAssetsRequest{ + Options: &pbp.PluginOptions{DryRun: request.DryRun}, + Answers: answers, + }) + if err != nil { + return nil, err + } + return &models.DefaultAssetsResponse{ + Assets: AdaptAssetsFromProto(resp.Assets), + }, nil +} + +func (m *GRPCClient) CompileAssets(ctx context.Context, request models.CompileAssetsRequest) (*models.CompileAssetsResponse, error) { + schdAt := timestamppb.New(request.InstanceSchedule) + var instanceData []*pb.InstanceSpecData + for _, inst := range request.InstanceData { + instanceData = append(instanceData, &pb.InstanceSpecData{ + Name: inst.Name, + Value: inst.Value, + Type: pb.InstanceSpecData_Type(pb.InstanceSpecData_Type_value[strings.ToUpper(inst.Type)]), + }) + } + + resp, err := m.client.CompileAssets(ctx, &pbp.CompileAssetsRequest{ + Configs: AdaptConfigsToProto(request.Config), + Assets: AdaptAssetsToProto(request.Assets), + Window: &pb.TaskWindow{ + Size: durationpb.New(request.Window.Size), + Offset: durationpb.New(request.Window.Offset), + TruncateTo: request.Window.TruncateTo, + }, + InstanceSchedule: schdAt, + InstanceData: instanceData, + Options: &pbp.PluginOptions{DryRun: request.DryRun}, + }) + if err != nil { + return nil, err + } + return &models.CompileAssetsResponse{ + Assets: AdaptAssetsFromProto(resp.Assets), + }, nil +} diff --git a/plugin/cli/connector.go b/plugin/cli/connector.go new file mode 100644 index 0000000000..37fff858a9 --- /dev/null +++ b/plugin/cli/connector.go @@ -0,0 +1,67 @@ +package cli + +import ( + "context" + + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-plugin" + "github.com/odpf/optimus/plugin/base" + + "github.com/odpf/optimus/models" + + hplugin "github.com/hashicorp/go-plugin" + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" + "google.golang.org/grpc" +) + +var _ hplugin.GRPCPlugin = &Connector{} + +type Connector struct { + hplugin.NetRPCUnsupportedPlugin + hplugin.GRPCPlugin + + impl models.CommandLineMod + logger hclog.Logger +} + +func (p *Connector) GRPCServer(broker *hplugin.GRPCBroker, s *grpc.Server) error { + pbp.RegisterCLIModServer(s, &GRPCServer{ + Impl: p.impl, + }) + return nil +} + +func (p *Connector) GRPCClient(ctx context.Context, broker *hplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { + return &GRPCClient{ + client: pbp.NewCLIModClient(c), + baseClient: &base.GRPCClient{ + Client: pbp.NewBaseClient(c), + Logger: p.logger, + }, + }, nil +} + +func NewPlugin(impl interface{}, logger hclog.Logger) *Connector { + return &Connector{ + impl: impl.(models.CommandLineMod), + logger: logger, + } +} + +func NewPluginClient(logger hclog.Logger) *Connector { + return &Connector{ + logger: logger, + } +} + +func Serve(t interface{}, logger hclog.Logger) { + hplugin.Serve(&hplugin.ServeConfig{ + HandshakeConfig: base.Handshake, + Plugins: map[string]plugin.Plugin{ + models.PluginTypeBase: base.NewPlugin(t, logger), + models.ModTypeCLI.String(): NewPlugin(t, logger), + }, + GRPCServer: plugin.DefaultGRPCServer, + Logger: logger, + }) +} diff --git a/plugin/cli/server.go b/plugin/cli/server.go new file mode 100644 index 0000000000..c30eaf2a17 --- /dev/null +++ b/plugin/cli/server.go @@ -0,0 +1,128 @@ +package cli + +import ( + "context" + "strings" + + "github.com/odpf/optimus/plugin/base" + + "github.com/odpf/optimus/models" + + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" +) + +// GRPCServer will be used by plugins this is working as proto adapter +type GRPCServer struct { + pbp.UnimplementedCLIModServer + + // This is the real implementation coming from plugin + Impl models.CommandLineMod + + baseClient *base.GRPCClient +} + +func (s *GRPCServer) PluginInfo() (*models.PluginInfoResponse, error) { + return s.baseClient.PluginInfo() +} + +func (s *GRPCServer) GetQuestions(ctx context.Context, req *pbp.GetQuestionsRequest) (*pbp.GetQuestionsResponse, error) { + resp, err := s.Impl.GetQuestions(ctx, models.GetQuestionsRequest{ + JobName: req.JobName, + PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, + }) + if err != nil { + return nil, err + } + questions := []*pbp.PluginQuestion{} + for _, q := range resp.Questions { + questions = append(questions, AdaptQuestionToProto(q)) + } + return &pbp.GetQuestionsResponse{Questions: questions}, nil +} + +func (s *GRPCServer) ValidateQuestion(ctx context.Context, req *pbp.ValidateQuestionRequest) (*pbp.ValidateQuestionResponse, error) { + resp, err := s.Impl.ValidateQuestion(ctx, models.ValidateQuestionRequest{ + PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, + Answer: models.PluginAnswer{ + Question: AdaptQuestionFromProto(req.Answer.Question), + Value: req.Answer.Value, + }, + }) + if err != nil { + return nil, err + } + return &pbp.ValidateQuestionResponse{ + Success: resp.Success, + Error: resp.Error, + }, nil +} + +func (s *GRPCServer) DefaultConfig(ctx context.Context, req *pbp.DefaultConfigRequest) (*pbp.DefaultConfigResponse, error) { + answers := models.PluginAnswers{} + for _, ans := range req.Answers { + answers = append(answers, models.PluginAnswer{ + Question: AdaptQuestionFromProto(ans.Question), + Value: ans.Value, + }) + } + resp, err := s.Impl.DefaultConfig(ctx, models.DefaultConfigRequest{ + PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, + Answers: answers, + }) + if err != nil { + return nil, err + } + return &pbp.DefaultConfigResponse{ + Config: AdaptConfigsToProto(resp.Config), + }, nil +} + +func (s *GRPCServer) DefaultAssets(ctx context.Context, req *pbp.DefaultAssetsRequest) (*pbp.DefaultAssetsResponse, error) { + answers := models.PluginAnswers{} + for _, ans := range req.Answers { + answers = append(answers, models.PluginAnswer{ + Question: AdaptQuestionFromProto(ans.Question), + Value: ans.Value, + }) + } + resp, err := s.Impl.DefaultAssets(ctx, models.DefaultAssetsRequest{ + PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, + Answers: answers, + }) + if err != nil { + return nil, err + } + return &pbp.DefaultAssetsResponse{ + Assets: AdaptAssetsToProto(resp.Assets), + }, nil +} + +func (s *GRPCServer) CompileAssets(ctx context.Context, req *pbp.CompileAssetsRequest) (*pbp.CompileAssetsResponse, error) { + var instanceData []models.InstanceSpecData + for _, inst := range req.InstanceData { + instanceData = append(instanceData, models.InstanceSpecData{ + Name: inst.Name, + Value: inst.Value, + Type: strings.ToLower(inst.Type.String()), + }) + } + + resp, err := s.Impl.CompileAssets(ctx, models.CompileAssetsRequest{ + PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, + Config: AdaptConfigsFromProto(req.Configs), + Assets: AdaptAssetsFromProto(req.Assets), + Window: models.JobSpecTaskWindow{ + Size: req.Window.Size.AsDuration(), + Offset: req.Window.Offset.AsDuration(), + TruncateTo: req.Window.TruncateTo, + }, + InstanceData: instanceData, + InstanceSchedule: req.InstanceSchedule.AsTime(), + }) + if err != nil { + return nil, err + } + return &pbp.CompileAssetsResponse{ + Assets: AdaptAssetsToProto(resp.Assets), + }, nil +} diff --git a/plugin/dependencyresolver/adapter.go b/plugin/dependencyresolver/adapter.go new file mode 100644 index 0000000000..fd0b7c6fbf --- /dev/null +++ b/plugin/dependencyresolver/adapter.go @@ -0,0 +1 @@ +package dependencyresolver diff --git a/plugin/dependencyresolver/client.go b/plugin/dependencyresolver/client.go new file mode 100644 index 0000000000..8c7e02f476 --- /dev/null +++ b/plugin/dependencyresolver/client.go @@ -0,0 +1,61 @@ +package dependencyresolver + +import ( + "context" + + "github.com/odpf/optimus/plugin/base" + + "github.com/odpf/optimus/plugin/cli" + + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" + "github.com/odpf/optimus/models" +) + +// GRPCClient will be used by core to talk over grpc with plugins +type GRPCClient struct { + client pbp.DependencyResolverModClient + projectSpecAdapter ProjectSpecAdapter + + baseClient *base.GRPCClient + + // plugin name + name string +} + +func (m *GRPCClient) PluginInfo() (*models.PluginInfoResponse, error) { + return m.baseClient.PluginInfo() +} + +func (m *GRPCClient) SetName(n string) { + m.name = n +} + +func (m *GRPCClient) GenerateDestination(ctx context.Context, request models.GenerateDestinationRequest) (*models.GenerateDestinationResponse, error) { + resp, err := m.client.GenerateDestination(ctx, &pbp.GenerateDestinationRequest{ + Config: cli.AdaptConfigsToProto(request.Config), + Assets: cli.AdaptAssetsToProto(request.Assets), + Project: m.projectSpecAdapter.ToProjectProtoWithSecret(request.Project, models.InstanceTypeTask, m.name), + Options: &pbp.PluginOptions{DryRun: request.DryRun}, + }) + if err != nil { + return nil, err + } + return &models.GenerateDestinationResponse{ + Destination: resp.Destination, + }, nil +} + +func (m *GRPCClient) GenerateDependencies(ctx context.Context, request models.GenerateDependenciesRequest) (*models.GenerateDependenciesResponse, error) { + resp, err := m.client.GenerateDependencies(ctx, &pbp.GenerateDependenciesRequest{ + Config: cli.AdaptConfigsToProto(request.Config), + Assets: cli.AdaptAssetsToProto(request.Assets), + Project: m.projectSpecAdapter.ToProjectProtoWithSecret(request.Project, models.InstanceTypeTask, m.name), + Options: &pbp.PluginOptions{DryRun: request.DryRun}, + }) + if err != nil { + return nil, err + } + return &models.GenerateDependenciesResponse{ + Dependencies: resp.Dependencies, + }, nil +} diff --git a/plugin/dependencyresolver/connector.go b/plugin/dependencyresolver/connector.go new file mode 100644 index 0000000000..7768265092 --- /dev/null +++ b/plugin/dependencyresolver/connector.go @@ -0,0 +1,104 @@ +package dependencyresolver + +import ( + "context" + + "github.com/odpf/optimus/plugin/cli" + + pb "github.com/odpf/optimus/api/proto/odpf/optimus" + + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-plugin" + "github.com/odpf/optimus/plugin/base" + + v1 "github.com/odpf/optimus/api/handler/v1" + + "github.com/odpf/optimus/models" + + hplugin "github.com/hashicorp/go-plugin" + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" + "google.golang.org/grpc" +) + +var _ hplugin.GRPCPlugin = &Connector{} + +type ProjectSpecAdapter interface { + FromProjectProtoWithSecrets(*pb.ProjectSpecification) models.ProjectSpec + ToProjectProtoWithSecret(models.ProjectSpec, models.InstanceType, string) *pb.ProjectSpecification +} + +type Connector struct { + hplugin.NetRPCUnsupportedPlugin + hplugin.GRPCPlugin + + impl models.DependencyResolverMod + projectSpecAdapter ProjectSpecAdapter + + logger hclog.Logger +} + +func (p *Connector) GRPCServer(broker *hplugin.GRPCBroker, s *grpc.Server) error { + pbp.RegisterDependencyResolverModServer(s, &GRPCServer{ + Impl: p.impl, + projectSpecAdapter: p.projectSpecAdapter, + }) + return nil +} + +func (p *Connector) GRPCClient(ctx context.Context, broker *hplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { + return &GRPCClient{ + client: pbp.NewDependencyResolverModClient(c), + projectSpecAdapter: p.projectSpecAdapter, + baseClient: &base.GRPCClient{ + Client: pbp.NewBaseClient(c), + Logger: p.logger, + }, + }, nil +} + +func NewPlugin(impl models.DependencyResolverMod, logger hclog.Logger) *Connector { + return &Connector{ + impl: impl, + projectSpecAdapter: v1.NewAdapter(nil, nil), + logger: logger, + } +} + +func NewPluginWithAdapter(impl models.DependencyResolverMod, logger hclog.Logger, projAdapt ProjectSpecAdapter) *Connector { + return &Connector{ + impl: impl, + logger: logger, + projectSpecAdapter: projAdapt, + } +} + +func NewPluginClient(logger hclog.Logger) *Connector { + return &Connector{ + projectSpecAdapter: v1.NewAdapter(nil, nil), + logger: logger, + } +} + +func ServeWithCLI(t models.DependencyResolverMod, c models.CommandLineMod, logger hclog.Logger) { + startServe(map[string]plugin.Plugin{ + models.PluginTypeBase: base.NewPlugin(t, logger), + models.ModTypeCLI.String(): cli.NewPlugin(c, logger), + models.ModTypeDependencyResolver.String(): NewPlugin(t, logger), + }, logger) +} + +func Serve(t models.DependencyResolverMod, logger hclog.Logger) { + startServe(map[string]plugin.Plugin{ + models.PluginTypeBase: base.NewPlugin(t, logger), + models.ModTypeDependencyResolver.String(): NewPlugin(t, logger), + }, logger) +} + +func startServe(mp map[string]plugin.Plugin, logger hclog.Logger) { + hplugin.Serve(&hplugin.ServeConfig{ + HandshakeConfig: base.Handshake, + Plugins: mp, + GRPCServer: plugin.DefaultGRPCServer, + Logger: logger, + }) +} diff --git a/plugin/dependencyresolver/server.go b/plugin/dependencyresolver/server.go new file mode 100644 index 0000000000..850d56705c --- /dev/null +++ b/plugin/dependencyresolver/server.go @@ -0,0 +1,46 @@ +package dependencyresolver + +import ( + "context" + + "github.com/odpf/optimus/plugin/cli" + + "github.com/odpf/optimus/models" + + pbp "github.com/odpf/optimus/api/proto/odpf/optimus/plugins" +) + +// GRPCServer will be used by plugins this is working as proto adapter +type GRPCServer struct { + // This is the real implementation coming from plugin + Impl models.DependencyResolverMod + + projectSpecAdapter ProjectSpecAdapter + pbp.UnimplementedDependencyResolverModServer +} + +func (s *GRPCServer) GenerateDestination(ctx context.Context, req *pbp.GenerateDestinationRequest) (*pbp.GenerateDestinationResponse, error) { + resp, err := s.Impl.GenerateDestination(ctx, models.GenerateDestinationRequest{ + Config: cli.AdaptConfigsFromProto(req.Config), + Assets: cli.AdaptAssetsFromProto(req.Assets), + Project: s.projectSpecAdapter.FromProjectProtoWithSecrets(req.Project), + PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, + }) + if err != nil { + return nil, err + } + return &pbp.GenerateDestinationResponse{Destination: resp.Destination}, nil +} + +func (s *GRPCServer) GenerateDependencies(ctx context.Context, req *pbp.GenerateDependenciesRequest) (*pbp.GenerateDependenciesResponse, error) { + resp, err := s.Impl.GenerateDependencies(ctx, models.GenerateDependenciesRequest{ + Config: cli.AdaptConfigsFromProto(req.Config), + Assets: cli.AdaptAssetsFromProto(req.Assets), + Project: s.projectSpecAdapter.FromProjectProtoWithSecrets(req.Project), + PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, + }) + if err != nil { + return nil, err + } + return &pbp.GenerateDependenciesResponse{Dependencies: resp.Dependencies}, nil +} diff --git a/plugin/gen.go b/plugin/gen.go index 944b5b897f..af421138b0 100644 --- a/plugin/gen.go +++ b/plugin/gen.go @@ -73,10 +73,10 @@ echo "-- running unit" exec $(eval echo "$@") ` - BinaryNameFormat = "optimus-%s-%s_%s_%s_%s" + BinaryNameFormat = "optimus-%s_%s_%s" ) -// (kush.sharma): deprecated, gonna delete this soon +// (kush.sharma): deprecated, gonna replace it with(#14) func BuildHelper(templateEngine models.TemplateEngine, configBytes []byte, binaryBuildPath, optimusDownloadUrl string, skipDockerBuild, skipBinaryBuild bool) error { inputConfig := BuildConfig{} if err := yaml.Unmarshal(configBytes, &inputConfig); err != nil { @@ -126,7 +126,7 @@ func BuildHelper(templateEngine models.TemplateEngine, configBytes []byte, binar if len(taskPlugin.Binary.OS) > 0 { for _, binOS := range taskPlugin.Binary.OS { for _, binArch := range taskPlugin.Binary.Arch { - binName := strings.ToLower(fmt.Sprintf(BinaryNameFormat, TaskPluginName, pluginName, taskPlugin.Version, binOS, binArch)) + binName := strings.ToLower(fmt.Sprintf(BinaryNameFormat, pluginName, binOS, binArch)) args := []string{ "build", "-ldflags", fmt.Sprintf("-X '%s=%s'", "main.Version", taskPlugin.Version), @@ -199,7 +199,7 @@ func BuildHelper(templateEngine models.TemplateEngine, configBytes []byte, binar if len(hookPlugin.Binary.OS) > 0 { for _, binOS := range hookPlugin.Binary.OS { for _, binArch := range hookPlugin.Binary.Arch { - binName := strings.ToLower(fmt.Sprintf(BinaryNameFormat, HookPluginName, pluginName, hookPlugin.Version, binOS, binArch)) + binName := strings.ToLower(fmt.Sprintf(BinaryNameFormat, pluginName, binOS, binArch)) args := []string{ "build", "-ldflags", fmt.Sprintf("-X '%s=%s'", "main.Version", hookPlugin.Version), diff --git a/plugin/hook/client.go b/plugin/hook/client.go deleted file mode 100644 index d367610cbf..0000000000 --- a/plugin/hook/client.go +++ /dev/null @@ -1,107 +0,0 @@ -package hook - -import ( - "context" - - "github.com/odpf/optimus/plugin/task" - - pb "github.com/odpf/optimus/api/proto/odpf/optimus" - "github.com/odpf/optimus/models" -) - -// GRPCClient will be used by core to talk over grpc with plugins -type GRPCClient struct { - client pb.HookPluginClient - projectSpecAdapter ProjectSpecAdapter -} - -func (m *GRPCClient) GetHookSchema(ctx context.Context, _ models.GetHookSchemaRequest) (models.GetHookSchemaResponse, error) { - resp, err := m.client.GetHookSchema(ctx, &pb.GetHookSchema_Request{}) - if err != nil { - return models.GetHookSchemaResponse{}, err - } - return models.GetHookSchemaResponse{ - Name: resp.Name, - Description: resp.Description, - Image: resp.Image, - DependsOn: resp.DependsOn, - Type: models.HookType(resp.Type), - SecretPath: resp.SecretPath, - }, nil -} - -func (m *GRPCClient) GetHookQuestions(ctx context.Context, request models.GetHookQuestionsRequest) (models.GetHookQuestionsResponse, error) { - resp, err := m.client.GetHookQuestions(ctx, &pb.GetHookQuestions_Request{ - JobName: request.JobName, - Options: &pb.PluginOptions{DryRun: request.DryRun}, - }) - if err != nil { - return models.GetHookQuestionsResponse{}, err - } - var questions []models.PluginQuestion - for _, q := range resp.Questions { - questions = append(questions, adaptQuestionFromProto(q)) - } - return models.GetHookQuestionsResponse{ - Questions: questions, - }, nil -} - -func (m *GRPCClient) ValidateHookQuestion(ctx context.Context, request models.ValidateHookQuestionRequest) (models.ValidateHookQuestionResponse, error) { - resp, err := m.client.ValidateHookQuestion(ctx, &pb.ValidateHookQuestion_Request{ - Options: &pb.PluginOptions{DryRun: request.DryRun}, - Answer: &pb.PluginAnswer{ - Question: adaptQuestionToProto(request.Answer.Question), - Value: request.Answer.Value, - }, - }) - if err != nil { - return models.ValidateHookQuestionResponse{}, err - } - return models.ValidateHookQuestionResponse{ - Success: resp.Success, - Error: resp.Error, - }, nil -} - -func (m *GRPCClient) DefaultHookConfig(ctx context.Context, request models.DefaultHookConfigRequest) (models.DefaultHookConfigResponse, error) { - answers := []*pb.PluginAnswer{} - for _, a := range request.Answers { - answers = append(answers, &pb.PluginAnswer{ - Question: adaptQuestionToProto(a.Question), - Value: a.Value, - }) - } - resp, err := m.client.DefaultHookConfig(ctx, &pb.DefaultHookConfig_Request{ - Options: &pb.PluginOptions{DryRun: request.DryRun}, - Answers: answers, - TaskConfigs: task.AdaptConfigsToProto(request.TaskConfig), - }) - if err != nil { - return models.DefaultHookConfigResponse{}, err - } - return models.DefaultHookConfigResponse{ - Config: adaptConfigFromProto(resp.Config), - }, nil -} - -func (m *GRPCClient) DefaultHookAssets(ctx context.Context, request models.DefaultHookAssetsRequest) (models.DefaultHookAssetsResponse, error) { - answers := []*pb.PluginAnswer{} - for _, a := range request.Answers { - answers = append(answers, &pb.PluginAnswer{ - Question: adaptQuestionToProto(a.Question), - Value: a.Value, - }) - } - resp, err := m.client.DefaultHookAssets(ctx, &pb.DefaultHookAssets_Request{ - Options: &pb.PluginOptions{DryRun: request.DryRun}, - Answers: answers, - TaskConfigs: task.AdaptConfigsToProto(request.TaskConfig), - }) - if err != nil { - return models.DefaultHookAssetsResponse{}, err - } - return models.DefaultHookAssetsResponse{ - Assets: adaptAssetsFromProto(resp.Assets), - }, nil -} diff --git a/plugin/hook/connector.go b/plugin/hook/connector.go deleted file mode 100644 index 07caba5cc0..0000000000 --- a/plugin/hook/connector.go +++ /dev/null @@ -1,63 +0,0 @@ -package hook - -import ( - "context" - - v1 "github.com/odpf/optimus/api/handler/v1" - - "github.com/odpf/optimus/models" - - hplugin "github.com/hashicorp/go-plugin" - pb "github.com/odpf/optimus/api/proto/odpf/optimus" - "google.golang.org/grpc" -) - -var _ hplugin.GRPCPlugin = &connector{} - -type ProjectSpecAdapter interface { - FromProjectProto(*pb.ProjectSpecification) models.ProjectSpec - ToProjectProto(models.ProjectSpec) *pb.ProjectSpecification -} - -type connector struct { - hplugin.NetRPCUnsupportedPlugin - hplugin.GRPCPlugin - - impl models.HookPlugin - projectSpecAdapter ProjectSpecAdapter -} - -func (p *connector) GRPCServer(broker *hplugin.GRPCBroker, s *grpc.Server) error { - pb.RegisterHookPluginServer(s, &GRPCServer{ - Impl: p.impl, - projectSpecAdapter: p.projectSpecAdapter, - }) - return nil -} - -func (p *connector) GRPCClient(ctx context.Context, broker *hplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { - return &GRPCClient{ - client: pb.NewHookPluginClient(c), - projectSpecAdapter: p.projectSpecAdapter, - }, nil -} - -func NewPlugin(impl models.HookPlugin) *connector { - return &connector{ - impl: impl, - projectSpecAdapter: v1.NewAdapter(nil, nil, nil), - } -} - -func NewPluginWithAdapter(impl models.HookPlugin, projAdapt ProjectSpecAdapter) *connector { - return &connector{ - impl: impl, - projectSpecAdapter: projAdapt, - } -} - -func NewPluginClient() *connector { - return &connector{ - projectSpecAdapter: v1.NewAdapter(nil, nil, nil), - } -} diff --git a/plugin/hook/server.go b/plugin/hook/server.go deleted file mode 100644 index d98db815fc..0000000000 --- a/plugin/hook/server.go +++ /dev/null @@ -1,109 +0,0 @@ -package hook - -import ( - "context" - - "github.com/odpf/optimus/plugin/task" - - "github.com/odpf/optimus/models" - - pb "github.com/odpf/optimus/api/proto/odpf/optimus" -) - -// GRPCServer will be used by plugins this is working as proto adapter -type GRPCServer struct { - // This is the real implementation coming from plugin - Impl models.HookPlugin - - projectSpecAdapter ProjectSpecAdapter - pb.UnimplementedHookPluginServer -} - -func (s *GRPCServer) GetHookSchema(ctx context.Context, req *pb.GetHookSchema_Request) (*pb.GetHookSchema_Response, error) { - n, err := s.Impl.GetHookSchema(ctx, models.GetHookSchemaRequest{}) - if err != nil { - return nil, err - } - return &pb.GetHookSchema_Response{ - Name: n.Name, - Description: n.Description, - Image: n.Image, - Type: n.Type.String(), - DependsOn: n.DependsOn, - SecretPath: n.SecretPath, - }, nil -} - -func (s *GRPCServer) GetHookQuestions(ctx context.Context, req *pb.GetHookQuestions_Request) (*pb.GetHookQuestions_Response, error) { - resp, err := s.Impl.GetHookQuestions(ctx, models.GetHookQuestionsRequest{ - JobName: req.JobName, - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - }) - if err != nil { - return nil, err - } - questions := []*pb.PluginQuestion{} - for _, q := range resp.Questions { - questions = append(questions, adaptQuestionToProto(q)) - } - return &pb.GetHookQuestions_Response{Questions: questions}, nil -} - -func (s *GRPCServer) ValidateHookQuestion(ctx context.Context, req *pb.ValidateHookQuestion_Request) (*pb.ValidateHookQuestion_Response, error) { - resp, err := s.Impl.ValidateHookQuestion(ctx, models.ValidateHookQuestionRequest{ - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - Answer: models.PluginAnswer{ - Question: adaptQuestionFromProto(req.Answer.Question), - Value: req.Answer.Value, - }, - }) - if err != nil { - return nil, err - } - return &pb.ValidateHookQuestion_Response{ - Success: resp.Success, - Error: resp.Error, - }, nil -} - -func (s *GRPCServer) DefaultHookConfig(ctx context.Context, req *pb.DefaultHookConfig_Request) (*pb.DefaultHookConfig_Response, error) { - answers := models.PluginAnswers{} - for _, ans := range req.Answers { - answers = append(answers, models.PluginAnswer{ - Question: adaptQuestionFromProto(ans.Question), - Value: ans.Value, - }) - } - resp, err := s.Impl.DefaultHookConfig(ctx, models.DefaultHookConfigRequest{ - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - Answers: answers, - TaskConfig: task.AdaptConfigsFromProto(req.TaskConfigs), - }) - if err != nil { - return nil, err - } - return &pb.DefaultHookConfig_Response{ - Config: adaptConfigsToProto(resp.Config), - }, nil -} - -func (s *GRPCServer) DefaultHookAssets(ctx context.Context, req *pb.DefaultHookAssets_Request) (*pb.DefaultHookAssets_Response, error) { - answers := models.PluginAnswers{} - for _, ans := range req.Answers { - answers = append(answers, models.PluginAnswer{ - Question: adaptQuestionFromProto(ans.Question), - Value: ans.Value, - }) - } - resp, err := s.Impl.DefaultHookAssets(ctx, models.DefaultHookAssetsRequest{ - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - Answers: answers, - TaskConfig: task.AdaptConfigsFromProto(req.TaskConfigs), - }) - if err != nil { - return nil, err - } - return &pb.DefaultHookAssets_Response{ - Assets: adaptAssetsToProto(resp.Assets), - }, nil -} diff --git a/plugin/plugin.go b/plugin/plugin.go index 984f3f09a9..eedcc7442b 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -1,7 +1,6 @@ package plugin import ( - "context" "fmt" "io/ioutil" "os" @@ -10,34 +9,18 @@ import ( "runtime" "strings" - "github.com/pkg/errors" + "github.com/odpf/optimus/plugin/dependencyresolver" + + "github.com/odpf/optimus/plugin/cli" + + "github.com/odpf/optimus/plugin/base" - "github.com/odpf/optimus/plugin/hook" + "github.com/pkg/errors" "github.com/odpf/optimus/models" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-plugin" - "github.com/odpf/optimus/plugin/task" -) - -const ( - // ProtocolVersion is the version that must match between core - // and plugins. This should be bumped whenever a change happens in - // one or the other that makes it so that they can't safely communicate. - // This could be adding a new interface value, methods, etc. - ProtocolVersion = 1 - - // Magic values - // should always remain constant - MagicCookieKey = "OP_PLUGIN_MAGIC_COOKIE" - MagicCookieValue = "ksxR4BqCT81whVF2dVEUpYZXwM3pazSkP4IbVc6f2Kns57ypp2c0z0GzQNMdHSUk" -) - -var ( - // Supported plugin types - TaskPluginName = models.InstanceTypeTask.String() - HookPluginName = models.InstanceTypeHook.String() ) func Initialize(pluginLogger hclog.Logger) error { @@ -45,87 +28,87 @@ func Initialize(pluginLogger hclog.Logger) error { if err != nil { return errors.Wrap(err, "DiscoverPlugins") } - pluginLogger.Debug(fmt.Sprintf("discovering plugins(%d)...", - len(discoveredPlugins[TaskPluginName])+len(discoveredPlugins[HookPluginName]))) - - // handshakeConfigs are used to just do a basic handshake between - // a plugin and host. If the handshake fails, a user friendly error is shown. - // This prevents users from executing bad plugins or executing a plugin - // directory. It is a UX feature, not a security feature. - var handshakeConfig = plugin.HandshakeConfig{ - ProtocolVersion: ProtocolVersion, - MagicCookieKey: MagicCookieKey, - MagicCookieValue: MagicCookieValue, - } + pluginLogger.Debug(fmt.Sprintf("discovering plugins(%d)...", len(discoveredPlugins))) // pluginMap is the map of plugins we can dispense. var pluginMap = map[string]plugin.Plugin{ - TaskPluginName: task.NewPluginClient(), - HookPluginName: hook.NewPluginClient(), + models.PluginTypeBase: base.NewPluginClient(pluginLogger), + models.ModTypeCLI.String(): cli.NewPluginClient(pluginLogger), + models.ModTypeDependencyResolver.String(): dependencyresolver.NewPluginClient(pluginLogger), } - for pluginType, pluginPaths := range discoveredPlugins { - for _, pluginPath := range pluginPaths { - // We're a host! Start by launching the plugin process. - client := plugin.NewClient(&plugin.ClientConfig{ - HandshakeConfig: handshakeConfig, - Plugins: pluginMap, - Cmd: exec.Command(pluginPath), - Managed: true, - AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, - Logger: pluginLogger, - }) - - // Connect via GRPC - rpcClient, err := client.Client() - if err != nil { - return errors.Wrapf(err, "client.Client(): %s", pluginPath) - } + for _, pluginPath := range discoveredPlugins { + // we are core, start by launching the plugin processes + pluginClient := plugin.NewClient(&plugin.ClientConfig{ + HandshakeConfig: base.Handshake, + Plugins: pluginMap, + Cmd: exec.Command(pluginPath), + Managed: true, + AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, + Logger: pluginLogger, + }) + + // connect via GRPC + rpcClient, err := pluginClient.Client() + if err != nil { + return errors.Wrapf(err, "client.Client(): %s", pluginPath) + } - // Request the plugin - raw, err := rpcClient.Dispense(pluginType) - if err != nil { - return errors.Wrapf(err, "rpcClient.Dispense: %s", pluginPath) - } + var baseClient models.BasePlugin + var cliClient models.CommandLineMod + var drClient models.DependencyResolverMod - switch pluginType { - case TaskPluginName: - taskClient := raw.(models.TaskPlugin) - taskSchema, err := taskClient.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) - if err != nil { - return errors.Wrapf(err, "taskClient.GetTaskSchema: %s", pluginPath) - } - pluginLogger.Debug("tested plugin communication for task", taskSchema.Name) + // request plugin as base + raw, err := rpcClient.Dispense(models.PluginTypeBase) + if err != nil { + pluginClient.Kill() + return errors.Wrapf(err, "rpcClient.Dispense: %s", pluginPath) + } + baseClient = raw.(models.BasePlugin) + baseInfo, err := baseClient.PluginInfo() + if err != nil { + return errors.Wrapf(err, "failed to read plugin info: %s", pluginPath) + } + pluginLogger.Debug("plugin connection established: ", baseInfo.Name) - { - // update name, will be later used for filtering secrets - taskGRPCClient := raw.(*task.GRPCClient) - taskGRPCClient.Name = taskSchema.Name - } + if modSupported(baseInfo.PluginMods, models.ModTypeCLI) { + // create a client with cli mod + if rawMod, err := rpcClient.Dispense(models.ModTypeCLI.String()); err == nil { + cliClient = rawMod.(models.CommandLineMod) + pluginLogger.Debug(fmt.Sprintf("%s mod found for: %s", models.ModTypeCLI, baseInfo.Name)) + } + } - if err := models.TaskRegistry.Add(taskClient); err != nil { - return errors.Wrapf(err, "models.TaskRegistry.Add: %s", pluginPath) - } - case HookPluginName: - hookClient := raw.(models.HookPlugin) - hookSchema, err := hookClient.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return errors.Wrapf(err, "hookClient.GetTaskSchema: %s", pluginPath) - } - pluginLogger.Debug("tested plugin communication for hook ", hookSchema.Name) + if modSupported(baseInfo.PluginMods, models.ModTypeDependencyResolver) { + // create a client with dependency resolver mod + if rawMod, err := rpcClient.Dispense(models.ModTypeDependencyResolver.String()); err == nil { + drClient = rawMod.(models.DependencyResolverMod) + pluginLogger.Debug(fmt.Sprintf("%s mod found for: %s", models.ModTypeDependencyResolver, baseInfo.Name)) - if err := models.HookRegistry.Add(hookClient); err != nil { - return errors.Wrapf(err, "models.HookRegistry.Add: %s", pluginPath) - } - default: - return errors.Wrapf(err, "unsupported plugin type: %s", pluginType) + // cache name + drGRPCClient := rawMod.(*dependencyresolver.GRPCClient) + drGRPCClient.SetName(baseInfo.Name) } } + + if err := models.PluginRegistry.Add(baseClient, cliClient, drClient); err != nil { + return errors.Wrapf(err, "PluginRegistry.Add: %s", pluginPath) + } + pluginLogger.Debug("plugin ready: ", baseInfo.Name) } return nil } +func modSupported(mods []models.PluginMod, mod models.PluginMod) bool { + for _, m := range mods { + if m == mod { + return true + } + } + return false +} + // DiscoverPlugins look for plugin binaries in following folders // order to search is top to down // ./ @@ -136,15 +119,15 @@ func Initialize(pluginLogger hclog.Logger) error { // /usr/local/bin // // for duplicate binaries(even with different versions for now), only the first found will be used -// sample plugin name: optimus-task-myplugin_0.1_linux_amd64 -func DiscoverPlugins(pluginLogger hclog.Logger) (map[string][]string, error) { +// sample plugin name: optimus-myplugin_linux_amd64 +func DiscoverPlugins(pluginLogger hclog.Logger) ([]string, error) { var ( prefix = "optimus-" suffix = fmt.Sprintf("_%s_%s", runtime.GOOS, runtime.GOARCH) - discoveredPlugins = map[string][]string{} + discoveredPlugins []string ) - dirs := []string{} + var dirs []string // current working directory if p, err := os.Getwd(); err == nil { dirs = append(dirs, p) @@ -194,43 +177,56 @@ func DiscoverPlugins(pluginLogger hclog.Logger) (map[string][]string, error) { continue } - // get plugin type - nameParts := strings.Split(fullName, "-") - if len(nameParts) < 3 { + if len(strings.Split(fullName, "-")) < 2 { continue } - pluginName := strings.Split(nameParts[2], "_")[0] + // get plugin name + pluginName := strings.Split(fullName, "_")[0] absPath = filepath.Clean(absPath) - switch nameParts[1] { - case TaskPluginName: - // check for duplicate binaries, could be different versions - // if we have already discovered one, ignore rest - isAlreadyFound := false - for _, storedName := range discoveredPlugins[TaskPluginName] { - if strings.Contains(storedName, pluginName) { - isAlreadyFound = true - } - } - if !isAlreadyFound { - discoveredPlugins[TaskPluginName] = append(discoveredPlugins[TaskPluginName], absPath) - } - case HookPluginName: - isAlreadyFound := false - for _, storedName := range discoveredPlugins[HookPluginName] { - if strings.Contains(storedName, pluginName) { - isAlreadyFound = true - } + // check for duplicate binaries, could be different versions + // if we have already discovered one, ignore rest + isAlreadyFound := false + for _, storedName := range discoveredPlugins { + if strings.Contains(storedName, pluginName) { + isAlreadyFound = true } + } - if !isAlreadyFound { - discoveredPlugins[HookPluginName] = append(discoveredPlugins[HookPluginName], absPath) - } - default: - // skip + if !isAlreadyFound { + discoveredPlugins = append(discoveredPlugins, absPath) } } } return discoveredPlugins, nil } + +// Factory returns a new plugin instance +type Factory func(log hclog.Logger) interface{} + +// Serve is used to serve a new Nomad plugin +func Serve(f Factory) { + logger := hclog.New(&hclog.LoggerOptions{ + Level: hclog.Trace, + JSONFormat: true, + }) + servePlugin(f(logger), logger) +} + +func servePlugin(plugin interface{}, logger hclog.Logger) { + switch p := plugin.(type) { + case models.DependencyResolverMod: + if cliPlugin, ok := plugin.(models.CommandLineMod); ok { + dependencyresolver.ServeWithCLI(p, cliPlugin, logger) + } else { + dependencyresolver.Serve(p, logger) + } + case models.CommandLineMod: + cli.Serve(p, logger) + case models.BasePlugin: + base.Serve(p, logger) + default: + logger.Error("Unsupported plugin type interface") + } +} diff --git a/plugin/task/adapter.go b/plugin/task/adapter.go deleted file mode 100644 index eb80504477..0000000000 --- a/plugin/task/adapter.go +++ /dev/null @@ -1,103 +0,0 @@ -package task - -import ( - pb "github.com/odpf/optimus/api/proto/odpf/optimus" - "github.com/odpf/optimus/models" -) - -func adaptQuestionToProto(q models.PluginQuestion) *pb.PluginQuestion { - pq := &pb.PluginQuestion{ - Name: q.Name, - Prompt: q.Prompt, - Help: q.Help, - Default: q.Default, - Multiselect: q.Multiselect, - } - var protoSubQuestions []*pb.PluginQuestion_SubQuestion - if len(q.SubQuestions) > 0 { - for _, sq := range q.SubQuestions { - protoSubQ := &pb.PluginQuestion_SubQuestion{ - IfValue: sq.IfValue, - Questions: []*pb.PluginQuestion{}, - } - for _, sqq := range sq.Questions { - protoSubQ.Questions = append(protoSubQ.Questions, adaptQuestionToProto(sqq)) - } - protoSubQuestions = append(protoSubQuestions, protoSubQ) - } - pq.SubQuestions = protoSubQuestions - } - return pq -} - -func adaptQuestionFromProto(q *pb.PluginQuestion) models.PluginQuestion { - pq := models.PluginQuestion{ - Name: q.Name, - Prompt: q.Prompt, - Help: q.Help, - Default: q.Default, - Multiselect: q.Multiselect, - SubQuestions: []models.PluginSubQuestion{}, - } - if len(q.SubQuestions) > 0 { - for _, protoSubQ := range q.SubQuestions { - subQ := models.PluginSubQuestion{ - IfValue: protoSubQ.IfValue, - Questions: models.PluginQuestions{}, - } - for _, q := range protoSubQ.Questions { - subQ.Questions = append(subQ.Questions, adaptQuestionFromProto(q)) - } - pq.SubQuestions = append(pq.SubQuestions, subQ) - } - } - return pq -} - -func AdaptConfigsToProto(c models.TaskPluginConfigs) *pb.TaskConfigs { - tc := &pb.TaskConfigs{ - Configs: []*pb.TaskConfigs_Config{}, - } - for _, c := range c { - tc.Configs = append(tc.Configs, &pb.TaskConfigs_Config{ - Name: c.Name, - Value: c.Value, - }) - } - return tc -} - -func AdaptConfigsFromProto(a *pb.TaskConfigs) models.TaskPluginConfigs { - tc := models.TaskPluginConfigs{} - for _, c := range a.Configs { - tc = append(tc, models.TaskPluginConfig{ - Name: c.Name, - Value: c.Value, - }) - } - return tc -} - -func adaptAssetsToProto(a models.TaskPluginAssets) *pb.TaskAssets { - tc := &pb.TaskAssets{ - Assets: []*pb.TaskAssets_Asset{}, - } - for _, c := range a { - tc.Assets = append(tc.Assets, &pb.TaskAssets_Asset{ - Name: c.Name, - Value: c.Value, - }) - } - return tc -} - -func adaptAssetsFromProto(a *pb.TaskAssets) models.TaskPluginAssets { - tc := models.TaskPluginAssets{} - for _, c := range a.Assets { - tc = append(tc, models.TaskPluginAsset{ - Name: c.Name, - Value: c.Value, - }) - } - return tc -} diff --git a/plugin/task/client.go b/plugin/task/client.go deleted file mode 100644 index edebd53727..0000000000 --- a/plugin/task/client.go +++ /dev/null @@ -1,183 +0,0 @@ -package task - -import ( - "context" - "fmt" - "os" - "strings" - - "github.com/odpf/optimus/core/logger" - - "github.com/golang/protobuf/ptypes" - pb "github.com/odpf/optimus/api/proto/odpf/optimus" - "github.com/odpf/optimus/models" -) - -// GRPCClient will be used by core to talk over grpc with plugins -type GRPCClient struct { - client pb.TaskPluginClient - projectSpecAdapter ProjectSpecAdapter - - // plugin name, used in filtering project secrets - Name string -} - -func (m *GRPCClient) GetTaskSchema(ctx context.Context, _ models.GetTaskSchemaRequest) (models.GetTaskSchemaResponse, error) { - resp, err := m.client.GetTaskSchema(ctx, &pb.GetTaskSchema_Request{}) - if err != nil { - ifFailToReachServerThenCrash(err) - return models.GetTaskSchemaResponse{}, err - } - return models.GetTaskSchemaResponse{ - Name: resp.Name, - Description: resp.Description, - Image: resp.Image, - SecretPath: resp.SecretPath, - }, nil -} - -func (m *GRPCClient) GetTaskQuestions(ctx context.Context, request models.GetTaskQuestionsRequest) (models.GetTaskQuestionsResponse, error) { - resp, err := m.client.GetTaskQuestions(ctx, &pb.GetTaskQuestions_Request{ - JobName: request.JobName, - Options: &pb.PluginOptions{DryRun: request.DryRun}, - }) - if err != nil { - return models.GetTaskQuestionsResponse{}, err - } - var questions []models.PluginQuestion - for _, q := range resp.Questions { - questions = append(questions, adaptQuestionFromProto(q)) - } - return models.GetTaskQuestionsResponse{ - Questions: questions, - }, nil -} - -func (m *GRPCClient) ValidateTaskQuestion(ctx context.Context, request models.ValidateTaskQuestionRequest) (models.ValidateTaskQuestionResponse, error) { - resp, err := m.client.ValidateTaskQuestion(ctx, &pb.ValidateTaskQuestion_Request{ - Options: &pb.PluginOptions{DryRun: request.DryRun}, - Answer: &pb.PluginAnswer{ - Question: adaptQuestionToProto(request.Answer.Question), - Value: request.Answer.Value, - }, - }) - if err != nil { - return models.ValidateTaskQuestionResponse{}, err - } - return models.ValidateTaskQuestionResponse{ - Success: resp.Success, - Error: resp.Error, - }, nil -} - -func (m *GRPCClient) DefaultTaskConfig(ctx context.Context, request models.DefaultTaskConfigRequest) (models.DefaultTaskConfigResponse, error) { - answers := []*pb.PluginAnswer{} - for _, a := range request.Answers { - answers = append(answers, &pb.PluginAnswer{ - Question: adaptQuestionToProto(a.Question), - Value: a.Value, - }) - } - resp, err := m.client.DefaultTaskConfig(ctx, &pb.DefaultTaskConfig_Request{ - Options: &pb.PluginOptions{DryRun: request.DryRun}, - Answers: answers, - }) - if err != nil { - return models.DefaultTaskConfigResponse{}, err - } - return models.DefaultTaskConfigResponse{ - Config: AdaptConfigsFromProto(resp.Configs), - }, nil -} - -func (m *GRPCClient) DefaultTaskAssets(ctx context.Context, request models.DefaultTaskAssetsRequest) (models.DefaultTaskAssetsResponse, error) { - answers := []*pb.PluginAnswer{} - for _, a := range request.Answers { - answers = append(answers, &pb.PluginAnswer{ - Question: adaptQuestionToProto(a.Question), - Value: a.Value, - }) - } - resp, err := m.client.DefaultTaskAssets(ctx, &pb.DefaultTaskAssets_Request{ - Options: &pb.PluginOptions{DryRun: request.DryRun}, - Answers: answers, - }) - if err != nil { - return models.DefaultTaskAssetsResponse{}, err - } - return models.DefaultTaskAssetsResponse{ - Assets: adaptAssetsFromProto(resp.Assets), - }, nil -} - -func (m *GRPCClient) CompileTaskAssets(ctx context.Context, request models.CompileTaskAssetsRequest) (models.CompileTaskAssetsResponse, error) { - schdAt, err := ptypes.TimestampProto(request.InstanceSchedule) - if err != nil { - return models.CompileTaskAssetsResponse{}, err - } - instanceData := []*pb.InstanceSpecData{} - for _, inst := range request.InstanceData { - instanceData = append(instanceData, &pb.InstanceSpecData{ - Name: inst.Name, - Value: inst.Value, - Type: pb.InstanceSpecData_Type(pb.InstanceSpecData_Type_value[strings.ToUpper(inst.Type)]), - }) - } - - resp, err := m.client.CompileTaskAssets(ctx, &pb.CompileTaskAssets_Request{ - JobConfigs: AdaptConfigsToProto(request.Config), - JobAssets: adaptAssetsToProto(request.Assets), - TaskWindow: &pb.TaskWindow{ - Size: ptypes.DurationProto(request.TaskWindow.Size), - Offset: ptypes.DurationProto(request.TaskWindow.Offset), - TruncateTo: request.TaskWindow.TruncateTo, - }, - InstanceSchedule: schdAt, - InstanceData: instanceData, - Options: &pb.PluginOptions{DryRun: request.DryRun}, - }) - if err != nil { - return models.CompileTaskAssetsResponse{}, err - } - return models.CompileTaskAssetsResponse{ - Assets: adaptAssetsFromProto(resp.Assets), - }, nil -} - -func (m *GRPCClient) GenerateTaskDestination(ctx context.Context, request models.GenerateTaskDestinationRequest) (models.GenerateTaskDestinationResponse, error) { - resp, err := m.client.GenerateTaskDestination(ctx, &pb.GenerateTaskDestination_Request{ - JobConfig: AdaptConfigsToProto(request.Config), - JobAssets: adaptAssetsToProto(request.Assets), - Project: m.projectSpecAdapter.ToProjectProtoWithSecret(request.Project, models.InstanceTypeTask, m.Name), - Options: &pb.PluginOptions{DryRun: request.DryRun}, - }) - if err != nil { - return models.GenerateTaskDestinationResponse{}, err - } - return models.GenerateTaskDestinationResponse{ - Destination: resp.Destination, - }, nil -} - -func (m *GRPCClient) GenerateTaskDependencies(ctx context.Context, request models.GenerateTaskDependenciesRequest) (models.GenerateTaskDependenciesResponse, error) { - resp, err := m.client.GenerateTaskDependencies(ctx, &pb.GenerateTaskDependencies_Request{ - JobConfig: AdaptConfigsToProto(request.Config), - JobAssets: adaptAssetsToProto(request.Assets), - Project: m.projectSpecAdapter.ToProjectProtoWithSecret(request.Project, models.InstanceTypeTask, m.Name), - Options: &pb.PluginOptions{DryRun: request.DryRun}, - }) - if err != nil { - return models.GenerateTaskDependenciesResponse{}, err - } - return models.GenerateTaskDependenciesResponse{ - Dependencies: resp.Dependencies, - }, nil -} - -func ifFailToReachServerThenCrash(err error) { - if strings.Contains(err.Error(), "connection refused") && strings.Contains(err.Error(), "dial unix") { - logger.E(fmt.Sprintf("connector communication failed with: %s", err.Error())) - // TODO(kush.sharma): once plugins are more stable, remove this fail - os.Exit(1) - } -} diff --git a/plugin/task/connector.go b/plugin/task/connector.go deleted file mode 100644 index a7e8cebedd..0000000000 --- a/plugin/task/connector.go +++ /dev/null @@ -1,63 +0,0 @@ -package task - -import ( - "context" - - v1 "github.com/odpf/optimus/api/handler/v1" - - "github.com/odpf/optimus/models" - - hplugin "github.com/hashicorp/go-plugin" - pb "github.com/odpf/optimus/api/proto/odpf/optimus" - "google.golang.org/grpc" -) - -var _ hplugin.GRPCPlugin = &connector{} - -type ProjectSpecAdapter interface { - FromProjectProtoWithSecrets(*pb.ProjectSpecification) models.ProjectSpec - ToProjectProtoWithSecret(models.ProjectSpec, models.InstanceType, string) *pb.ProjectSpecification -} - -type connector struct { - hplugin.NetRPCUnsupportedPlugin - hplugin.GRPCPlugin - - impl models.TaskPlugin - projectSpecAdapter ProjectSpecAdapter -} - -func (p *connector) GRPCServer(broker *hplugin.GRPCBroker, s *grpc.Server) error { - pb.RegisterTaskPluginServer(s, &GRPCServer{ - Impl: p.impl, - projectSpecAdapter: p.projectSpecAdapter, - }) - return nil -} - -func (p *connector) GRPCClient(ctx context.Context, broker *hplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { - return &GRPCClient{ - client: pb.NewTaskPluginClient(c), - projectSpecAdapter: p.projectSpecAdapter, - }, nil -} - -func NewPlugin(impl models.TaskPlugin) *connector { - return &connector{ - impl: impl, - projectSpecAdapter: v1.NewAdapter(nil, nil, nil), - } -} - -func NewPluginWithAdapter(impl models.TaskPlugin, projAdapt ProjectSpecAdapter) *connector { - return &connector{ - impl: impl, - projectSpecAdapter: projAdapt, - } -} - -func NewPluginClient() *connector { - return &connector{ - projectSpecAdapter: v1.NewAdapter(nil, nil, nil), - } -} diff --git a/plugin/task/server.go b/plugin/task/server.go deleted file mode 100644 index 69cff1e69b..0000000000 --- a/plugin/task/server.go +++ /dev/null @@ -1,159 +0,0 @@ -package task - -import ( - "context" - "strings" - - "github.com/odpf/optimus/models" - - pb "github.com/odpf/optimus/api/proto/odpf/optimus" -) - -// GRPCServer will be used by plugins this is working as proto adapter -type GRPCServer struct { - // This is the real implementation coming from plugin - Impl models.TaskPlugin - - projectSpecAdapter ProjectSpecAdapter - pb.UnimplementedTaskPluginServer -} - -func (s *GRPCServer) GetTaskSchema(ctx context.Context, req *pb.GetTaskSchema_Request) (*pb.GetTaskSchema_Response, error) { - n, err := s.Impl.GetTaskSchema(ctx, models.GetTaskSchemaRequest{}) - if err != nil { - return nil, err - } - return &pb.GetTaskSchema_Response{ - Name: n.Name, - Description: n.Description, - Image: n.Image, - SecretPath: n.SecretPath, - }, nil -} - -func (s *GRPCServer) GetTaskQuestions(ctx context.Context, req *pb.GetTaskQuestions_Request) (*pb.GetTaskQuestions_Response, error) { - resp, err := s.Impl.GetTaskQuestions(ctx, models.GetTaskQuestionsRequest{ - JobName: req.JobName, - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - }) - if err != nil { - return nil, err - } - questions := []*pb.PluginQuestion{} - for _, q := range resp.Questions { - questions = append(questions, adaptQuestionToProto(q)) - } - return &pb.GetTaskQuestions_Response{Questions: questions}, nil -} - -func (s *GRPCServer) ValidateTaskQuestion(ctx context.Context, req *pb.ValidateTaskQuestion_Request) (*pb.ValidateTaskQuestion_Response, error) { - resp, err := s.Impl.ValidateTaskQuestion(ctx, models.ValidateTaskQuestionRequest{ - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - Answer: models.PluginAnswer{ - Question: adaptQuestionFromProto(req.Answer.Question), - Value: req.Answer.Value, - }, - }) - if err != nil { - return nil, err - } - return &pb.ValidateTaskQuestion_Response{ - Success: resp.Success, - Error: resp.Error, - }, nil -} - -func (s *GRPCServer) DefaultTaskConfig(ctx context.Context, req *pb.DefaultTaskConfig_Request) (*pb.DefaultTaskConfig_Response, error) { - answers := models.PluginAnswers{} - for _, ans := range req.Answers { - answers = append(answers, models.PluginAnswer{ - Question: adaptQuestionFromProto(ans.Question), - Value: ans.Value, - }) - } - resp, err := s.Impl.DefaultTaskConfig(ctx, models.DefaultTaskConfigRequest{ - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - Answers: answers, - }) - if err != nil { - return nil, err - } - return &pb.DefaultTaskConfig_Response{ - Configs: AdaptConfigsToProto(resp.Config), - }, nil -} - -func (s *GRPCServer) DefaultTaskAssets(ctx context.Context, req *pb.DefaultTaskAssets_Request) (*pb.DefaultTaskAssets_Response, error) { - answers := models.PluginAnswers{} - for _, ans := range req.Answers { - answers = append(answers, models.PluginAnswer{ - Question: adaptQuestionFromProto(ans.Question), - Value: ans.Value, - }) - } - resp, err := s.Impl.DefaultTaskAssets(ctx, models.DefaultTaskAssetsRequest{ - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - Answers: answers, - }) - if err != nil { - return nil, err - } - return &pb.DefaultTaskAssets_Response{ - Assets: adaptAssetsToProto(resp.Assets), - }, nil -} - -func (s *GRPCServer) CompileTaskAssets(ctx context.Context, req *pb.CompileTaskAssets_Request) (*pb.CompileTaskAssets_Response, error) { - instanceData := []models.InstanceSpecData{} - for _, inst := range req.InstanceData { - instanceData = append(instanceData, models.InstanceSpecData{ - Name: inst.Name, - Value: inst.Value, - Type: strings.ToLower(inst.Type.String()), - }) - } - resp, err := s.Impl.CompileTaskAssets(ctx, models.CompileTaskAssetsRequest{ - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - Config: AdaptConfigsFromProto(req.JobConfigs), - Assets: adaptAssetsFromProto(req.JobAssets), - TaskWindow: models.JobSpecTaskWindow{ - Size: req.TaskWindow.Size.AsDuration(), - Offset: req.TaskWindow.Offset.AsDuration(), - TruncateTo: req.TaskWindow.TruncateTo, - }, - InstanceData: instanceData, - InstanceSchedule: req.InstanceSchedule.AsTime(), - }) - if err != nil { - return nil, err - } - return &pb.CompileTaskAssets_Response{ - Assets: adaptAssetsToProto(resp.Assets), - }, nil -} - -func (s *GRPCServer) GenerateTaskDestination(ctx context.Context, req *pb.GenerateTaskDestination_Request) (*pb.GenerateTaskDestination_Response, error) { - resp, err := s.Impl.GenerateTaskDestination(ctx, models.GenerateTaskDestinationRequest{ - Config: AdaptConfigsFromProto(req.JobConfig), - Assets: adaptAssetsFromProto(req.JobAssets), - Project: s.projectSpecAdapter.FromProjectProtoWithSecrets(req.Project), - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - }) - if err != nil { - return nil, err - } - return &pb.GenerateTaskDestination_Response{Destination: resp.Destination}, nil -} - -func (s *GRPCServer) GenerateTaskDependencies(ctx context.Context, req *pb.GenerateTaskDependencies_Request) (*pb.GenerateTaskDependencies_Response, error) { - resp, err := s.Impl.GenerateTaskDependencies(ctx, models.GenerateTaskDependenciesRequest{ - Config: AdaptConfigsFromProto(req.JobConfig), - Assets: adaptAssetsFromProto(req.JobAssets), - Project: s.projectSpecAdapter.FromProjectProtoWithSecrets(req.Project), - PluginOptions: models.PluginOptions{DryRun: req.Options.DryRun}, - }) - if err != nil { - return nil, err - } - return &pb.GenerateTaskDependencies_Response{Dependencies: resp.Dependencies}, nil -} diff --git a/store/local/job_spec_adapter.go b/store/local/job_spec_adapter.go index 8936cd71d8..3be463854c 100644 --- a/store/local/job_spec_adapter.go +++ b/store/local/job_spec_adapter.go @@ -1,7 +1,6 @@ package local import ( - "context" "regexp" "strconv" "strings" @@ -88,8 +87,8 @@ type JobHook struct { } // ToSpec converts the local's JobHook representation to the optimus' models.JobSpecHook -func (a JobHook) ToSpec(supportedHookRepo models.HookRepo) (models.JobSpecHook, error) { - hookUnit, err := supportedHookRepo.GetByName(a.Name) +func (a JobHook) ToSpec(pluginsRepo models.PluginRepository) (models.JobSpecHook, error) { + hookUnit, err := pluginsRepo.GetByName(a.Name) if err != nil { return models.JobSpecHook{}, errors.Wrap(err, "spec reading error") } @@ -101,12 +100,8 @@ func (a JobHook) ToSpec(supportedHookRepo models.HookRepo) (models.JobSpecHook, // FromSpec converts the optimus' models.JobSpecHook representation to the local's JobHook func (a JobHook) FromSpec(spec models.JobSpecHook) (JobHook, error) { - schema, err := spec.Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return JobHook{}, err - } return JobHook{ - Name: schema.Name, + Name: spec.Unit.Info().Name, Config: JobSpecConfigToYamlSlice(spec.Config), }, nil } @@ -336,8 +331,7 @@ type JobDependency struct { } type JobSpecAdapter struct { - supportedTaskRepo models.TaskPluginRepository - supportedHookRepo models.HookRepo + pluginRepo models.PluginRepository } func (adapt JobSpecAdapter) ToSpec(conf Job) (models.JobSpec, error) { @@ -377,7 +371,7 @@ func (adapt JobSpecAdapter) ToSpec(conf Job) (models.JobSpec, error) { // prep hooks var hooks []models.JobSpecHook for _, hook := range conf.Hooks { - adaptHook, err := hook.ToSpec(adapt.supportedHookRepo) + adaptHook, err := hook.ToSpec(adapt.pluginRepo) if err != nil { return models.JobSpec{}, err } @@ -390,7 +384,7 @@ func (adapt JobSpecAdapter) ToSpec(conf Job) (models.JobSpec, error) { return models.JobSpec{}, err } - execUnit, err := adapt.supportedTaskRepo.GetByName(conf.Task.Name) + execUnit, err := adapt.pluginRepo.GetByName(conf.Task.Name) if err != nil { return models.JobSpec{}, errors.Wrapf(err, "spec reading error, failed to find exec unit %s", conf.Task.Name) } @@ -481,11 +475,6 @@ func (adapt JobSpecAdapter) FromSpec(spec models.JobSpec) (Job, error) { retryDelayDuration = spec.Behavior.Retry.Delay.String() } - taskSchema, err := spec.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) - if err != nil { - return Job{}, err - } - var notifiers []JobNotifier for _, notify := range spec.Behavior.Notify { notifiers = append(notifiers, JobNotifier{ @@ -516,7 +505,7 @@ func (adapt JobSpecAdapter) FromSpec(spec models.JobSpec) (Job, error) { Notify: notifiers, }, Task: JobTask{ - Name: taskSchema.Name, + Name: spec.Task.Unit.Info().Name, Config: taskConf, Window: JobTaskWindow{ Size: spec.Task.Window.SizeString(), @@ -551,10 +540,9 @@ func (adapt JobSpecAdapter) FromSpec(spec models.JobSpec) (Job, error) { return parsed, nil } -func NewJobSpecAdapter(supportedTaskRepo models.TaskPluginRepository, supportedHookRepo models.HookRepo) *JobSpecAdapter { +func NewJobSpecAdapter(pluginRepo models.PluginRepository) *JobSpecAdapter { return &JobSpecAdapter{ - supportedTaskRepo: supportedTaskRepo, - supportedHookRepo: supportedHookRepo, + pluginRepo: pluginRepo, } } diff --git a/store/local/job_spec_adapter_test.go b/store/local/job_spec_adapter_test.go index 93eaa48a0c..048c1d5fcc 100644 --- a/store/local/job_spec_adapter_test.go +++ b/store/local/job_spec_adapter_test.go @@ -1,7 +1,6 @@ package local_test import ( - "context" "reflect" "testing" @@ -51,15 +50,17 @@ hooks: [] err := yaml.Unmarshal([]byte(yamlSpec), &localJobParsed) assert.Nil(t, err) - bq2bqTransformer := new(mock.TaskPlugin) - bq2bqTransformer.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit := new(mock.BasePlugin) + execUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "bq2bq", }, nil) - allTasksRepo := new(mock.SupportedTaskRepo) - allTasksRepo.On("GetByName", "bq2bq").Return(bq2bqTransformer, nil) + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", "bq2bq").Return(&models.Plugin{ + Base: execUnit, + }, nil) + adapter := local.NewJobSpecAdapter(pluginRepo) - adapter := local.NewJobSpecAdapter(allTasksRepo, nil) modelJob, err := adapter.ToSpec(localJobParsed) assert.Nil(t, err) diff --git a/store/local/job_spec_repository_test.go b/store/local/job_spec_repository_test.go index e966f85304..ffe80e1512 100644 --- a/store/local/job_spec_repository_test.go +++ b/store/local/job_spec_repository_test.go @@ -1,7 +1,6 @@ package local_test import ( - "context" "path/filepath" "sort" "strings" @@ -43,13 +42,13 @@ hooks: [] func TestJobSpecRepository(t *testing.T) { // prepare adapter - execUnit := new(mock.TaskPlugin) - execUnit.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit := new(mock.BasePlugin) + execUnit.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: "foo", }, nil) - allTasksRepo := new(mock.SupportedTaskRepo) - allTasksRepo.On("GetByName", "foo").Return(execUnit, nil) - adapter := local.NewJobSpecAdapter(allTasksRepo, nil) + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", "foo").Return(&models.Plugin{Base: execUnit}, nil) + adapter := local.NewJobSpecAdapter(pluginRepo) jobConfig := local.Job{ Version: 1, @@ -100,7 +99,7 @@ func TestJobSpecRepository(t *testing.T) { DependsOnPast: false, }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Window: models.JobSpecTaskWindow{ Offset: 0, Size: time.Hour * 24, @@ -134,7 +133,7 @@ func TestJobSpecRepository(t *testing.T) { DependsOnPast: false, }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Window: models.JobSpecTaskWindow{ Offset: 0, Size: time.Hour * 24, @@ -181,7 +180,7 @@ func TestJobSpecRepository(t *testing.T) { t.Run("should return error if name is empty", func(t *testing.T) { repo := local.NewJobSpecRepository(nil, adapter) err := repo.Save(models.JobSpec{Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, }}) assert.NotNil(t, err) }) @@ -211,13 +210,15 @@ func TestJobSpecRepository(t *testing.T) { // update the spec. hookName := "g-hook" - hookUnit1 := new(mock.HookPlugin) - hookUnit1.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: hookName, + hookUnit1 := new(mock.BasePlugin) + hookUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: hookName, + PluginType: models.PluginTypeHook, }, nil) - allHooksRepo := new(mock.SupportedHookRepo) - allHooksRepo.On("GetByName", hookName).Return(hookUnit1, nil) - adapterNew := local.NewJobSpecAdapter(allTasksRepo, allHooksRepo) + pluginsRepo := new(mock.SupportedPluginRepo) + pluginsRepo.On("GetByName", hookName).Return(&models.Plugin{Base: hookUnit1}, nil) + pluginsRepo.On("GetByName", "foo").Return(&models.Plugin{Base: execUnit}, nil) + adapterNew := local.NewJobSpecAdapter(pluginsRepo) specCopy := spec specCopy.Hooks = []models.JobSpecHook{ @@ -226,7 +227,7 @@ func TestJobSpecRepository(t *testing.T) { Name: "key", Value: "value", }, - }, Unit: hookUnit1}, + }, Unit: &models.Plugin{Base: hookUnit1}}, } repoNew := local.NewJobSpecRepository(appFS, adapterNew) @@ -458,7 +459,7 @@ hooks: []`, DependsOnPast: false, }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Config: models.JobSpecConfigs{}, Window: models.JobSpecTaskWindow{ Offset: 0, @@ -483,7 +484,7 @@ hooks: []`, DependsOnPast: false, }, Task: models.JobSpecTask{ - Unit: execUnit, + Unit: &models.Plugin{Base: execUnit}, Config: models.JobSpecConfigs{}, Window: models.JobSpecTaskWindow{ Offset: 0, diff --git a/store/postgres/instance_repository_test.go b/store/postgres/instance_repository_test.go index 33b3be3e38..55cd418365 100644 --- a/store/postgres/instance_repository_test.go +++ b/store/postgres/instance_repository_test.go @@ -31,26 +31,26 @@ func TestInstanceRepository(t *testing.T) { gTask := "g-task" tTask := "t-task" - execUnit1 := new(mock.TaskPlugin) - execUnit1.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit1 := new(mock.BasePlugin) + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: gTask, }, nil) - execUnit2 := new(mock.TaskPlugin) - execUnit2.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit2 := new(mock.BasePlugin) + execUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: tTask, }, nil) - allTasksRepo := new(mock.SupportedTaskRepo) - allTasksRepo.On("GetByName", gTask).Return(execUnit1, nil) - allTasksRepo.On("GetByName", tTask).Return(execUnit2, nil) - adapter := NewAdapter(allTasksRepo, nil) + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", gTask).Return(&models.Plugin{Base: execUnit1}, nil) + pluginRepo.On("GetByName", tTask).Return(&models.Plugin{Base: execUnit2}, nil) + adapter := NewAdapter(pluginRepo) jobConfigs := []models.JobSpec{ { ID: uuid.Must(uuid.NewRandom()), Name: "g-optimus-id", Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{Base: execUnit1}, Config: []models.JobSpecConfigItem{ { Name: "do", Value: "this", @@ -72,7 +72,7 @@ func TestInstanceRepository(t *testing.T) { ID: uuid.Must(uuid.NewRandom()), Name: "t-optimus-id", Task: models.JobSpecTask{ - Unit: execUnit2, + Unit: &models.Plugin{Base: execUnit2}, Config: []models.JobSpecConfigItem{ { Name: "do", Value: "this", @@ -82,16 +82,16 @@ func TestInstanceRepository(t *testing.T) { }, } - unitData := models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobConfigs[0].Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobConfigs[0].Assets), + unitData := models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobConfigs[0].Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobConfigs[0].Assets), } - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData).Return(models.GenerateTaskDestinationResponse{Destination: "p.d.t"}, nil) - unitData2 := models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobConfigs[1].Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobConfigs[1].Assets), + execUnit1.On("GenerateDestination", context.TODO(), unitData).Return(models.GenerateDestinationResponse{Destination: "p.d.t"}, nil) + unitData2 := models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobConfigs[1].Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobConfigs[1].Assets), } - execUnit2.On("GenerateTaskDestination", context.TODO(), unitData2).Return(models.GenerateTaskDestinationResponse{Destination: "p.d.t"}, nil) + execUnit2.On("GenerateDestination", context.TODO(), unitData2).Return(models.GenerateDestinationResponse{Destination: "p.d.t"}, nil) DBSetup := func() *gorm.DB { dbURL, ok := os.LookupEnv("TEST_OPTIMUS_DB_URL") diff --git a/store/postgres/job_spec_adapter.go b/store/postgres/job_spec_adapter.go index 02f2b51613..dace2453b5 100644 --- a/store/postgres/job_spec_adapter.go +++ b/store/postgres/job_spec_adapter.go @@ -91,8 +91,8 @@ type JobHook struct { } // ToSpec converts the postgres' JobHook representation to the optimus' models.JobSpecHook -func (a JobHook) ToSpec(supportedHookRepo models.HookRepo) (models.JobSpecHook, error) { - hookUnit, err := supportedHookRepo.GetByName(a.Name) +func (a JobHook) ToSpec(pluginRepo models.PluginRepository) (models.JobSpecHook, error) { + hookUnit, err := pluginRepo.GetByName(a.Name) if err != nil { return models.JobSpecHook{}, errors.Wrap(err, "spec reading error") } @@ -113,25 +113,19 @@ func (a JobHook) FromSpec(spec models.JobSpecHook) (JobHook, error) { if err != nil { return JobHook{}, err } - schema, err := spec.Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) - if err != nil { - return JobHook{}, err - } return JobHook{ - Name: schema.Name, + Name: spec.Unit.Info().Name, Config: configJSON, }, nil } type JobSpecAdapter struct { - supportedTaskRepo models.TaskPluginRepository - supportedHookRepo models.HookRepo + pluginRepo models.PluginRepository } -func NewAdapter(supportedTaskRepo models.TaskPluginRepository, supportedHookRepo models.HookRepo) *JobSpecAdapter { +func NewAdapter(pluginRepo models.PluginRepository) *JobSpecAdapter { return &JobSpecAdapter{ - supportedTaskRepo: supportedTaskRepo, - supportedHookRepo: supportedHookRepo, + pluginRepo: pluginRepo, } } @@ -180,14 +174,14 @@ func (adapt JobSpecAdapter) ToSpec(conf Job) (models.JobSpec, error) { return models.JobSpec{}, err } for _, hook := range hooksRaw { - hookSpec, err := hook.ToSpec(adapt.supportedHookRepo) + hookSpec, err := hook.ToSpec(adapt.pluginRepo) if err != nil { return models.JobSpec{}, err } jobHooks = append(jobHooks, hookSpec) } - execUnit, err := adapt.supportedTaskRepo.GetByName(conf.TaskName) + execUnit, err := adapt.pluginRepo.GetByName(conf.TaskName) if err != nil { return models.JobSpec{}, errors.Wrap(err, "spec reading error") } @@ -316,17 +310,16 @@ func (adapt JobSpecAdapter) FromSpec(spec models.JobSpec) (Job, error) { wsize := spec.Task.Window.Size.Nanoseconds() woffset := spec.Task.Window.Offset.Nanoseconds() - taskSchema, err := spec.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) - if err != nil { - return Job{}, err - } - - jobDestination, err := spec.Task.Unit.GenerateTaskDestination(context.TODO(), models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(spec.Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(spec.Assets), - }) - if err != nil { - return Job{}, err + var jobDestination string + if spec.Task.Unit.DependencyMod != nil { + jobDestinationResponse, err := spec.Task.Unit.DependencyMod.GenerateDestination(context.TODO(), models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(spec.Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(spec.Assets), + }) + if err != nil { + return Job{}, err + } + jobDestination = jobDestinationResponse.Destination } return Job{ @@ -340,9 +333,9 @@ func (adapt JobSpecAdapter) FromSpec(spec models.JobSpec) (Job, error) { EndDate: spec.Schedule.EndDate, Interval: spec.Schedule.Interval, Behavior: behaviorJSON, - Destination: jobDestination.Destination, + Destination: jobDestination, Dependencies: dependenciesJSON, - TaskName: taskSchema.Name, + TaskName: spec.Task.Unit.Info().Name, TaskConfig: taskConfigJSON, WindowSize: &wsize, WindowOffset: &woffset, diff --git a/store/postgres/job_spec_repository_test.go b/store/postgres/job_spec_repository_test.go index bab8a26460..4d93be5353 100644 --- a/store/postgres/job_spec_repository_test.go +++ b/store/postgres/job_spec_repository_test.go @@ -49,32 +49,37 @@ func TestJobRepository(t *testing.T) { gTask := "g-task" tTask := "t-task" destination := "p.d.t" - execUnit1 := new(mock.TaskPlugin) - execUnit1.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ - Name: gTask, + execUnit1 := new(mock.BasePlugin) + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: gTask, + PluginType: models.PluginTypeTask, }, nil) - execUnit2 := new(mock.TaskPlugin) + execUnit2 := new(mock.BasePlugin) + + depMod1 := new(mock.DependencyResolverMod) + depMod2 := new(mock.DependencyResolverMod) gHook := "g-hook" - hookUnit1 := new(mock.HookPlugin) - hookUnit1.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: gHook, - Type: models.HookTypePre, + hookUnit1 := new(mock.BasePlugin) + hookUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: gHook, + PluginType: models.PluginTypeHook, + HookType: models.HookTypePre, }, nil) - tHook := "g-hook" - hookUnit2 := new(mock.HookPlugin) - hookUnit2.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: tHook, - Type: models.HookTypePre, + tHook := "t-hook" + hookUnit2 := new(mock.BasePlugin) + hookUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: tHook, + PluginType: models.PluginTypeHook, + HookType: models.HookTypePre, }, nil) - allTasksRepo := new(mock.SupportedTaskRepo) - allTasksRepo.On("GetByName", gTask).Return(execUnit1, nil) - allTasksRepo.On("GetByName", tTask).Return(execUnit2, nil) - allHooksRepo := new(mock.SupportedHookRepo) - allHooksRepo.On("GetByName", gHook).Return(hookUnit1, nil) - allHooksRepo.On("GetByName", tHook).Return(hookUnit2, nil) - adapter := NewAdapter(allTasksRepo, allHooksRepo) + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", gTask).Return(&models.Plugin{Base: execUnit1, DependencyMod: depMod1}, nil) + pluginRepo.On("GetByName", tTask).Return(&models.Plugin{Base: execUnit2, DependencyMod: depMod2}, nil) + pluginRepo.On("GetByName", gHook).Return(&models.Plugin{Base: hookUnit1}, nil) + pluginRepo.On("GetByName", tHook).Return(&models.Plugin{Base: hookUnit2}, nil) + adapter := NewAdapter(pluginRepo) testConfigs := []models.JobSpec{ { @@ -90,7 +95,7 @@ func TestJobRepository(t *testing.T) { }, }, Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{Base: execUnit1, DependencyMod: depMod1}, Config: []models.JobSpecConfigItem{ { Name: "do", Value: "this", @@ -118,7 +123,7 @@ func TestJobRepository(t *testing.T) { Value: "event_timestamp > 10000", }, }, - Unit: hookUnit1, + Unit: &models.Plugin{Base: hookUnit1}, }, }, }, @@ -129,7 +134,7 @@ func TestJobRepository(t *testing.T) { ID: uuid.Must(uuid.NewRandom()), Name: "t-optimus-id", Task: models.JobSpecTask{ - Unit: execUnit2, + Unit: &models.Plugin{Base: execUnit2, DependencyMod: depMod2}, Config: []models.JobSpecConfigItem{ { Name: "do", Value: "this", @@ -156,12 +161,13 @@ func TestJobRepository(t *testing.T) { db := DBSetup() defer db.Close() - unitData1 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets)} - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + unitData1 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets)} + depMod1.On("GenerateDestination", context.TODO(), unitData1).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) + defer depMod1.AssertExpectations(t) defer execUnit1.AssertExpectations(t) defer execUnit2.AssertExpectations(t) - testModels := []models.JobSpec{} + var testModels []models.JobSpec testModels = append(testModels, testConfigs...) projectJobSpecRepo := new(mock.ProjectJobSpecRepository) @@ -178,14 +184,14 @@ func TestJobRepository(t *testing.T) { checkModel, err := repo.GetByID(testModels[0].ID) assert.Nil(t, err) assert.Equal(t, "g-optimus-id", checkModel.Name) - taskSchema, _ := checkModel.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + taskSchema := checkModel.Task.Unit.Info() assert.Equal(t, gTask, taskSchema.Name) assert.Equal(t, "query.sql", checkModel.Assets.GetAll()[0].Name) - schema, _ := checkModel.Hooks[0].Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) + schema := checkModel.Hooks[0].Unit.Info() assert.Equal(t, gHook, schema.Name) - assert.Equal(t, models.HookTypePre, schema.Type) - assert.Equal(t, hookUnit1, checkModel.Hooks[0].Unit) + assert.Equal(t, models.HookTypePre, schema.HookType) + assert.Equal(t, hookUnit1, checkModel.Hooks[0].Unit.Base) assert.Equal(t, 1, len(checkModel.Hooks)) cval, _ := checkModel.Hooks[0].Config.Get("FILTER_EXPRESSION") @@ -195,12 +201,13 @@ func TestJobRepository(t *testing.T) { db := DBSetup() defer db.Close() - unitData1 := models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets), + unitData1 := models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets), } - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return( - models.GenerateTaskDestinationResponse{Destination: destination}, nil) + depMod1.On("GenerateDestination", context.TODO(), unitData1).Return( + &models.GenerateDestinationResponse{Destination: destination}, nil) + defer depMod1.AssertExpectations(t) defer execUnit1.AssertExpectations(t) defer execUnit2.AssertExpectations(t) @@ -251,16 +258,18 @@ func TestJobRepository(t *testing.T) { testModelA := testConfigs[0] testModelB := testConfigs[2] - unitData1 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets)} - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + unitData1 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets)} + depMod1.On("GenerateDestination", context.TODO(), unitData1).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) + defer depMod1.AssertExpectations(t) defer execUnit1.AssertExpectations(t) - unitData2 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[2].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[2].Assets)} - execUnit2.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + unitData2 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[2].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[2].Assets)} + execUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: tTask, }, nil) - execUnit2.On("GenerateTaskDestination", context.TODO(), unitData2).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + depMod2.On("GenerateDestination", context.TODO(), unitData2).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) defer execUnit2.AssertExpectations(t) + defer depMod2.AssertExpectations(t) projectJobSpecRepo := NewProjectJobSpecRepository(db, projectSpec, adapter) repo := NewJobSpecRepository(db, namespaceSpec, projectJobSpecRepo, adapter) @@ -272,7 +281,7 @@ func TestJobRepository(t *testing.T) { checkModel, err := repo.GetByID(testModelA.ID) assert.Nil(t, err) assert.Equal(t, "g-optimus-id", checkModel.Name) - taskSchema, _ := checkModel.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + taskSchema := checkModel.Task.Unit.Info() assert.Equal(t, gTask, taskSchema.Name) //try for update @@ -282,7 +291,7 @@ func TestJobRepository(t *testing.T) { checkModel, err = repo.GetByID(testModelB.ID) assert.Nil(t, err) assert.Equal(t, "t-optimus-id", checkModel.Name) - taskSchema, _ = checkModel.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + taskSchema = checkModel.Task.Unit.Info() assert.Equal(t, tTask, taskSchema.Name) }) t.Run("insert same resource twice should overwrite existing", func(t *testing.T) { @@ -290,40 +299,44 @@ func TestJobRepository(t *testing.T) { defer db.Close() testModelA := testConfigs[0] - unitData1 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets)} - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + unitData1 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets)} + depMod1.On("GenerateDestination", context.TODO(), unitData1).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) defer execUnit1.AssertExpectations(t) + defer depMod1.AssertExpectations(t) - unitData2 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[2].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[2].Assets)} - execUnit2.On("GenerateTaskDestination", context.TODO(), unitData1).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) - execUnit2.On("GenerateTaskDestination", context.TODO(), unitData2).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + depMod2.On("GenerateDestination", context.TODO(), unitData1).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) + execUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: tTask, + PluginType: models.PluginTypeTask, + }, nil) defer execUnit2.AssertExpectations(t) + defer depMod2.AssertExpectations(t) projectJobSpecRepo := NewProjectJobSpecRepository(db, projectSpec, adapter) repo := NewJobSpecRepository(db, namespaceSpec, projectJobSpecRepo, adapter) //try for create - testModelA.Task.Unit = execUnit1 + testModelA.Task.Unit = &models.Plugin{Base: execUnit1, DependencyMod: depMod1} err := repo.Save(testModelA) assert.Nil(t, err) checkModel, err := repo.GetByID(testModelA.ID) assert.Nil(t, err) assert.Equal(t, "g-optimus-id", checkModel.Name) - taskSchema, _ := checkModel.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + taskSchema := checkModel.Task.Unit.Info() assert.Equal(t, gTask, taskSchema.Name) testModelA.Task.Window.Offset = time.Hour * 2 testModelA.Task.Window.Size = 0 //try for update - testModelA.Task.Unit = execUnit2 + testModelA.Task.Unit = &models.Plugin{Base: execUnit2, DependencyMod: depMod2} err = repo.Save(testModelA) assert.Nil(t, err) checkModel, err = repo.GetByID(testModelA.ID) assert.Nil(t, err) - taskSchema, _ = checkModel.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + taskSchema = checkModel.Task.Unit.Info() assert.Equal(t, tTask, taskSchema.Name) assert.Equal(t, time.Hour*2, checkModel.Task.Window.Offset) assert.Equal(t, time.Duration(0), checkModel.Task.Window.Size) @@ -349,6 +362,11 @@ func TestJobRepository(t *testing.T) { db := DBSetup() defer db.Close() testModel := testConfigs[2] + testModel.Task.Unit.DependencyMod = nil + execUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: tTask, + PluginType: models.PluginTypeTask, + }, nil) projectJobSpecRepo := NewProjectJobSpecRepository(db, projectSpec, adapter) repo := NewJobSpecRepository(db, namespaceSpec, projectJobSpecRepo, adapter) @@ -358,7 +376,7 @@ func TestJobRepository(t *testing.T) { checkModel, err := repo.GetByID(testModel.ID) assert.Nil(t, err) assert.Equal(t, "t-optimus-id", checkModel.Name) - taskSchema, _ := checkModel.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + taskSchema := checkModel.Task.Unit.Info() assert.Equal(t, tTask, taskSchema.Name) assert.Equal(t, 0, len(checkModel.Assets.GetAll())) assert.Equal(t, 0, len(checkModel.Hooks)) @@ -372,7 +390,7 @@ func TestJobRepository(t *testing.T) { Value: "event_timestamp > 10000", }, }, - Unit: hookUnit1, + Unit: &models.Plugin{Base: hookUnit1}, }, } err = repo.Save(testModel) @@ -380,18 +398,18 @@ func TestJobRepository(t *testing.T) { checkModel, err = repo.GetByID(testModel.ID) assert.Nil(t, err) assert.Equal(t, "t-optimus-id", checkModel.Name) - taskSchema, _ = checkModel.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + taskSchema = checkModel.Task.Unit.Info() assert.Equal(t, tTask, taskSchema.Name) assert.Equal(t, 0, len(checkModel.Assets.GetAll())) assert.Equal(t, 1, len(checkModel.Hooks)) - schema, _ := checkModel.Hooks[0].Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) + schema := checkModel.Hooks[0].Unit.Info() assert.Equal(t, gHook, schema.Name) - assert.Equal(t, models.HookTypePre, schema.Type) + assert.Equal(t, models.HookTypePre, schema.HookType) val1a, _ := checkModel.Hooks[0].Config.Get("FILTER_EXPRESSION") assert.Equal(t, "event_timestamp > 10000", val1a) - assert.Equal(t, hookUnit1, checkModel.Hooks[0].Unit) + assert.Equal(t, hookUnit1, checkModel.Hooks[0].Unit.Base) // add one more hook and it should be saved and retrievable testModel.Hooks = append(testModel.Hooks, models.JobSpecHook{ @@ -405,29 +423,29 @@ func TestJobRepository(t *testing.T) { Value: "my_topic.name.kafka", }, }, - Unit: hookUnit1, + Unit: &models.Plugin{Base: hookUnit2}, }) err = repo.Save(testModel) assert.Nil(t, err) checkModel, err = repo.GetByID(testModel.ID) assert.Nil(t, err) assert.Equal(t, "t-optimus-id", checkModel.Name) - taskSchema, _ = checkModel.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + taskSchema = checkModel.Task.Unit.Info() assert.Equal(t, tTask, taskSchema.Name) assert.Equal(t, 0, len(checkModel.Assets.GetAll())) assert.Equal(t, 2, len(checkModel.Hooks)) - schema, _ = checkModel.Hooks[0].Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) + schema = checkModel.Hooks[0].Unit.Info() assert.Equal(t, gHook, schema.Name) - assert.Equal(t, models.HookTypePre, schema.Type) + assert.Equal(t, models.HookTypePre, schema.HookType) val1b, _ := checkModel.Hooks[0].Config.Get("FILTER_EXPRESSION") assert.Equal(t, "event_timestamp > 10000", val1b) - assert.Equal(t, hookUnit1, checkModel.Hooks[0].Unit) + assert.Equal(t, hookUnit1, checkModel.Hooks[0].Unit.Base) - schema, _ = checkModel.Hooks[1].Unit.GetHookSchema(context.Background(), models.GetHookSchemaRequest{}) + schema = checkModel.Hooks[1].Unit.Info() assert.Equal(t, tHook, schema.Name) - assert.Equal(t, models.HookTypePre, schema.Type) - assert.Equal(t, hookUnit1, checkModel.Hooks[1].Unit) + assert.Equal(t, models.HookTypePre, schema.HookType) + assert.Equal(t, hookUnit2, checkModel.Hooks[1].Unit.Base) val1, _ := checkModel.Hooks[1].Config.Get("FILTER_EXPRESSION") val2, _ := checkModel.Hooks[1].Config.Get("KAFKA_TOPIC") @@ -439,9 +457,10 @@ func TestJobRepository(t *testing.T) { defer db.Close() testModelA := testConfigs[0] - unitData1 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets)} - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + unitData1 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets)} + depMod1.On("GenerateDestination", context.TODO(), unitData1).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) defer execUnit1.AssertExpectations(t) + defer depMod1.AssertExpectations(t) projectJobSpecRepo := NewProjectJobSpecRepository(db, projectSpec, adapter) jobRepoNamespace1 := NewJobSpecRepository(db, namespaceSpec, projectJobSpecRepo, adapter) @@ -454,7 +473,7 @@ func TestJobRepository(t *testing.T) { checkJob, checkNamespace, err := projectJobSpecRepo.GetByName(testModelA.Name) assert.Nil(t, err) assert.Equal(t, "g-optimus-id", checkJob.Name) - schema, _ := checkJob.Task.Unit.GetTaskSchema(context.Background(), models.GetTaskSchemaRequest{}) + schema := checkJob.Task.Unit.Info() assert.Equal(t, gTask, schema.Name) assert.Equal(t, namespaceSpec.ID, checkNamespace.ID) assert.Equal(t, namespaceSpec.ProjectSpec.ID, checkNamespace.ProjectSpec.ID) @@ -469,9 +488,10 @@ func TestJobRepository(t *testing.T) { defer db.Close() testModelA := testConfigs[0] - unitData1 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets)} - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + unitData1 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets)} + depMod1.On("GenerateDestination", context.TODO(), unitData1).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) defer execUnit1.AssertExpectations(t) + defer depMod1.AssertExpectations(t) projectJobSpecRepo := NewProjectJobSpecRepository(db, projectSpec, adapter) repo := NewJobSpecRepository(db, namespaceSpec, projectJobSpecRepo, adapter) @@ -574,39 +594,43 @@ func TestProjectJobRepository(t *testing.T) { gTask := "g-task" tTask := "t-task" destination := "p.d.t" - execUnit1 := new(mock.TaskPlugin) - execUnit1.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit1 := new(mock.BasePlugin) + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: gTask, }, nil) - execUnit2 := new(mock.TaskPlugin) + execUnit2 := new(mock.BasePlugin) gHook := "g-hook" - hookUnit1 := new(mock.HookPlugin) - hookUnit1.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: gHook, - Type: models.HookTypePre, + hookUnit1 := new(mock.BasePlugin) + hookUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: gHook, + PluginType: models.PluginTypeHook, + HookType: models.HookTypePre, }, nil) tHook := "g-hook" - hookUnit2 := new(mock.HookPlugin) - hookUnit2.On("GetHookSchema", context.Background(), models.GetHookSchemaRequest{}).Return(models.GetHookSchemaResponse{ - Name: tHook, - Type: models.HookTypePre, + hookUnit2 := new(mock.BasePlugin) + hookUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ + Name: tHook, + PluginType: models.PluginTypeHook, + HookType: models.HookTypePre, }, nil) - allTasksRepo := new(mock.SupportedTaskRepo) - allTasksRepo.On("GetByName", gTask).Return(execUnit1, nil) - allTasksRepo.On("GetByName", tTask).Return(execUnit2, nil) - allHooksRepo := new(mock.SupportedHookRepo) - allHooksRepo.On("GetByName", gHook).Return(hookUnit1, nil) - allHooksRepo.On("GetByName", tHook).Return(hookUnit2, nil) - adapter := NewAdapter(allTasksRepo, allHooksRepo) + depMod := new(mock.DependencyResolverMod) + depMod2 := new(mock.DependencyResolverMod) + + pluginRepo := new(mock.SupportedPluginRepo) + pluginRepo.On("GetByName", gTask).Return(&models.Plugin{Base: execUnit1, DependencyMod: depMod}, nil) + pluginRepo.On("GetByName", tTask).Return(&models.Plugin{Base: execUnit2, DependencyMod: depMod2}, nil) + pluginRepo.On("GetByName", gHook).Return(&models.Plugin{Base: hookUnit1}, nil) + pluginRepo.On("GetByName", tHook).Return(&models.Plugin{Base: hookUnit2}, nil) + adapter := NewAdapter(pluginRepo) testConfigs := []models.JobSpec{ { ID: uuid.Must(uuid.NewRandom()), Name: "g-optimus-id", Task: models.JobSpecTask{ - Unit: execUnit1, + Unit: &models.Plugin{Base: execUnit1, DependencyMod: depMod}, Config: []models.JobSpecConfigItem{ { Name: "do", @@ -635,7 +659,7 @@ func TestProjectJobRepository(t *testing.T) { Value: "event_timestamp > 10000", }, }, - Unit: hookUnit1, + Unit: &models.Plugin{Base: hookUnit1}, }, }, }, @@ -646,7 +670,7 @@ func TestProjectJobRepository(t *testing.T) { ID: uuid.Must(uuid.NewRandom()), Name: "t-optimus-id", Task: models.JobSpecTask{ - Unit: execUnit2, + Unit: &models.Plugin{Base: execUnit2, DependencyMod: depMod2}, Config: []models.JobSpecConfigItem{ { Name: "do", @@ -669,9 +693,10 @@ func TestProjectJobRepository(t *testing.T) { testModels := []models.JobSpec{} testModels = append(testModels, testConfigs...) - unitData1 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets)} - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + unitData1 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets)} + depMod.On("GenerateDestination", context.TODO(), unitData1).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) + defer depMod.AssertExpectations(t) defer execUnit1.AssertExpectations(t) defer execUnit2.AssertExpectations(t) @@ -694,14 +719,17 @@ func TestProjectJobRepository(t *testing.T) { testModels := []models.JobSpec{} testModels = append(testModels, testConfigs...) - unitData1 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets)} - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) - execUnit2.On("GetTaskSchema", context.Background(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + unitData1 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets)} + depMod.On("GenerateDestination", context.TODO(), unitData1).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) + + execUnit2.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: tTask, }, nil) - unitData2 := models.GenerateTaskDestinationRequest{Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[2].Task.Config), Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[2].Assets)} - execUnit2.On("GenerateTaskDestination", context.TODO(), unitData2).Return(models.GenerateTaskDestinationResponse{Destination: destination}, nil) + unitData2 := models.GenerateDestinationRequest{Config: models.PluginConfigs{}.FromJobSpec(testConfigs[2].Task.Config), Assets: models.PluginAssets{}.FromJobSpec(testConfigs[2].Assets)} + depMod2.On("GenerateDestination", context.TODO(), unitData2).Return(&models.GenerateDestinationResponse{Destination: destination}, nil) + defer depMod.AssertExpectations(t) + defer depMod2.AssertExpectations(t) defer execUnit1.AssertExpectations(t) defer execUnit2.AssertExpectations(t) @@ -722,12 +750,13 @@ func TestProjectJobRepository(t *testing.T) { db := DBSetup() defer db.Close() - unitData1 := models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(testConfigs[0].Assets), + unitData1 := models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(testConfigs[0].Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(testConfigs[0].Assets), } - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData1).Return( - models.GenerateTaskDestinationResponse{Destination: destination}, nil) + depMod.On("GenerateDestination", context.TODO(), unitData1).Return( + &models.GenerateDestinationResponse{Destination: destination}, nil) + defer depMod.AssertExpectations(t) defer execUnit1.AssertExpectations(t) defer execUnit2.AssertExpectations(t) diff --git a/store/postgres/replay_repository_test.go b/store/postgres/replay_repository_test.go index 0f5566d484..5de1229bdd 100644 --- a/store/postgres/replay_repository_test.go +++ b/store/postgres/replay_repository_test.go @@ -94,17 +94,17 @@ func TestReplayRepository(t *testing.T) { db := DBSetup() defer db.Close() - execUnit1 := new(mock.TaskPlugin) + execUnit1 := new(mock.BasePlugin) defer execUnit1.AssertExpectations(t) for idx, jobConfig := range jobConfigs { - jobConfig.Task = models.JobSpecTask{Unit: execUnit1} + jobConfig.Task = models.JobSpecTask{Unit: &models.Plugin{Base: execUnit1}} testConfigs[idx].Job = jobConfig } - allTasksRepo := new(mock.SupportedTaskRepo) - defer allTasksRepo.AssertExpectations(t) - adapter := NewAdapter(allTasksRepo, nil) + pluginRepo := new(mock.SupportedPluginRepo) + defer pluginRepo.AssertExpectations(t) + adapter := NewAdapter(pluginRepo) var testModels []*models.ReplaySpec testModels = append(testModels, testConfigs...) @@ -124,18 +124,18 @@ func TestReplayRepository(t *testing.T) { var testModels []*models.ReplaySpec testModels = append(testModels, testConfigs...) - execUnit1 := new(mock.TaskPlugin) + execUnit1 := new(mock.BasePlugin) defer execUnit1.AssertExpectations(t) for idx, jobConfig := range jobConfigs { - jobConfig.Task = models.JobSpecTask{Unit: execUnit1} + jobConfig.Task = models.JobSpecTask{Unit: &models.Plugin{Base: execUnit1}} testConfigs[idx].Job = jobConfig } - allTasksRepo := new(mock.SupportedTaskRepo) - defer allTasksRepo.AssertExpectations(t) + pluginRepo := new(mock.SupportedPluginRepo) + defer pluginRepo.AssertExpectations(t) - adapter := NewAdapter(allTasksRepo, nil) + adapter := NewAdapter(pluginRepo) repo := NewReplayRepository(db, jobConfigs[0], adapter) err := repo.Insert(testModels[0]) assert.Nil(t, err) @@ -158,29 +158,32 @@ func TestReplayRepository(t *testing.T) { t.Run("should return list of job specs given list of status", func(t *testing.T) { db := DBSetup() defer db.Close() - testModels := []*models.ReplaySpec{} + var testModels []*models.ReplaySpec testModels = append(testModels, testConfigs...) - execUnit1 := new(mock.TaskPlugin) + execUnit1 := new(mock.BasePlugin) defer execUnit1.AssertExpectations(t) - execUnit1.On("GetTaskSchema", context.TODO(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: gTask, }, nil) + depMod1 := new(mock.DependencyResolverMod) + defer depMod1.AssertExpectations(t) + for idx, jobConfig := range jobConfigs { - jobConfig.Task = models.JobSpecTask{Unit: execUnit1} + jobConfig.Task = models.JobSpecTask{Unit: &models.Plugin{Base: execUnit1, DependencyMod: depMod1}} testConfigs[idx].Job = jobConfig } - allTasksRepo := new(mock.SupportedTaskRepo) - defer allTasksRepo.AssertExpectations(t) - allTasksRepo.On("GetByName", gTask).Return(execUnit1, nil) - adapter := NewAdapter(allTasksRepo, nil) + pluginRepo := new(mock.SupportedPluginRepo) + defer pluginRepo.AssertExpectations(t) + pluginRepo.On("GetByName", gTask).Return(&models.Plugin{Base: execUnit1, DependencyMod: depMod1}, nil) + adapter := NewAdapter(pluginRepo) - unitData := models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobConfigs[0].Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobConfigs[0].Assets), + unitData := models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobConfigs[0].Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobConfigs[0].Assets), } - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData).Return(models.GenerateTaskDestinationResponse{Destination: "p.d.t"}, nil) + depMod1.On("GenerateDestination", context.TODO(), unitData).Return(&models.GenerateDestinationResponse{Destination: "p.d.t"}, nil) projectJobSpecRepo := NewProjectJobSpecRepository(db, projectSpec, adapter) jobRepo := NewJobSpecRepository(db, namespaceSpec, projectJobSpecRepo, adapter) @@ -214,26 +217,28 @@ func TestReplayRepository(t *testing.T) { var testModels []*models.ReplaySpec testModels = append(testModels, testConfigs...) - execUnit1 := new(mock.TaskPlugin) + execUnit1 := new(mock.BasePlugin) defer execUnit1.AssertExpectations(t) - execUnit1.On("GetTaskSchema", context.TODO(), models.GetTaskSchemaRequest{}).Return(models.GetTaskSchemaResponse{ + execUnit1.On("PluginInfo").Return(&models.PluginInfoResponse{ Name: gTask, }, nil) + depMod1 := new(mock.DependencyResolverMod) + defer depMod1.AssertExpectations(t) for idx, jobConfig := range jobConfigs { - jobConfig.Task = models.JobSpecTask{Unit: execUnit1} + jobConfig.Task = models.JobSpecTask{Unit: &models.Plugin{Base: execUnit1, DependencyMod: depMod1}} testConfigs[idx].Job = jobConfig } - allTasksRepo := new(mock.SupportedTaskRepo) - defer allTasksRepo.AssertExpectations(t) - allTasksRepo.On("GetByName", gTask).Return(execUnit1, nil) - adapter := NewAdapter(allTasksRepo, nil) + pluginRepo := new(mock.SupportedPluginRepo) + defer pluginRepo.AssertExpectations(t) + pluginRepo.On("GetByName", gTask).Return(&models.Plugin{Base: execUnit1, DependencyMod: depMod1}, nil) + adapter := NewAdapter(pluginRepo) - unitData := models.GenerateTaskDestinationRequest{ - Config: models.TaskPluginConfigs{}.FromJobSpec(jobConfigs[0].Task.Config), - Assets: models.TaskPluginAssets{}.FromJobSpec(jobConfigs[0].Assets), + unitData := models.GenerateDestinationRequest{ + Config: models.PluginConfigs{}.FromJobSpec(jobConfigs[0].Task.Config), + Assets: models.PluginAssets{}.FromJobSpec(jobConfigs[0].Assets), } - execUnit1.On("GenerateTaskDestination", context.TODO(), unitData).Return(models.GenerateTaskDestinationResponse{Destination: "p.d.t"}, nil) + depMod1.On("GenerateDestination", context.TODO(), unitData).Return(&models.GenerateDestinationResponse{Destination: "p.d.t"}, nil) projectJobSpecRepo := NewProjectJobSpecRepository(db, projectSpec, adapter) jobRepo := NewJobSpecRepository(db, namespaceSpec, projectJobSpecRepo, adapter) diff --git a/third_party/OpenAPI/odpf/optimus/runtime_service.swagger.json b/third_party/OpenAPI/odpf/optimus/runtime_service.swagger.json index c969d5e5d9..081880f2ae 100644 --- a/third_party/OpenAPI/odpf/optimus/runtime_service.swagger.json +++ b/third_party/OpenAPI/odpf/optimus/runtime_service.swagger.json @@ -19,7 +19,7 @@ "application/json" ], "paths": { - "/api/v1/project": { + "/v1/project": { "get": { "summary": "ListProjects returns list of registered projects and configurations", "operationId": "RuntimeService_ListProjects", @@ -73,7 +73,7 @@ ] } }, - "/api/v1/project/{projectName}/job": { + "/v1/project/{projectName}/job": { "get": { "summary": "ListJobSpecification returns list of jobs created in a project", "operationId": "RuntimeService_ListJobSpecification", @@ -110,7 +110,7 @@ ] } }, - "/api/v1/project/{projectName}/job/check": { + "/v1/project/{projectName}/job/check": { "post": { "summary": "CheckJobSpecification checks if a job specification is valid", "operationId": "RuntimeService_CheckJobSpecification", @@ -141,7 +141,7 @@ ] } }, - "/api/v1/project/{projectName}/job/{jobName}/dump": { + "/v1/project/{projectName}/job/{jobName}/dump": { "get": { "summary": "DumpJobSpecification returns compiled representation of the job in a scheduler\nconsumable form", "operationId": "RuntimeService_DumpJobSpecification", @@ -184,7 +184,7 @@ ] } }, - "/api/v1/project/{projectName}/job/{jobName}/instance": { + "/v1/project/{projectName}/job/{jobName}/instance": { "post": { "summary": "RegisterInstance is an internal admin command used during task/hook execution\nto pull task/hook compiled configuration and assets.", "operationId": "RuntimeService_RegisterInstance", @@ -229,7 +229,7 @@ ] } }, - "/api/v1/project/{projectName}/job/{jobName}/replay": { + "/v1/project/{projectName}/job/{jobName}/replay": { "post": { "operationId": "RuntimeService_Replay", "responses": { @@ -265,7 +265,7 @@ ] } }, - "/api/v1/project/{projectName}/job/{jobName}/replay-dry-run": { + "/v1/project/{projectName}/job/{jobName}/replay-dry-run": { "get": { "operationId": "RuntimeService_ReplayDryRun", "responses": { @@ -325,7 +325,7 @@ ] } }, - "/api/v1/project/{projectName}/job/{jobName}/status": { + "/v1/project/{projectName}/job/{jobName}/status": { "get": { "summary": "JobStatus returns the current and past run status of jobs", "operationId": "RuntimeService_JobStatus", @@ -362,7 +362,7 @@ ] } }, - "/api/v1/project/{projectName}/namespace": { + "/v1/project/{projectName}/namespace": { "get": { "summary": "ListProjectNamespaces returns list of namespaces of a project", "operationId": "RuntimeService_ListProjectNamespaces", @@ -430,7 +430,7 @@ ] } }, - "/api/v1/project/{projectName}/namespace/{namespace}/datastore/{datastoreName}/resource": { + "/v1/project/{projectName}/namespace/{namespace}/datastore/{datastoreName}/resource": { "get": { "summary": "ListResourceSpecification lists all resource specifications of a datastore in project", "operationId": "RuntimeService_ListResourceSpecification", @@ -570,7 +570,7 @@ ] } }, - "/api/v1/project/{projectName}/namespace/{namespace}/datastore/{datastoreName}/resource/{resourceName}": { + "/v1/project/{projectName}/namespace/{namespace}/datastore/{datastoreName}/resource/{resourceName}": { "get": { "operationId": "RuntimeService_ReadResource", "responses": { @@ -618,7 +618,7 @@ ] } }, - "/api/v1/project/{projectName}/namespace/{namespace}/job": { + "/v1/project/{projectName}/namespace/{namespace}/job": { "post": { "summary": "CreateJobSpecification registers a new job for a namespace which belongs to a project", "operationId": "RuntimeService_CreateJobSpecification", @@ -663,7 +663,7 @@ ] } }, - "/api/v1/project/{projectName}/namespace/{namespace}/job/{jobName}": { + "/v1/project/{projectName}/namespace/{namespace}/job/{jobName}": { "get": { "summary": "ReadJobSpecification reads a provided job spec of a namespace", "operationId": "RuntimeService_ReadJobSpecification", @@ -747,7 +747,7 @@ ] } }, - "/api/v1/project/{projectName}/namespace/{namespace}/job/{jobName}/event": { + "/v1/project/{projectName}/namespace/{namespace}/job/{jobName}/event": { "post": { "summary": "RegisterJobEvent notifies optimus service about an event related to job", "operationId": "RuntimeService_RegisterJobEvent", @@ -798,7 +798,7 @@ ] } }, - "/api/v1/project/{projectName}/secret/{secretName}": { + "/v1/project/{projectName}/secret/{secretName}": { "post": { "summary": "RegisterSecret creates a new secret of a project", "operationId": "RuntimeService_RegisterSecret", @@ -843,7 +843,7 @@ ] } }, - "/api/v1/version": { + "/v1/version": { "post": { "summary": "server ping with version", "operationId": "RuntimeService_Version", @@ -876,7 +876,7 @@ ] } }, - "/api/v1/window": { + "/v1/window": { "get": { "summary": "GetWindow provides the start and end dates provided a scheduled date\nof the execution window", "operationId": "RuntimeService_GetWindow", @@ -1195,21 +1195,21 @@ "optimusInstanceSpecDataType": { "type": "string", "enum": [ - "INVALID", + "UNKNOWN", "ENV", "FILE" ], - "default": "INVALID", + "default": "UNKNOWN", "title": "type of data, could be an env var or file" }, "optimusInstanceSpecType": { "type": "string", "enum": [ - "INVALID", + "UNKNOWN", "TASK", "HOOK" ], - "default": "INVALID" + "default": "UNKNOWN" }, "optimusJobConfigItem": { "type": "object", @@ -1247,12 +1247,12 @@ "optimusJobEventType": { "type": "string", "enum": [ - "INVALID", + "UNKNOWN", "SLA_MISS", "FAILURE", "SUCCESS" ], - "default": "INVALID" + "default": "UNKNOWN" }, "optimusJobSpecHook": { "type": "object",