diff --git a/.github/workflows/go_generate.yml b/.github/workflows/go_generate.yml index 5bb93ffc63..66d3db9a62 100644 --- a/.github/workflows/go_generate.yml +++ b/.github/workflows/go_generate.yml @@ -25,6 +25,8 @@ jobs: with: repo-token: ${{ secrets.FLYTE_BOT_PAT }} - uses: bufbuild/buf-setup-action@v1 + with: + github_token: ${{ secrets.FLYTE_BOT_PAT }} - uses: actions/setup-go@v3 with: go-version: ${{ inputs.go-version }} diff --git a/.github/workflows/single-binary.yml b/.github/workflows/single-binary.yml index e693b0d3d1..9a2c19a52c 100644 --- a/.github/workflows/single-binary.yml +++ b/.github/workflows/single-binary.yml @@ -123,7 +123,7 @@ jobs: env: FLYTESNACKS_PRIORITIES: "P0" FLYTESNACKS_VERSION: "" - timeout-minutes: 20 + timeout-minutes: 60 needs: [build-and-push-single-binary-image] steps: - name: Set latest Flytesnacks release diff --git a/charts/flyte-binary/templates/configmap.yaml b/charts/flyte-binary/templates/configmap.yaml index 4c55bf34e3..255da9fdf3 100644 --- a/charts/flyte-binary/templates/configmap.yaml +++ b/charts/flyte-binary/templates/configmap.yaml @@ -61,16 +61,9 @@ data: k8s-array: logs: config: {{- include "flyte-binary.configuration.logging.plugins" . | nindent 12 }} - {{- if .Values.configuration.agentService }} + {{- if .Values.flyteagent.enabled }} agent-service: {{- tpl ( .Values.configuration.agentService | toYaml ) . | nindent 8 }} - {{- else if .Values.flyteagent.enabled }} - agent-service: - defaultAgent: - endpoint: {{ include "flyteagent.name" . }}:{{ include "flyteagent.servicePort" . }} - insecure: true - supportedTaskTypes: - - bigquery_query_job_task {{- end }} 002-database.yaml: | {{- with .Values.configuration.database }} diff --git a/charts/flyte-binary/values.yaml b/charts/flyte-binary/values.yaml index 48ae2c47dd..b8a8b58c3c 100644 --- a/charts/flyte-binary/values.yaml +++ b/charts/flyte-binary/values.yaml @@ -168,7 +168,6 @@ configuration: timeouts: GetTask: 10s defaultTimeout: 10s - # Uncomment and modify to include configuration for Flyte Agent supportedTaskTypes: - default_task # externalConfigMap Specify an existing, external ConfigMap to use as configuration for Flyte diff --git a/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml b/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml index 2e667f1256..2b0d197af3 100644 --- a/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml +++ b/deployment/sandbox-binary/flyte_sandbox_binary_helm_generated.yaml @@ -123,15 +123,6 @@ data: kubernetes-enabled: false cloudwatch-enabled: false stackdriver-enabled: false - agent-service: - defaultAgent: - defaultTimeout: 10s - endpoint: dns:///flyteagent.flyte.svc.cluster.local:8000 - insecure: true - timeouts: - GetTask: 10s - supportedTaskTypes: - - default_task 002-database.yaml: | database: postgres: @@ -367,7 +358,7 @@ spec: app.kubernetes.io/instance: flyte app.kubernetes.io/component: flyte-binary annotations: - checksum/configuration: 51494d8c2f3a6df2711d789217155f1e1b60e782dcbfd4564bfcccda24700576 + checksum/configuration: 94a584c983cfe1077f02569ae00f81c4fddae4505901006eda76d9338bd3dda2 checksum/configuration-secret: d5d93f4e67780b21593dc3799f0f6682aab0765e708e4020939975d14d44f929 checksum/cluster-resource-templates: 7dfa59f3d447e9c099b8f8ffad3af466fecbc9cf9f8c97295d9634254a55d4ae spec: diff --git a/docker/sandbox-bundled/kustomize/complete-agent/patch.yaml b/docker/sandbox-bundled/kustomize/complete-agent/add-agent-secret-patch.yaml similarity index 100% rename from docker/sandbox-bundled/kustomize/complete-agent/patch.yaml rename to docker/sandbox-bundled/kustomize/complete-agent/add-agent-secret-patch.yaml diff --git a/docker/sandbox-bundled/kustomize/complete-agent/kustomization.yaml b/docker/sandbox-bundled/kustomize/complete-agent/kustomization.yaml index 145388ca2f..111ae05ca8 100644 --- a/docker/sandbox-bundled/kustomize/complete-agent/kustomization.yaml +++ b/docker/sandbox-bundled/kustomize/complete-agent/kustomization.yaml @@ -4,12 +4,13 @@ helmCharts: - name: flyte-sandbox releaseName: flyte-sandbox namespace: flyte -- name: flyteagent - releaseName: flyteagent - namespace: flyte + valuesInline: + flyte-binary: + flyteagent: + enabled: True namespace: flyte resources: - ../namespace.yaml patchesStrategicMerge: - - patch.yaml + - add-agent-secret-patch.yaml diff --git a/docker/sandbox-bundled/manifests/complete-agent.yaml b/docker/sandbox-bundled/manifests/complete-agent.yaml index 4380b96277..c2843ad5d3 100644 --- a/docker/sandbox-bundled/manifests/complete-agent.yaml +++ b/docker/sandbox-bundled/manifests/complete-agent.yaml @@ -45,7 +45,7 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - app.kubernetes.io/instance: flyteagent + app.kubernetes.io/instance: flyte-sandbox app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: flyteagent helm.sh/chart: flyteagent-v0.1.10 @@ -816,7 +816,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: ZnNFaHlpM01FZjRaQmNJSA== + haSharedSecret: cHNOS0lPZmw0andDczdaaA== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1125,7 +1125,7 @@ metadata: annotations: projectcontour.io/upstream-protocol.h2c: grpc labels: - app.kubernetes.io/instance: flyteagent + app.kubernetes.io/instance: flyte-sandbox app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: flyteagent helm.sh/chart: flyteagent-v0.1.10 @@ -1138,7 +1138,7 @@ spec: protocol: TCP targetPort: agent-grpc selector: - app.kubernetes.io/instance: flyteagent + app.kubernetes.io/instance: flyte-sandbox app.kubernetes.io/name: flyteagent type: ClusterIP --- @@ -1411,7 +1411,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 727daf2e5024ea4e541b87b717e6f9a8706552e0ae461f82b2e5260ad564766c + checksum/secret: ce47bbc1f3ca2d8673128f8efd226bd9c7ac4f32a6ded68e54e2ebb3a843065b labels: app: docker-registry release: flyte-sandbox @@ -1722,7 +1722,7 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app.kubernetes.io/instance: flyteagent + app.kubernetes.io/instance: flyte-sandbox app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: flyteagent helm.sh/chart: flyteagent-v0.1.10 @@ -1732,12 +1732,12 @@ spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/instance: flyteagent + app.kubernetes.io/instance: flyte-sandbox app.kubernetes.io/name: flyteagent template: metadata: labels: - app.kubernetes.io/instance: flyteagent + app.kubernetes.io/instance: flyte-sandbox app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: flyteagent helm.sh/chart: flyteagent-v0.1.10 diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index 2b5b9d3168..c2d507b0f2 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -465,15 +465,6 @@ data: kubernetes-template-uri: http://localhost:30080/kubernetes-dashboard/#/log/{{.namespace }}/{{ .podName }}/pod?namespace={{ .namespace }} cloudwatch-enabled: false stackdriver-enabled: false - agent-service: - defaultAgent: - defaultTimeout: 10s - endpoint: dns:///flyteagent.flyte.svc.cluster.local:8000 - insecure: true - timeouts: - GetTask: 10s - supportedTaskTypes: - - default_task 002-database.yaml: | database: postgres: @@ -805,7 +796,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: UlI4aW9PaVFzcFpyRzhkTA== + haSharedSecret: RjR3Qnc0dWtGbHE3S3pnbA== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1203,7 +1194,7 @@ spec: metadata: annotations: checksum/cluster-resource-templates: 6fd9b172465e3089fcc59f738b92b8dc4d8939360c19de8ee65f68b0e7422035 - checksum/configuration: 6755bdc74789d7e2a80161a9f811e41ea3c0cf12bab5cb0820c7c8539b4b88fe + checksum/configuration: e2233c2adb914be363ec4fae808ed60ffb230367503f73643f011e728b853b49 checksum/configuration-secret: 09216ffaa3d29e14f88b1f30af580d02a2a5e014de4d750b7f275cc07ed4e914 labels: app.kubernetes.io/component: flyte-binary @@ -1368,7 +1359,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: cb0b9e32c83fba67eefca5b8cd0a3375b07f5d5d29f6dab9a092f91ccf7bd200 + checksum/secret: d027248867ca693de77339af17e89c22e7ad604b7abe616e40ca947ad0626a83 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index b934b7e602..5061057ee9 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: QzZJWkZlOTBQOUZxTUlvcA== + haSharedSecret: RWxBOE5BV0lIeEJ2d1c3ZA== proxyPassword: "" proxyUsername: "" kind: Secret @@ -933,7 +933,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: dd543013ea0e17fb3c9b7be54fe7c6063e8f15ad6e0887596011ddd7f22f1540 + checksum/secret: a2181c7387731100215f7ae94400f7330557b063f01f807d5aa2f333f266126e labels: app: docker-registry release: flyte-sandbox diff --git a/flyteidl/clients/go/admin/mocks/AgentMetadataServiceClient.go b/flyteidl/clients/go/admin/mocks/AgentMetadataServiceClient.go new file mode 100644 index 0000000000..d7f40932b7 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AgentMetadataServiceClient.go @@ -0,0 +1,114 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + grpc "google.golang.org/grpc" + + mock "github.com/stretchr/testify/mock" +) + +// AgentMetadataServiceClient is an autogenerated mock type for the AgentMetadataServiceClient type +type AgentMetadataServiceClient struct { + mock.Mock +} + +type AgentMetadataServiceClient_GetAgent struct { + *mock.Call +} + +func (_m AgentMetadataServiceClient_GetAgent) Return(_a0 *admin.GetAgentResponse, _a1 error) *AgentMetadataServiceClient_GetAgent { + return &AgentMetadataServiceClient_GetAgent{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AgentMetadataServiceClient) OnGetAgent(ctx context.Context, in *admin.GetAgentRequest, opts ...grpc.CallOption) *AgentMetadataServiceClient_GetAgent { + c_call := _m.On("GetAgent", ctx, in, opts) + return &AgentMetadataServiceClient_GetAgent{Call: c_call} +} + +func (_m *AgentMetadataServiceClient) OnGetAgentMatch(matchers ...interface{}) *AgentMetadataServiceClient_GetAgent { + c_call := _m.On("GetAgent", matchers...) + return &AgentMetadataServiceClient_GetAgent{Call: c_call} +} + +// GetAgent provides a mock function with given fields: ctx, in, opts +func (_m *AgentMetadataServiceClient) GetAgent(ctx context.Context, in *admin.GetAgentRequest, opts ...grpc.CallOption) (*admin.GetAgentResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *admin.GetAgentResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetAgentRequest, ...grpc.CallOption) *admin.GetAgentResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.GetAgentResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.GetAgentRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AgentMetadataServiceClient_ListAgents struct { + *mock.Call +} + +func (_m AgentMetadataServiceClient_ListAgents) Return(_a0 *admin.ListAgentsResponse, _a1 error) *AgentMetadataServiceClient_ListAgents { + return &AgentMetadataServiceClient_ListAgents{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AgentMetadataServiceClient) OnListAgents(ctx context.Context, in *admin.ListAgentsRequest, opts ...grpc.CallOption) *AgentMetadataServiceClient_ListAgents { + c_call := _m.On("ListAgents", ctx, in, opts) + return &AgentMetadataServiceClient_ListAgents{Call: c_call} +} + +func (_m *AgentMetadataServiceClient) OnListAgentsMatch(matchers ...interface{}) *AgentMetadataServiceClient_ListAgents { + c_call := _m.On("ListAgents", matchers...) + return &AgentMetadataServiceClient_ListAgents{Call: c_call} +} + +// ListAgents provides a mock function with given fields: ctx, in, opts +func (_m *AgentMetadataServiceClient) ListAgents(ctx context.Context, in *admin.ListAgentsRequest, opts ...grpc.CallOption) (*admin.ListAgentsResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *admin.ListAgentsResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.ListAgentsRequest, ...grpc.CallOption) *admin.ListAgentsResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ListAgentsResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.ListAgentsRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flyteidl/clients/go/admin/mocks/AgentMetadataServiceServer.go b/flyteidl/clients/go/admin/mocks/AgentMetadataServiceServer.go new file mode 100644 index 0000000000..d45a5f788d --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/AgentMetadataServiceServer.go @@ -0,0 +1,98 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + mock "github.com/stretchr/testify/mock" +) + +// AgentMetadataServiceServer is an autogenerated mock type for the AgentMetadataServiceServer type +type AgentMetadataServiceServer struct { + mock.Mock +} + +type AgentMetadataServiceServer_GetAgent struct { + *mock.Call +} + +func (_m AgentMetadataServiceServer_GetAgent) Return(_a0 *admin.GetAgentResponse, _a1 error) *AgentMetadataServiceServer_GetAgent { + return &AgentMetadataServiceServer_GetAgent{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AgentMetadataServiceServer) OnGetAgent(_a0 context.Context, _a1 *admin.GetAgentRequest) *AgentMetadataServiceServer_GetAgent { + c_call := _m.On("GetAgent", _a0, _a1) + return &AgentMetadataServiceServer_GetAgent{Call: c_call} +} + +func (_m *AgentMetadataServiceServer) OnGetAgentMatch(matchers ...interface{}) *AgentMetadataServiceServer_GetAgent { + c_call := _m.On("GetAgent", matchers...) + return &AgentMetadataServiceServer_GetAgent{Call: c_call} +} + +// GetAgent provides a mock function with given fields: _a0, _a1 +func (_m *AgentMetadataServiceServer) GetAgent(_a0 context.Context, _a1 *admin.GetAgentRequest) (*admin.GetAgentResponse, error) { + ret := _m.Called(_a0, _a1) + + var r0 *admin.GetAgentResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetAgentRequest) *admin.GetAgentResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.GetAgentResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.GetAgentRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AgentMetadataServiceServer_ListAgents struct { + *mock.Call +} + +func (_m AgentMetadataServiceServer_ListAgents) Return(_a0 *admin.ListAgentsResponse, _a1 error) *AgentMetadataServiceServer_ListAgents { + return &AgentMetadataServiceServer_ListAgents{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AgentMetadataServiceServer) OnListAgents(_a0 context.Context, _a1 *admin.ListAgentsRequest) *AgentMetadataServiceServer_ListAgents { + c_call := _m.On("ListAgents", _a0, _a1) + return &AgentMetadataServiceServer_ListAgents{Call: c_call} +} + +func (_m *AgentMetadataServiceServer) OnListAgentsMatch(matchers ...interface{}) *AgentMetadataServiceServer_ListAgents { + c_call := _m.On("ListAgents", matchers...) + return &AgentMetadataServiceServer_ListAgents{Call: c_call} +} + +// ListAgents provides a mock function with given fields: _a0, _a1 +func (_m *AgentMetadataServiceServer) ListAgents(_a0 context.Context, _a1 *admin.ListAgentsRequest) (*admin.ListAgentsResponse, error) { + ret := _m.Called(_a0, _a1) + + var r0 *admin.ListAgentsResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.ListAgentsRequest) *admin.ListAgentsResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ListAgentsResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.ListAgentsRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.cc index ec842a83aa..490636e25c 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.cc +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.cc @@ -16,10 +16,11 @@ // @@protoc_insertion_point(includes) #include +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Agent_flyteidl_2fadmin_2fagent_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TaskExecutionMetadata_AnnotationsEntry_DoNotUse_flyteidl_2fadmin_2fagent_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TaskExecutionMetadata_EnvironmentVariablesEntry_DoNotUse_flyteidl_2fadmin_2fagent_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fagent_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TaskExecutionMetadata_LabelsEntry_DoNotUse_flyteidl_2fadmin_2fagent_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fagent_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Resource_flyteidl_2fadmin_2fagent_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fagent_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_Resource_flyteidl_2fadmin_2fagent_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fadmin_2fagent_2eproto ::google::protobuf::internal::SCCInfo<4> scc_info_TaskExecutionMetadata_flyteidl_2fadmin_2fagent_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fcore_2fexecution_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_TaskLog_flyteidl_2fcore_2fexecution_2eproto; extern PROTOBUF_INTERNAL_EXPORT_flyteidl_2fcore_2fidentifier_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_TaskExecutionIdentifier_flyteidl_2fcore_2fidentifier_2eproto; @@ -50,6 +51,8 @@ class CreateTaskRequestDefaultTypeInternal { class CreateTaskResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::google::protobuf::internal::ArenaStringPtr resource_meta_; + const ::flyteidl::admin::Resource* resource_; } _CreateTaskResponse_default_instance_; class GetTaskRequestDefaultTypeInternal { public: @@ -71,6 +74,26 @@ class DeleteTaskResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _DeleteTaskResponse_default_instance_; +class AgentDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _Agent_default_instance_; +class GetAgentRequestDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _GetAgentRequest_default_instance_; +class GetAgentResponseDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _GetAgentResponse_default_instance_; +class ListAgentsRequestDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _ListAgentsRequest_default_instance_; +class ListAgentsResponseDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed _instance; +} _ListAgentsResponse_default_instance_; } // namespace admin } // namespace flyteidl static void InitDefaultsTaskExecutionMetadata_LabelsEntry_DoNotUse_flyteidl_2fadmin_2fagent_2eproto() { @@ -158,8 +181,9 @@ static void InitDefaultsCreateTaskResponse_flyteidl_2fadmin_2fagent_2eproto() { ::flyteidl::admin::CreateTaskResponse::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_CreateTaskResponse_flyteidl_2fadmin_2fagent_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsCreateTaskResponse_flyteidl_2fadmin_2fagent_2eproto}, {}}; +::google::protobuf::internal::SCCInfo<1> scc_info_CreateTaskResponse_flyteidl_2fadmin_2fagent_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsCreateTaskResponse_flyteidl_2fadmin_2fagent_2eproto}, { + &scc_info_Resource_flyteidl_2fadmin_2fagent_2eproto.base,}}; static void InitDefaultsGetTaskRequest_flyteidl_2fadmin_2fagent_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -202,9 +226,10 @@ static void InitDefaultsResource_flyteidl_2fadmin_2fagent_2eproto() { ::flyteidl::admin::Resource::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_Resource_flyteidl_2fadmin_2fagent_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsResource_flyteidl_2fadmin_2fagent_2eproto}, { - &scc_info_Literal_flyteidl_2fcore_2fliterals_2eproto.base,}}; +::google::protobuf::internal::SCCInfo<2> scc_info_Resource_flyteidl_2fadmin_2fagent_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsResource_flyteidl_2fadmin_2fagent_2eproto}, { + &scc_info_Literal_flyteidl_2fcore_2fliterals_2eproto.base, + &scc_info_TaskLog_flyteidl_2fcore_2fexecution_2eproto.base,}}; static void InitDefaultsDeleteTaskRequest_flyteidl_2fadmin_2fagent_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -234,6 +259,78 @@ static void InitDefaultsDeleteTaskResponse_flyteidl_2fadmin_2fagent_2eproto() { ::google::protobuf::internal::SCCInfo<0> scc_info_DeleteTaskResponse_flyteidl_2fadmin_2fagent_2eproto = {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDeleteTaskResponse_flyteidl_2fadmin_2fagent_2eproto}, {}}; +static void InitDefaultsAgent_flyteidl_2fadmin_2fagent_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::admin::_Agent_default_instance_; + new (ptr) ::flyteidl::admin::Agent(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::admin::Agent::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_Agent_flyteidl_2fadmin_2fagent_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAgent_flyteidl_2fadmin_2fagent_2eproto}, {}}; + +static void InitDefaultsGetAgentRequest_flyteidl_2fadmin_2fagent_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::admin::_GetAgentRequest_default_instance_; + new (ptr) ::flyteidl::admin::GetAgentRequest(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::admin::GetAgentRequest::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_GetAgentRequest_flyteidl_2fadmin_2fagent_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGetAgentRequest_flyteidl_2fadmin_2fagent_2eproto}, {}}; + +static void InitDefaultsGetAgentResponse_flyteidl_2fadmin_2fagent_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::admin::_GetAgentResponse_default_instance_; + new (ptr) ::flyteidl::admin::GetAgentResponse(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::admin::GetAgentResponse::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_GetAgentResponse_flyteidl_2fadmin_2fagent_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsGetAgentResponse_flyteidl_2fadmin_2fagent_2eproto}, { + &scc_info_Agent_flyteidl_2fadmin_2fagent_2eproto.base,}}; + +static void InitDefaultsListAgentsRequest_flyteidl_2fadmin_2fagent_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::admin::_ListAgentsRequest_default_instance_; + new (ptr) ::flyteidl::admin::ListAgentsRequest(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::admin::ListAgentsRequest::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<0> scc_info_ListAgentsRequest_flyteidl_2fadmin_2fagent_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListAgentsRequest_flyteidl_2fadmin_2fagent_2eproto}, {}}; + +static void InitDefaultsListAgentsResponse_flyteidl_2fadmin_2fagent_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::flyteidl::admin::_ListAgentsResponse_default_instance_; + new (ptr) ::flyteidl::admin::ListAgentsResponse(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::flyteidl::admin::ListAgentsResponse::InitAsDefaultInstance(); +} + +::google::protobuf::internal::SCCInfo<1> scc_info_ListAgentsResponse_flyteidl_2fadmin_2fagent_2eproto = + {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListAgentsResponse_flyteidl_2fadmin_2fagent_2eproto}, { + &scc_info_Agent_flyteidl_2fadmin_2fagent_2eproto.base,}}; + void InitDefaults_flyteidl_2fadmin_2fagent_2eproto() { ::google::protobuf::internal::InitSCC(&scc_info_TaskExecutionMetadata_LabelsEntry_DoNotUse_flyteidl_2fadmin_2fagent_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_TaskExecutionMetadata_AnnotationsEntry_DoNotUse_flyteidl_2fadmin_2fagent_2eproto.base); @@ -246,9 +343,14 @@ void InitDefaults_flyteidl_2fadmin_2fagent_2eproto() { ::google::protobuf::internal::InitSCC(&scc_info_Resource_flyteidl_2fadmin_2fagent_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_DeleteTaskRequest_flyteidl_2fadmin_2fagent_2eproto.base); ::google::protobuf::internal::InitSCC(&scc_info_DeleteTaskResponse_flyteidl_2fadmin_2fagent_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_Agent_flyteidl_2fadmin_2fagent_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_GetAgentRequest_flyteidl_2fadmin_2fagent_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_GetAgentResponse_flyteidl_2fadmin_2fagent_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_ListAgentsRequest_flyteidl_2fadmin_2fagent_2eproto.base); + ::google::protobuf::internal::InitSCC(&scc_info_ListAgentsResponse_flyteidl_2fadmin_2fagent_2eproto.base); } -::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fagent_2eproto[11]; +::google::protobuf::Metadata file_level_metadata_flyteidl_2fadmin_2fagent_2eproto[16]; const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_flyteidl_2fadmin_2fagent_2eproto[1]; constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_flyteidl_2fadmin_2fagent_2eproto = nullptr; @@ -303,9 +405,11 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fagent_2eproto::o ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::flyteidl::admin::CreateTaskResponse, _internal_metadata_), ~0u, // no _extensions_ - ~0u, // no _oneof_case_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::CreateTaskResponse, _oneof_case_[0]), ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::flyteidl::admin::CreateTaskResponse, resource_meta_), + offsetof(::flyteidl::admin::CreateTaskResponseDefaultTypeInternal, resource_meta_), + offsetof(::flyteidl::admin::CreateTaskResponseDefaultTypeInternal, resource_), + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::CreateTaskResponse, res_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::flyteidl::admin::GetTaskRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -328,6 +432,7 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fagent_2eproto::o PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Resource, state_), PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Resource, outputs_), PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Resource, message_), + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Resource, log_links_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::flyteidl::admin::DeleteTaskRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -340,6 +445,36 @@ const ::google::protobuf::uint32 TableStruct_flyteidl_2fadmin_2fagent_2eproto::o ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Agent, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Agent, name_), + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::Agent, supported_task_types_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::GetAgentRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::GetAgentRequest, name_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::GetAgentResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::GetAgentResponse, agent_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ListAgentsRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ListAgentsResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::flyteidl::admin::ListAgentsResponse, agents_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, 7, sizeof(::flyteidl::admin::TaskExecutionMetadata_LabelsEntry_DoNotUse)}, @@ -348,11 +483,16 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SE { 27, -1, sizeof(::flyteidl::admin::TaskExecutionMetadata)}, { 38, -1, sizeof(::flyteidl::admin::CreateTaskRequest)}, { 47, -1, sizeof(::flyteidl::admin::CreateTaskResponse)}, - { 53, -1, sizeof(::flyteidl::admin::GetTaskRequest)}, - { 60, -1, sizeof(::flyteidl::admin::GetTaskResponse)}, - { 67, -1, sizeof(::flyteidl::admin::Resource)}, - { 75, -1, sizeof(::flyteidl::admin::DeleteTaskRequest)}, - { 82, -1, sizeof(::flyteidl::admin::DeleteTaskResponse)}, + { 55, -1, sizeof(::flyteidl::admin::GetTaskRequest)}, + { 62, -1, sizeof(::flyteidl::admin::GetTaskResponse)}, + { 69, -1, sizeof(::flyteidl::admin::Resource)}, + { 78, -1, sizeof(::flyteidl::admin::DeleteTaskRequest)}, + { 85, -1, sizeof(::flyteidl::admin::DeleteTaskResponse)}, + { 90, -1, sizeof(::flyteidl::admin::Agent)}, + { 97, -1, sizeof(::flyteidl::admin::GetAgentRequest)}, + { 103, -1, sizeof(::flyteidl::admin::GetAgentResponse)}, + { 109, -1, sizeof(::flyteidl::admin::ListAgentsRequest)}, + { 114, -1, sizeof(::flyteidl::admin::ListAgentsResponse)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { @@ -367,12 +507,17 @@ static ::google::protobuf::Message const * const file_default_instances[] = { reinterpret_cast(&::flyteidl::admin::_Resource_default_instance_), reinterpret_cast(&::flyteidl::admin::_DeleteTaskRequest_default_instance_), reinterpret_cast(&::flyteidl::admin::_DeleteTaskResponse_default_instance_), + reinterpret_cast(&::flyteidl::admin::_Agent_default_instance_), + reinterpret_cast(&::flyteidl::admin::_GetAgentRequest_default_instance_), + reinterpret_cast(&::flyteidl::admin::_GetAgentResponse_default_instance_), + reinterpret_cast(&::flyteidl::admin::_ListAgentsRequest_default_instance_), + reinterpret_cast(&::flyteidl::admin::_ListAgentsResponse_default_instance_), }; ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto = { {}, AddDescriptors_flyteidl_2fadmin_2fagent_2eproto, "flyteidl/admin/agent.proto", schemas, file_default_instances, TableStruct_flyteidl_2fadmin_2fagent_2eproto::offsets, - file_level_metadata_flyteidl_2fadmin_2fagent_2eproto, 11, file_level_enum_descriptors_flyteidl_2fadmin_2fagent_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fagent_2eproto, + file_level_metadata_flyteidl_2fadmin_2fagent_2eproto, 16, file_level_enum_descriptors_flyteidl_2fadmin_2fagent_2eproto, file_level_service_descriptors_flyteidl_2fadmin_2fagent_2eproto, }; const char descriptor_table_protodef_flyteidl_2fadmin_2fagent_2eproto[] = @@ -399,26 +544,35 @@ const char descriptor_table_protodef_flyteidl_2fadmin_2fagent_2eproto[] = "p\022-\n\010template\030\002 \001(\0132\033.flyteidl.core.Task" "Template\022\025\n\routput_prefix\030\003 \001(\t\022F\n\027task_" "execution_metadata\030\004 \001(\0132%.flyteidl.admi" - "n.TaskExecutionMetadata\"+\n\022CreateTaskRes" - "ponse\022\025\n\rresource_meta\030\001 \001(\014\":\n\016GetTaskR" - "equest\022\021\n\ttask_type\030\001 \001(\t\022\025\n\rresource_me" - "ta\030\002 \001(\014\"h\n\017GetTaskResponse\022*\n\010resource\030" - "\001 \001(\0132\030.flyteidl.admin.Resource\022)\n\tlog_l" - "inks\030\002 \003(\0132\026.flyteidl.core.TaskLog\"m\n\010Re" - "source\022$\n\005state\030\001 \001(\0162\025.flyteidl.admin.S" - "tate\022*\n\007outputs\030\002 \001(\0132\031.flyteidl.core.Li" - "teralMap\022\017\n\007message\030\003 \001(\t\"=\n\021DeleteTaskR" - "equest\022\021\n\ttask_type\030\001 \001(\t\022\025\n\rresource_me" - "ta\030\002 \001(\014\"\024\n\022DeleteTaskResponse*^\n\005State\022" - "\025\n\021RETRYABLE_FAILURE\020\000\022\025\n\021PERMANENT_FAIL" - "URE\020\001\022\013\n\007PENDING\020\002\022\013\n\007RUNNING\020\003\022\r\n\tSUCCE" - "EDED\020\004B=Z;github.com/flyteorg/flyte/flyt" - "eidl/gen/pb-go/flyteidl/adminb\006proto3" + "n.TaskExecutionMetadata\"b\n\022CreateTaskRes" + "ponse\022\027\n\rresource_meta\030\001 \001(\014H\000\022,\n\010resour" + "ce\030\002 \001(\0132\030.flyteidl.admin.ResourceH\000B\005\n\003" + "res\":\n\016GetTaskRequest\022\021\n\ttask_type\030\001 \001(\t" + "\022\025\n\rresource_meta\030\002 \001(\014\"h\n\017GetTaskRespon" + "se\022*\n\010resource\030\001 \001(\0132\030.flyteidl.admin.Re" + "source\022)\n\tlog_links\030\002 \003(\0132\026.flyteidl.cor" + "e.TaskLog\"\230\001\n\010Resource\022$\n\005state\030\001 \001(\0162\025." + "flyteidl.admin.State\022*\n\007outputs\030\002 \001(\0132\031." + "flyteidl.core.LiteralMap\022\017\n\007message\030\003 \001(" + "\t\022)\n\tlog_links\030\004 \003(\0132\026.flyteidl.core.Tas" + "kLog\"=\n\021DeleteTaskRequest\022\021\n\ttask_type\030\001" + " \001(\t\022\025\n\rresource_meta\030\002 \001(\014\"\024\n\022DeleteTas" + "kResponse\"3\n\005Agent\022\014\n\004name\030\001 \001(\t\022\034\n\024supp" + "orted_task_types\030\002 \003(\t\"\037\n\017GetAgentReques" + "t\022\014\n\004name\030\001 \001(\t\"8\n\020GetAgentResponse\022$\n\005a" + "gent\030\001 \001(\0132\025.flyteidl.admin.Agent\"\023\n\021Lis" + "tAgentsRequest\";\n\022ListAgentsResponse\022%\n\006" + "agents\030\001 \003(\0132\025.flyteidl.admin.Agent*^\n\005S" + "tate\022\025\n\021RETRYABLE_FAILURE\020\000\022\025\n\021PERMANENT" + "_FAILURE\020\001\022\013\n\007PENDING\020\002\022\013\n\007RUNNING\020\003\022\r\n\t" + "SUCCEEDED\020\004B=Z;github.com/flyteorg/flyte" + "/flyteidl/gen/pb-go/flyteidl/adminb\006prot" + "o3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fadmin_2fagent_2eproto = { false, InitDefaults_flyteidl_2fadmin_2fagent_2eproto, descriptor_table_protodef_flyteidl_2fadmin_2fagent_2eproto, - "flyteidl/admin/agent.proto", &assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto, 1517, + "flyteidl/admin/agent.proto", &assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto, 1842, }; void AddDescriptors_flyteidl_2fadmin_2fagent_2eproto() { @@ -2020,13 +2174,37 @@ ::google::protobuf::Metadata CreateTaskRequest::GetMetadata() const { // =================================================================== void CreateTaskResponse::InitAsDefaultInstance() { + ::flyteidl::admin::_CreateTaskResponse_default_instance_.resource_meta_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::flyteidl::admin::_CreateTaskResponse_default_instance_.resource_ = const_cast< ::flyteidl::admin::Resource*>( + ::flyteidl::admin::Resource::internal_default_instance()); } class CreateTaskResponse::HasBitSetters { public: + static const ::flyteidl::admin::Resource& resource(const CreateTaskResponse* msg); }; +const ::flyteidl::admin::Resource& +CreateTaskResponse::HasBitSetters::resource(const CreateTaskResponse* msg) { + return *msg->res_.resource_; +} +void CreateTaskResponse::set_allocated_resource(::flyteidl::admin::Resource* resource) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + clear_res(); + if (resource) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + resource = ::google::protobuf::internal::GetOwnedMessage( + message_arena, resource, submessage_arena); + } + set_has_resource(); + res_.resource_ = resource; + } + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.CreateTaskResponse.resource) +} #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int CreateTaskResponse::kResourceMetaFieldNumber; +const int CreateTaskResponse::kResourceFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 CreateTaskResponse::CreateTaskResponse() @@ -2038,9 +2216,19 @@ CreateTaskResponse::CreateTaskResponse(const CreateTaskResponse& from) : ::google::protobuf::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - resource_meta_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.resource_meta().size() > 0) { - resource_meta_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resource_meta_); + clear_has_res(); + switch (from.res_case()) { + case kResourceMeta: { + set_resource_meta(from.resource_meta()); + break; + } + case kResource: { + mutable_resource()->::flyteidl::admin::Resource::MergeFrom(from.resource()); + break; + } + case RES_NOT_SET: { + break; + } } // @@protoc_insertion_point(copy_constructor:flyteidl.admin.CreateTaskResponse) } @@ -2048,7 +2236,7 @@ CreateTaskResponse::CreateTaskResponse(const CreateTaskResponse& from) void CreateTaskResponse::SharedCtor() { ::google::protobuf::internal::InitSCC( &scc_info_CreateTaskResponse_flyteidl_2fadmin_2fagent_2eproto.base); - resource_meta_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_res(); } CreateTaskResponse::~CreateTaskResponse() { @@ -2057,7 +2245,9 @@ CreateTaskResponse::~CreateTaskResponse() { } void CreateTaskResponse::SharedDtor() { - resource_meta_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_res()) { + clear_res(); + } } void CreateTaskResponse::SetCachedSize(int size) const { @@ -2069,13 +2259,32 @@ const CreateTaskResponse& CreateTaskResponse::default_instance() { } +void CreateTaskResponse::clear_res() { +// @@protoc_insertion_point(one_of_clear_start:flyteidl.admin.CreateTaskResponse) + switch (res_case()) { + case kResourceMeta: { + res_.resource_meta_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kResource: { + delete res_.resource_; + break; + } + case RES_NOT_SET: { + break; + } + } + _oneof_case_[0] = RES_NOT_SET; +} + + void CreateTaskResponse::Clear() { // @@protoc_insertion_point(message_clear_start:flyteidl.admin.CreateTaskResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - resource_meta_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_res(); _internal_metadata_.Clear(); } @@ -2107,6 +2316,19 @@ const char* CreateTaskResponse::_InternalParse(const char* begin, const char* en ptr += size; break; } + // .flyteidl.admin.Resource resource = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::admin::Resource::_InternalParse; + object = msg->mutable_resource(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -2152,6 +2374,17 @@ bool CreateTaskResponse::MergePartialFromCodedStream( break; } + // .flyteidl.admin.Resource resource = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_resource())); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -2180,11 +2413,17 @@ void CreateTaskResponse::SerializeWithCachedSizes( (void) cached_has_bits; // bytes resource_meta = 1; - if (this->resource_meta().size() > 0) { + if (has_resource_meta()) { ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( 1, this->resource_meta(), output); } + // .flyteidl.admin.Resource resource = 2; + if (has_resource()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, HasBitSetters::resource(this), output); + } + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); @@ -2199,12 +2438,19 @@ ::google::protobuf::uint8* CreateTaskResponse::InternalSerializeWithCachedSizesT (void) cached_has_bits; // bytes resource_meta = 1; - if (this->resource_meta().size() > 0) { + if (has_resource_meta()) { target = ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( 1, this->resource_meta(), target); } + // .flyteidl.admin.Resource resource = 2; + if (has_resource()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, HasBitSetters::resource(this), target); + } + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); @@ -2226,13 +2472,25 @@ size_t CreateTaskResponse::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // bytes resource_meta = 1; - if (this->resource_meta().size() > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::BytesSize( - this->resource_meta()); + switch (res_case()) { + // bytes resource_meta = 1; + case kResourceMeta: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->resource_meta()); + break; + } + // .flyteidl.admin.Resource resource = 2; + case kResource: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *res_.resource_); + break; + } + case RES_NOT_SET: { + break; + } } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; @@ -2260,9 +2518,18 @@ void CreateTaskResponse::MergeFrom(const CreateTaskResponse& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (from.resource_meta().size() > 0) { - - resource_meta_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resource_meta_); + switch (from.res_case()) { + case kResourceMeta: { + set_resource_meta(from.resource_meta()); + break; + } + case kResource: { + mutable_resource()->::flyteidl::admin::Resource::MergeFrom(from.resource()); + break; + } + case RES_NOT_SET: { + break; + } } } @@ -2291,8 +2558,8 @@ void CreateTaskResponse::Swap(CreateTaskResponse* other) { void CreateTaskResponse::InternalSwap(CreateTaskResponse* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - resource_meta_.Swap(&other->resource_meta_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - GetArenaNoVirtual()); + swap(res_, other->res_); + swap(_oneof_case_[0], other->_oneof_case_[0]); } ::google::protobuf::Metadata CreateTaskResponse::GetMetadata() const { @@ -3029,10 +3296,14 @@ void Resource::clear_outputs() { } outputs_ = nullptr; } +void Resource::clear_log_links() { + log_links_.Clear(); +} #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Resource::kStateFieldNumber; const int Resource::kOutputsFieldNumber; const int Resource::kMessageFieldNumber; +const int Resource::kLogLinksFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 Resource::Resource() @@ -3042,7 +3313,8 @@ Resource::Resource() } Resource::Resource(const Resource& from) : ::google::protobuf::Message(), - _internal_metadata_(nullptr) { + _internal_metadata_(nullptr), + log_links_(from.log_links_) { _internal_metadata_.MergeFrom(from._internal_metadata_); message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (from.message().size() > 0) { @@ -3091,6 +3363,7 @@ void Resource::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + log_links_.Clear(); message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && outputs_ != nullptr) { delete outputs_; @@ -3150,6 +3423,22 @@ const char* Resource::_InternalParse(const char* begin, const char* end, void* o ptr += size; break; } + // repeated .flyteidl.core.TaskLog log_links = 4; + case 4: { + if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::core::TaskLog::_InternalParse; + object = msg->add_log_links(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 34 && (ptr += 1)); + break; + } default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -3224,6 +3513,17 @@ bool Resource::MergePartialFromCodedStream( break; } + // repeated .flyteidl.core.TaskLog log_links = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_log_links())); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -3273,6 +3573,15 @@ void Resource::SerializeWithCachedSizes( 3, this->message(), output); } + // repeated .flyteidl.core.TaskLog log_links = 4; + for (unsigned int i = 0, + n = static_cast(this->log_links_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, + this->log_links(static_cast(i)), + output); + } + if (_internal_metadata_.have_unknown_fields()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); @@ -3310,6 +3619,14 @@ ::google::protobuf::uint8* Resource::InternalSerializeWithCachedSizesToArray( 3, this->message(), target); } + // repeated .flyteidl.core.TaskLog log_links = 4; + for (unsigned int i = 0, + n = static_cast(this->log_links_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 4, this->log_links(static_cast(i)), target); + } + if (_internal_metadata_.have_unknown_fields()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); @@ -3331,6 +3648,17 @@ size_t Resource::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // repeated .flyteidl.core.TaskLog log_links = 4; + { + unsigned int count = static_cast(this->log_links_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->log_links(static_cast(i))); + } + } + // string message = 3; if (this->message().size() > 0) { total_size += 1 + @@ -3378,6 +3706,7 @@ void Resource::MergeFrom(const Resource& from) { ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + log_links_.MergeFrom(from.log_links_); if (from.message().size() > 0) { message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_); @@ -3415,6 +3744,7 @@ void Resource::Swap(Resource* other) { void Resource::InternalSwap(Resource* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&log_links_)->InternalSwap(CastToBase(&other->log_links_)); message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(outputs_, other->outputs_); @@ -3993,43 +4323,1496 @@ ::google::protobuf::Metadata DeleteTaskResponse::GetMetadata() const { } -// @@protoc_insertion_point(namespace_scope) -} // namespace admin -} // namespace flyteidl -namespace google { -namespace protobuf { -template<> PROTOBUF_NOINLINE ::flyteidl::admin::TaskExecutionMetadata_LabelsEntry_DoNotUse* Arena::CreateMaybeMessage< ::flyteidl::admin::TaskExecutionMetadata_LabelsEntry_DoNotUse >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::TaskExecutionMetadata_LabelsEntry_DoNotUse >(arena); -} -template<> PROTOBUF_NOINLINE ::flyteidl::admin::TaskExecutionMetadata_AnnotationsEntry_DoNotUse* Arena::CreateMaybeMessage< ::flyteidl::admin::TaskExecutionMetadata_AnnotationsEntry_DoNotUse >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::TaskExecutionMetadata_AnnotationsEntry_DoNotUse >(arena); +// =================================================================== + +void Agent::InitAsDefaultInstance() { } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::TaskExecutionMetadata_EnvironmentVariablesEntry_DoNotUse* Arena::CreateMaybeMessage< ::flyteidl::admin::TaskExecutionMetadata_EnvironmentVariablesEntry_DoNotUse >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::TaskExecutionMetadata_EnvironmentVariablesEntry_DoNotUse >(arena); +class Agent::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Agent::kNameFieldNumber; +const int Agent::kSupportedTaskTypesFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Agent::Agent() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.admin.Agent) } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::TaskExecutionMetadata* Arena::CreateMaybeMessage< ::flyteidl::admin::TaskExecutionMetadata >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::TaskExecutionMetadata >(arena); +Agent::Agent(const Agent& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + supported_task_types_(from.supported_task_types_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + // @@protoc_insertion_point(copy_constructor:flyteidl.admin.Agent) } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::CreateTaskRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::CreateTaskRequest >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::CreateTaskRequest >(arena); + +void Agent::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_Agent_flyteidl_2fadmin_2fagent_2eproto.base); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::CreateTaskResponse* Arena::CreateMaybeMessage< ::flyteidl::admin::CreateTaskResponse >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::CreateTaskResponse >(arena); + +Agent::~Agent() { + // @@protoc_insertion_point(destructor:flyteidl.admin.Agent) + SharedDtor(); } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::GetTaskRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::GetTaskRequest >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::GetTaskRequest >(arena); + +void Agent::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::GetTaskResponse* Arena::CreateMaybeMessage< ::flyteidl::admin::GetTaskResponse >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::GetTaskResponse >(arena); + +void Agent::SetCachedSize(int size) const { + _cached_size_.Set(size); } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::Resource* Arena::CreateMaybeMessage< ::flyteidl::admin::Resource >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::Resource >(arena); +const Agent& Agent::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_Agent_flyteidl_2fadmin_2fagent_2eproto.base); + return *internal_default_instance(); } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::DeleteTaskRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::DeleteTaskRequest >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::DeleteTaskRequest >(arena); + + +void Agent::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.admin.Agent) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + supported_task_types_.Clear(); + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); } -template<> PROTOBUF_NOINLINE ::flyteidl::admin::DeleteTaskResponse* Arena::CreateMaybeMessage< ::flyteidl::admin::DeleteTaskResponse >(Arena* arena) { - return Arena::CreateInternal< ::flyteidl::admin::DeleteTaskResponse >(arena); + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Agent::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.admin.Agent.name"); + object = msg->mutable_name(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + // repeated string supported_task_types = 2; + case 2: { + if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.admin.Agent.supported_task_types"); + object = msg->add_supported_task_types(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool Agent::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.admin.Agent) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.admin.Agent.name")); + } else { + goto handle_unusual; + } + break; + } + + // repeated string supported_task_types = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_supported_task_types())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->supported_task_types(this->supported_task_types_size() - 1).data(), + static_cast(this->supported_task_types(this->supported_task_types_size() - 1).length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.admin.Agent.supported_task_types")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.admin.Agent) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.admin.Agent) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void Agent::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.admin.Agent) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.Agent.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // repeated string supported_task_types = 2; + for (int i = 0, n = this->supported_task_types_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->supported_task_types(i).data(), static_cast(this->supported_task_types(i).length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.Agent.supported_task_types"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->supported_task_types(i), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.admin.Agent) +} + +::google::protobuf::uint8* Agent::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.Agent) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.Agent.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // repeated string supported_task_types = 2; + for (int i = 0, n = this->supported_task_types_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->supported_task_types(i).data(), static_cast(this->supported_task_types(i).length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.Agent.supported_task_types"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(2, this->supported_task_types(i), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.Agent) + return target; +} + +size_t Agent::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.Agent) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string supported_task_types = 2; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->supported_task_types_size()); + for (int i = 0, n = this->supported_task_types_size(); i < n; i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->supported_task_types(i)); + } + + // string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Agent::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.Agent) + GOOGLE_DCHECK_NE(&from, this); + const Agent* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.Agent) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.Agent) + MergeFrom(*source); + } +} + +void Agent::MergeFrom(const Agent& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.Agent) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + supported_task_types_.MergeFrom(from.supported_task_types_); + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } +} + +void Agent::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.Agent) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Agent::CopyFrom(const Agent& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.Agent) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Agent::IsInitialized() const { + return true; +} + +void Agent::Swap(Agent* other) { + if (other == this) return; + InternalSwap(other); +} +void Agent::InternalSwap(Agent* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + supported_task_types_.InternalSwap(CastToBase(&other->supported_task_types_)); + name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::google::protobuf::Metadata Agent::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto); + return ::file_level_metadata_flyteidl_2fadmin_2fagent_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void GetAgentRequest::InitAsDefaultInstance() { +} +class GetAgentRequest::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int GetAgentRequest::kNameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +GetAgentRequest::GetAgentRequest() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.admin.GetAgentRequest) +} +GetAgentRequest::GetAgentRequest(const GetAgentRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.name().size() > 0) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + // @@protoc_insertion_point(copy_constructor:flyteidl.admin.GetAgentRequest) +} + +void GetAgentRequest::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_GetAgentRequest_flyteidl_2fadmin_2fagent_2eproto.base); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +GetAgentRequest::~GetAgentRequest() { + // @@protoc_insertion_point(destructor:flyteidl.admin.GetAgentRequest) + SharedDtor(); +} + +void GetAgentRequest::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void GetAgentRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const GetAgentRequest& GetAgentRequest::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_GetAgentRequest_flyteidl_2fadmin_2fagent_2eproto.base); + return *internal_default_instance(); +} + + +void GetAgentRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.admin.GetAgentRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* GetAgentRequest::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // string name = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ctx->extra_parse_data().SetFieldName("flyteidl.admin.GetAgentRequest.name"); + object = msg->mutable_name(); + if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { + parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; + goto string_till_end; + } + GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); + ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); + ptr += size; + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +string_till_end: + static_cast<::std::string*>(object)->clear(); + static_cast<::std::string*>(object)->reserve(size); + goto len_delim_till_end; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool GetAgentRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.admin.GetAgentRequest) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "flyteidl.admin.GetAgentRequest.name")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.admin.GetAgentRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.admin.GetAgentRequest) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void GetAgentRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.admin.GetAgentRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.GetAgentRequest.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.admin.GetAgentRequest) +} + +::google::protobuf::uint8* GetAgentRequest::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.GetAgentRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "flyteidl.admin.GetAgentRequest.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.GetAgentRequest) + return target; +} + +size_t GetAgentRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.GetAgentRequest) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void GetAgentRequest::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.GetAgentRequest) + GOOGLE_DCHECK_NE(&from, this); + const GetAgentRequest* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.GetAgentRequest) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.GetAgentRequest) + MergeFrom(*source); + } +} + +void GetAgentRequest::MergeFrom(const GetAgentRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.GetAgentRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } +} + +void GetAgentRequest::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.GetAgentRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void GetAgentRequest::CopyFrom(const GetAgentRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.GetAgentRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetAgentRequest::IsInitialized() const { + return true; +} + +void GetAgentRequest::Swap(GetAgentRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void GetAgentRequest::InternalSwap(GetAgentRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::google::protobuf::Metadata GetAgentRequest::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto); + return ::file_level_metadata_flyteidl_2fadmin_2fagent_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void GetAgentResponse::InitAsDefaultInstance() { + ::flyteidl::admin::_GetAgentResponse_default_instance_._instance.get_mutable()->agent_ = const_cast< ::flyteidl::admin::Agent*>( + ::flyteidl::admin::Agent::internal_default_instance()); +} +class GetAgentResponse::HasBitSetters { + public: + static const ::flyteidl::admin::Agent& agent(const GetAgentResponse* msg); +}; + +const ::flyteidl::admin::Agent& +GetAgentResponse::HasBitSetters::agent(const GetAgentResponse* msg) { + return *msg->agent_; +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int GetAgentResponse::kAgentFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +GetAgentResponse::GetAgentResponse() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.admin.GetAgentResponse) +} +GetAgentResponse::GetAgentResponse(const GetAgentResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_agent()) { + agent_ = new ::flyteidl::admin::Agent(*from.agent_); + } else { + agent_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:flyteidl.admin.GetAgentResponse) +} + +void GetAgentResponse::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_GetAgentResponse_flyteidl_2fadmin_2fagent_2eproto.base); + agent_ = nullptr; +} + +GetAgentResponse::~GetAgentResponse() { + // @@protoc_insertion_point(destructor:flyteidl.admin.GetAgentResponse) + SharedDtor(); +} + +void GetAgentResponse::SharedDtor() { + if (this != internal_default_instance()) delete agent_; +} + +void GetAgentResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const GetAgentResponse& GetAgentResponse::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_GetAgentResponse_flyteidl_2fadmin_2fagent_2eproto.base); + return *internal_default_instance(); +} + + +void GetAgentResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.admin.GetAgentResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaNoVirtual() == nullptr && agent_ != nullptr) { + delete agent_; + } + agent_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* GetAgentResponse::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // .flyteidl.admin.Agent agent = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::admin::Agent::_InternalParse; + object = msg->mutable_agent(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool GetAgentResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.admin.GetAgentResponse) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .flyteidl.admin.Agent agent = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_agent())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.admin.GetAgentResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.admin.GetAgentResponse) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void GetAgentResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.admin.GetAgentResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.admin.Agent agent = 1; + if (this->has_agent()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, HasBitSetters::agent(this), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.admin.GetAgentResponse) +} + +::google::protobuf::uint8* GetAgentResponse::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.GetAgentResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .flyteidl.admin.Agent agent = 1; + if (this->has_agent()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, HasBitSetters::agent(this), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.GetAgentResponse) + return target; +} + +size_t GetAgentResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.GetAgentResponse) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .flyteidl.admin.Agent agent = 1; + if (this->has_agent()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *agent_); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void GetAgentResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.GetAgentResponse) + GOOGLE_DCHECK_NE(&from, this); + const GetAgentResponse* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.GetAgentResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.GetAgentResponse) + MergeFrom(*source); + } +} + +void GetAgentResponse::MergeFrom(const GetAgentResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.GetAgentResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_agent()) { + mutable_agent()->::flyteidl::admin::Agent::MergeFrom(from.agent()); + } +} + +void GetAgentResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.GetAgentResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void GetAgentResponse::CopyFrom(const GetAgentResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.GetAgentResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetAgentResponse::IsInitialized() const { + return true; +} + +void GetAgentResponse::Swap(GetAgentResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void GetAgentResponse::InternalSwap(GetAgentResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(agent_, other->agent_); +} + +::google::protobuf::Metadata GetAgentResponse::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto); + return ::file_level_metadata_flyteidl_2fadmin_2fagent_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void ListAgentsRequest::InitAsDefaultInstance() { +} +class ListAgentsRequest::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ListAgentsRequest::ListAgentsRequest() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.admin.ListAgentsRequest) +} +ListAgentsRequest::ListAgentsRequest(const ListAgentsRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:flyteidl.admin.ListAgentsRequest) +} + +void ListAgentsRequest::SharedCtor() { +} + +ListAgentsRequest::~ListAgentsRequest() { + // @@protoc_insertion_point(destructor:flyteidl.admin.ListAgentsRequest) + SharedDtor(); +} + +void ListAgentsRequest::SharedDtor() { +} + +void ListAgentsRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ListAgentsRequest& ListAgentsRequest::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_ListAgentsRequest_flyteidl_2fadmin_2fagent_2eproto.base); + return *internal_default_instance(); +} + + +void ListAgentsRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.admin.ListAgentsRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ListAgentsRequest::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + default: { + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool ListAgentsRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.admin.ListAgentsRequest) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.admin.ListAgentsRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.admin.ListAgentsRequest) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void ListAgentsRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.admin.ListAgentsRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.admin.ListAgentsRequest) +} + +::google::protobuf::uint8* ListAgentsRequest::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.ListAgentsRequest) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.ListAgentsRequest) + return target; +} + +size_t ListAgentsRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.ListAgentsRequest) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ListAgentsRequest::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.ListAgentsRequest) + GOOGLE_DCHECK_NE(&from, this); + const ListAgentsRequest* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.ListAgentsRequest) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.ListAgentsRequest) + MergeFrom(*source); + } +} + +void ListAgentsRequest::MergeFrom(const ListAgentsRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.ListAgentsRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + +} + +void ListAgentsRequest::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.ListAgentsRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ListAgentsRequest::CopyFrom(const ListAgentsRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.ListAgentsRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListAgentsRequest::IsInitialized() const { + return true; +} + +void ListAgentsRequest::Swap(ListAgentsRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void ListAgentsRequest::InternalSwap(ListAgentsRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); +} + +::google::protobuf::Metadata ListAgentsRequest::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto); + return ::file_level_metadata_flyteidl_2fadmin_2fagent_2eproto[kIndexInFileMessages]; +} + + +// =================================================================== + +void ListAgentsResponse::InitAsDefaultInstance() { +} +class ListAgentsResponse::HasBitSetters { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ListAgentsResponse::kAgentsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ListAgentsResponse::ListAgentsResponse() + : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:flyteidl.admin.ListAgentsResponse) +} +ListAgentsResponse::ListAgentsResponse(const ListAgentsResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(nullptr), + agents_(from.agents_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:flyteidl.admin.ListAgentsResponse) +} + +void ListAgentsResponse::SharedCtor() { + ::google::protobuf::internal::InitSCC( + &scc_info_ListAgentsResponse_flyteidl_2fadmin_2fagent_2eproto.base); +} + +ListAgentsResponse::~ListAgentsResponse() { + // @@protoc_insertion_point(destructor:flyteidl.admin.ListAgentsResponse) + SharedDtor(); +} + +void ListAgentsResponse::SharedDtor() { +} + +void ListAgentsResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ListAgentsResponse& ListAgentsResponse::default_instance() { + ::google::protobuf::internal::InitSCC(&::scc_info_ListAgentsResponse_flyteidl_2fadmin_2fagent_2eproto.base); + return *internal_default_instance(); +} + + +void ListAgentsResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:flyteidl.admin.ListAgentsResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + agents_.Clear(); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ListAgentsResponse::_InternalParse(const char* begin, const char* end, void* object, + ::google::protobuf::internal::ParseContext* ctx) { + auto msg = static_cast(object); + ::google::protobuf::int32 size; (void)size; + int depth; (void)depth; + ::google::protobuf::uint32 tag; + ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; + auto ptr = begin; + while (ptr < end) { + ptr = ::google::protobuf::io::Parse32(ptr, &tag); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + switch (tag >> 3) { + // repeated .flyteidl.admin.Agent agents = 1; + case 1: { + if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; + do { + ptr = ::google::protobuf::io::ReadSize(ptr, &size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + parser_till_end = ::flyteidl::admin::Agent::_InternalParse; + object = msg->add_agents(); + if (size > end - ptr) goto len_delim_till_end; + ptr += size; + GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( + {parser_till_end, object}, ptr - size, ptr)); + if (ptr >= end) break; + } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); + break; + } + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->EndGroup(tag); + return ptr; + } + auto res = UnknownFieldParse(tag, {_InternalParse, msg}, + ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); + ptr = res.first; + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); + if (res.second) return ptr; + } + } // switch + } // while + return ptr; +len_delim_till_end: + return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, + {parser_till_end, object}, size); +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool ListAgentsResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:flyteidl.admin.ListAgentsResponse) + for (;;) { + ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .flyteidl.admin.Agent agents = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, add_agents())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:flyteidl.admin.ListAgentsResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:flyteidl.admin.ListAgentsResponse) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void ListAgentsResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:flyteidl.admin.ListAgentsResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .flyteidl.admin.Agent agents = 1; + for (unsigned int i = 0, + n = static_cast(this->agents_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, + this->agents(static_cast(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:flyteidl.admin.ListAgentsResponse) +} + +::google::protobuf::uint8* ListAgentsResponse::InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:flyteidl.admin.ListAgentsResponse) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .flyteidl.admin.Agent agents = 1; + for (unsigned int i = 0, + n = static_cast(this->agents_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, this->agents(static_cast(i)), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:flyteidl.admin.ListAgentsResponse) + return target; +} + +size_t ListAgentsResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:flyteidl.admin.ListAgentsResponse) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .flyteidl.admin.Agent agents = 1; + { + unsigned int count = static_cast(this->agents_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->agents(static_cast(i))); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ListAgentsResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:flyteidl.admin.ListAgentsResponse) + GOOGLE_DCHECK_NE(&from, this); + const ListAgentsResponse* source = + ::google::protobuf::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:flyteidl.admin.ListAgentsResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:flyteidl.admin.ListAgentsResponse) + MergeFrom(*source); + } +} + +void ListAgentsResponse::MergeFrom(const ListAgentsResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:flyteidl.admin.ListAgentsResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + agents_.MergeFrom(from.agents_); +} + +void ListAgentsResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:flyteidl.admin.ListAgentsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ListAgentsResponse::CopyFrom(const ListAgentsResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:flyteidl.admin.ListAgentsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListAgentsResponse::IsInitialized() const { + return true; +} + +void ListAgentsResponse::Swap(ListAgentsResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ListAgentsResponse::InternalSwap(ListAgentsResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&agents_)->InternalSwap(CastToBase(&other->agents_)); +} + +::google::protobuf::Metadata ListAgentsResponse::GetMetadata() const { + ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_flyteidl_2fadmin_2fagent_2eproto); + return ::file_level_metadata_flyteidl_2fadmin_2fagent_2eproto[kIndexInFileMessages]; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace admin +} // namespace flyteidl +namespace google { +namespace protobuf { +template<> PROTOBUF_NOINLINE ::flyteidl::admin::TaskExecutionMetadata_LabelsEntry_DoNotUse* Arena::CreateMaybeMessage< ::flyteidl::admin::TaskExecutionMetadata_LabelsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::TaskExecutionMetadata_LabelsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::TaskExecutionMetadata_AnnotationsEntry_DoNotUse* Arena::CreateMaybeMessage< ::flyteidl::admin::TaskExecutionMetadata_AnnotationsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::TaskExecutionMetadata_AnnotationsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::TaskExecutionMetadata_EnvironmentVariablesEntry_DoNotUse* Arena::CreateMaybeMessage< ::flyteidl::admin::TaskExecutionMetadata_EnvironmentVariablesEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::TaskExecutionMetadata_EnvironmentVariablesEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::TaskExecutionMetadata* Arena::CreateMaybeMessage< ::flyteidl::admin::TaskExecutionMetadata >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::TaskExecutionMetadata >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::CreateTaskRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::CreateTaskRequest >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::CreateTaskRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::CreateTaskResponse* Arena::CreateMaybeMessage< ::flyteidl::admin::CreateTaskResponse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::CreateTaskResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::GetTaskRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::GetTaskRequest >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::GetTaskRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::GetTaskResponse* Arena::CreateMaybeMessage< ::flyteidl::admin::GetTaskResponse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::GetTaskResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::Resource* Arena::CreateMaybeMessage< ::flyteidl::admin::Resource >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::Resource >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::DeleteTaskRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::DeleteTaskRequest >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::DeleteTaskRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::DeleteTaskResponse* Arena::CreateMaybeMessage< ::flyteidl::admin::DeleteTaskResponse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::DeleteTaskResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::Agent* Arena::CreateMaybeMessage< ::flyteidl::admin::Agent >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::Agent >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::GetAgentRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::GetAgentRequest >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::GetAgentRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::GetAgentResponse* Arena::CreateMaybeMessage< ::flyteidl::admin::GetAgentResponse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::GetAgentResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::ListAgentsRequest* Arena::CreateMaybeMessage< ::flyteidl::admin::ListAgentsRequest >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::ListAgentsRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::flyteidl::admin::ListAgentsResponse* Arena::CreateMaybeMessage< ::flyteidl::admin::ListAgentsResponse >(Arena* arena) { + return Arena::CreateInternal< ::flyteidl::admin::ListAgentsResponse >(arena); } } // namespace protobuf } // namespace google diff --git a/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.h b/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.h index 6c44bf09f8..86aeccc4b2 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.h +++ b/flyteidl/gen/pb-cpp/flyteidl/admin/agent.pb.h @@ -50,7 +50,7 @@ struct TableStruct_flyteidl_2fadmin_2fagent_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::google::protobuf::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[11] + static const ::google::protobuf::internal::ParseTable schema[16] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::google::protobuf::internal::FieldMetadata field_metadata[]; static const ::google::protobuf::internal::SerializationTable serialization_table[]; @@ -59,6 +59,9 @@ struct TableStruct_flyteidl_2fadmin_2fagent_2eproto { void AddDescriptors_flyteidl_2fadmin_2fagent_2eproto(); namespace flyteidl { namespace admin { +class Agent; +class AgentDefaultTypeInternal; +extern AgentDefaultTypeInternal _Agent_default_instance_; class CreateTaskRequest; class CreateTaskRequestDefaultTypeInternal; extern CreateTaskRequestDefaultTypeInternal _CreateTaskRequest_default_instance_; @@ -71,12 +74,24 @@ extern DeleteTaskRequestDefaultTypeInternal _DeleteTaskRequest_default_instance_ class DeleteTaskResponse; class DeleteTaskResponseDefaultTypeInternal; extern DeleteTaskResponseDefaultTypeInternal _DeleteTaskResponse_default_instance_; +class GetAgentRequest; +class GetAgentRequestDefaultTypeInternal; +extern GetAgentRequestDefaultTypeInternal _GetAgentRequest_default_instance_; +class GetAgentResponse; +class GetAgentResponseDefaultTypeInternal; +extern GetAgentResponseDefaultTypeInternal _GetAgentResponse_default_instance_; class GetTaskRequest; class GetTaskRequestDefaultTypeInternal; extern GetTaskRequestDefaultTypeInternal _GetTaskRequest_default_instance_; class GetTaskResponse; class GetTaskResponseDefaultTypeInternal; extern GetTaskResponseDefaultTypeInternal _GetTaskResponse_default_instance_; +class ListAgentsRequest; +class ListAgentsRequestDefaultTypeInternal; +extern ListAgentsRequestDefaultTypeInternal _ListAgentsRequest_default_instance_; +class ListAgentsResponse; +class ListAgentsResponseDefaultTypeInternal; +extern ListAgentsResponseDefaultTypeInternal _ListAgentsResponse_default_instance_; class Resource; class ResourceDefaultTypeInternal; extern ResourceDefaultTypeInternal _Resource_default_instance_; @@ -96,12 +111,17 @@ extern TaskExecutionMetadata_LabelsEntry_DoNotUseDefaultTypeInternal _TaskExecut } // namespace flyteidl namespace google { namespace protobuf { +template<> ::flyteidl::admin::Agent* Arena::CreateMaybeMessage<::flyteidl::admin::Agent>(Arena*); template<> ::flyteidl::admin::CreateTaskRequest* Arena::CreateMaybeMessage<::flyteidl::admin::CreateTaskRequest>(Arena*); template<> ::flyteidl::admin::CreateTaskResponse* Arena::CreateMaybeMessage<::flyteidl::admin::CreateTaskResponse>(Arena*); template<> ::flyteidl::admin::DeleteTaskRequest* Arena::CreateMaybeMessage<::flyteidl::admin::DeleteTaskRequest>(Arena*); template<> ::flyteidl::admin::DeleteTaskResponse* Arena::CreateMaybeMessage<::flyteidl::admin::DeleteTaskResponse>(Arena*); +template<> ::flyteidl::admin::GetAgentRequest* Arena::CreateMaybeMessage<::flyteidl::admin::GetAgentRequest>(Arena*); +template<> ::flyteidl::admin::GetAgentResponse* Arena::CreateMaybeMessage<::flyteidl::admin::GetAgentResponse>(Arena*); template<> ::flyteidl::admin::GetTaskRequest* Arena::CreateMaybeMessage<::flyteidl::admin::GetTaskRequest>(Arena*); template<> ::flyteidl::admin::GetTaskResponse* Arena::CreateMaybeMessage<::flyteidl::admin::GetTaskResponse>(Arena*); +template<> ::flyteidl::admin::ListAgentsRequest* Arena::CreateMaybeMessage<::flyteidl::admin::ListAgentsRequest>(Arena*); +template<> ::flyteidl::admin::ListAgentsResponse* Arena::CreateMaybeMessage<::flyteidl::admin::ListAgentsResponse>(Arena*); template<> ::flyteidl::admin::Resource* Arena::CreateMaybeMessage<::flyteidl::admin::Resource>(Arena*); template<> ::flyteidl::admin::TaskExecutionMetadata* Arena::CreateMaybeMessage<::flyteidl::admin::TaskExecutionMetadata>(Arena*); template<> ::flyteidl::admin::TaskExecutionMetadata_AnnotationsEntry_DoNotUse* Arena::CreateMaybeMessage<::flyteidl::admin::TaskExecutionMetadata_AnnotationsEntry_DoNotUse>(Arena*); @@ -583,6 +603,12 @@ class CreateTaskResponse final : } static const CreateTaskResponse& default_instance(); + enum ResCase { + kResourceMeta = 1, + kResource = 2, + RES_NOT_SET = 0, + }; + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const CreateTaskResponse* internal_default_instance() { return reinterpret_cast( @@ -647,6 +673,9 @@ class CreateTaskResponse final : // accessors ------------------------------------------------------- // bytes resource_meta = 1; + private: + bool has_resource_meta() const; + public: void clear_resource_meta(); static const int kResourceMetaFieldNumber = 1; const ::std::string& resource_meta() const; @@ -660,13 +689,35 @@ class CreateTaskResponse final : ::std::string* release_resource_meta(); void set_allocated_resource_meta(::std::string* resource_meta); + // .flyteidl.admin.Resource resource = 2; + bool has_resource() const; + void clear_resource(); + static const int kResourceFieldNumber = 2; + const ::flyteidl::admin::Resource& resource() const; + ::flyteidl::admin::Resource* release_resource(); + ::flyteidl::admin::Resource* mutable_resource(); + void set_allocated_resource(::flyteidl::admin::Resource* resource); + + void clear_res(); + ResCase res_case() const; // @@protoc_insertion_point(class_scope:flyteidl.admin.CreateTaskResponse) private: class HasBitSetters; + void set_has_resource_meta(); + void set_has_resource(); + + inline bool has_res() const; + inline void clear_has_res(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr resource_meta_; + union ResUnion { + ResUnion() {} + ::google::protobuf::internal::ArenaStringPtr resource_meta_; + ::flyteidl::admin::Resource* resource_; + } res_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::uint32 _oneof_case_[1]; + friend struct ::TableStruct_flyteidl_2fadmin_2fagent_2eproto; }; // ------------------------------------------------------------------- @@ -1029,6 +1080,18 @@ class Resource final : // accessors ------------------------------------------------------- + // repeated .flyteidl.core.TaskLog log_links = 4; + int log_links_size() const; + void clear_log_links(); + static const int kLogLinksFieldNumber = 4; + ::flyteidl::core::TaskLog* mutable_log_links(int index); + ::google::protobuf::RepeatedPtrField< ::flyteidl::core::TaskLog >* + mutable_log_links(); + const ::flyteidl::core::TaskLog& log_links(int index) const; + ::flyteidl::core::TaskLog* add_log_links(); + const ::google::protobuf::RepeatedPtrField< ::flyteidl::core::TaskLog >& + log_links() const; + // string message = 3; void clear_message(); static const int kMessageFieldNumber = 3; @@ -1063,6 +1126,7 @@ class Resource final : class HasBitSetters; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::flyteidl::core::TaskLog > log_links_; ::google::protobuf::internal::ArenaStringPtr message_; ::flyteidl::core::LiteralMap* outputs_; int state_; @@ -1111,24 +1175,642 @@ class DeleteTaskRequest final : static constexpr int kIndexInFileMessages = 9; - void Swap(DeleteTaskRequest* other); - friend void swap(DeleteTaskRequest& a, DeleteTaskRequest& b) { + void Swap(DeleteTaskRequest* other); + friend void swap(DeleteTaskRequest& a, DeleteTaskRequest& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline DeleteTaskRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + DeleteTaskRequest* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const DeleteTaskRequest& from); + void MergeFrom(const DeleteTaskRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeleteTaskRequest* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string task_type = 1; + void clear_task_type(); + static const int kTaskTypeFieldNumber = 1; + const ::std::string& task_type() const; + void set_task_type(const ::std::string& value); + #if LANG_CXX11 + void set_task_type(::std::string&& value); + #endif + void set_task_type(const char* value); + void set_task_type(const char* value, size_t size); + ::std::string* mutable_task_type(); + ::std::string* release_task_type(); + void set_allocated_task_type(::std::string* task_type); + + // bytes resource_meta = 2; + void clear_resource_meta(); + static const int kResourceMetaFieldNumber = 2; + const ::std::string& resource_meta() const; + void set_resource_meta(const ::std::string& value); + #if LANG_CXX11 + void set_resource_meta(::std::string&& value); + #endif + void set_resource_meta(const char* value); + void set_resource_meta(const void* value, size_t size); + ::std::string* mutable_resource_meta(); + ::std::string* release_resource_meta(); + void set_allocated_resource_meta(::std::string* resource_meta); + + // @@protoc_insertion_point(class_scope:flyteidl.admin.DeleteTaskRequest) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr task_type_; + ::google::protobuf::internal::ArenaStringPtr resource_meta_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fadmin_2fagent_2eproto; +}; +// ------------------------------------------------------------------- + +class DeleteTaskResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.DeleteTaskResponse) */ { + public: + DeleteTaskResponse(); + virtual ~DeleteTaskResponse(); + + DeleteTaskResponse(const DeleteTaskResponse& from); + + inline DeleteTaskResponse& operator=(const DeleteTaskResponse& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + DeleteTaskResponse(DeleteTaskResponse&& from) noexcept + : DeleteTaskResponse() { + *this = ::std::move(from); + } + + inline DeleteTaskResponse& operator=(DeleteTaskResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const DeleteTaskResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const DeleteTaskResponse* internal_default_instance() { + return reinterpret_cast( + &_DeleteTaskResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + void Swap(DeleteTaskResponse* other); + friend void swap(DeleteTaskResponse& a, DeleteTaskResponse& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline DeleteTaskResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + DeleteTaskResponse* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const DeleteTaskResponse& from); + void MergeFrom(const DeleteTaskResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeleteTaskResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:flyteidl.admin.DeleteTaskResponse) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fadmin_2fagent_2eproto; +}; +// ------------------------------------------------------------------- + +class Agent final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.Agent) */ { + public: + Agent(); + virtual ~Agent(); + + Agent(const Agent& from); + + inline Agent& operator=(const Agent& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + Agent(Agent&& from) noexcept + : Agent() { + *this = ::std::move(from); + } + + inline Agent& operator=(Agent&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const Agent& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Agent* internal_default_instance() { + return reinterpret_cast( + &_Agent_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + void Swap(Agent* other); + friend void swap(Agent& a, Agent& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline Agent* New() const final { + return CreateMaybeMessage(nullptr); + } + + Agent* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const Agent& from); + void MergeFrom(const Agent& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Agent* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated string supported_task_types = 2; + int supported_task_types_size() const; + void clear_supported_task_types(); + static const int kSupportedTaskTypesFieldNumber = 2; + const ::std::string& supported_task_types(int index) const; + ::std::string* mutable_supported_task_types(int index); + void set_supported_task_types(int index, const ::std::string& value); + #if LANG_CXX11 + void set_supported_task_types(int index, ::std::string&& value); + #endif + void set_supported_task_types(int index, const char* value); + void set_supported_task_types(int index, const char* value, size_t size); + ::std::string* add_supported_task_types(); + void add_supported_task_types(const ::std::string& value); + #if LANG_CXX11 + void add_supported_task_types(::std::string&& value); + #endif + void add_supported_task_types(const char* value); + void add_supported_task_types(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField<::std::string>& supported_task_types() const; + ::google::protobuf::RepeatedPtrField<::std::string>* mutable_supported_task_types(); + + // string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // @@protoc_insertion_point(class_scope:flyteidl.admin.Agent) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField<::std::string> supported_task_types_; + ::google::protobuf::internal::ArenaStringPtr name_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fadmin_2fagent_2eproto; +}; +// ------------------------------------------------------------------- + +class GetAgentRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.GetAgentRequest) */ { + public: + GetAgentRequest(); + virtual ~GetAgentRequest(); + + GetAgentRequest(const GetAgentRequest& from); + + inline GetAgentRequest& operator=(const GetAgentRequest& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + GetAgentRequest(GetAgentRequest&& from) noexcept + : GetAgentRequest() { + *this = ::std::move(from); + } + + inline GetAgentRequest& operator=(GetAgentRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const GetAgentRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const GetAgentRequest* internal_default_instance() { + return reinterpret_cast( + &_GetAgentRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + void Swap(GetAgentRequest* other); + friend void swap(GetAgentRequest& a, GetAgentRequest& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline GetAgentRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + GetAgentRequest* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const GetAgentRequest& from); + void MergeFrom(const GetAgentRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetAgentRequest* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // @@protoc_insertion_point(class_scope:flyteidl.admin.GetAgentRequest) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr name_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fadmin_2fagent_2eproto; +}; +// ------------------------------------------------------------------- + +class GetAgentResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.GetAgentResponse) */ { + public: + GetAgentResponse(); + virtual ~GetAgentResponse(); + + GetAgentResponse(const GetAgentResponse& from); + + inline GetAgentResponse& operator=(const GetAgentResponse& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + GetAgentResponse(GetAgentResponse&& from) noexcept + : GetAgentResponse() { + *this = ::std::move(from); + } + + inline GetAgentResponse& operator=(GetAgentResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const GetAgentResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const GetAgentResponse* internal_default_instance() { + return reinterpret_cast( + &_GetAgentResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + void Swap(GetAgentResponse* other); + friend void swap(GetAgentResponse& a, GetAgentResponse& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline GetAgentResponse* New() const final { + return CreateMaybeMessage(nullptr); + } + + GetAgentResponse* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::google::protobuf::Message& from) final; + void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const GetAgentResponse& from); + void MergeFrom(const GetAgentResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); + ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } + #else + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const final; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GetAgentResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // .flyteidl.admin.Agent agent = 1; + bool has_agent() const; + void clear_agent(); + static const int kAgentFieldNumber = 1; + const ::flyteidl::admin::Agent& agent() const; + ::flyteidl::admin::Agent* release_agent(); + ::flyteidl::admin::Agent* mutable_agent(); + void set_allocated_agent(::flyteidl::admin::Agent* agent); + + // @@protoc_insertion_point(class_scope:flyteidl.admin.GetAgentResponse) + private: + class HasBitSetters; + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::flyteidl::admin::Agent* agent_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + friend struct ::TableStruct_flyteidl_2fadmin_2fagent_2eproto; +}; +// ------------------------------------------------------------------- + +class ListAgentsRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.ListAgentsRequest) */ { + public: + ListAgentsRequest(); + virtual ~ListAgentsRequest(); + + ListAgentsRequest(const ListAgentsRequest& from); + + inline ListAgentsRequest& operator=(const ListAgentsRequest& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ListAgentsRequest(ListAgentsRequest&& from) noexcept + : ListAgentsRequest() { + *this = ::std::move(from); + } + + inline ListAgentsRequest& operator=(ListAgentsRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor() { + return default_instance().GetDescriptor(); + } + static const ListAgentsRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ListAgentsRequest* internal_default_instance() { + return reinterpret_cast( + &_ListAgentsRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + void Swap(ListAgentsRequest* other); + friend void swap(ListAgentsRequest& a, ListAgentsRequest& b) { a.Swap(&b); } // implements Message ---------------------------------------------- - inline DeleteTaskRequest* New() const final { - return CreateMaybeMessage(nullptr); + inline ListAgentsRequest* New() const final { + return CreateMaybeMessage(nullptr); } - DeleteTaskRequest* New(::google::protobuf::Arena* arena) const final { - return CreateMaybeMessage(arena); + ListAgentsRequest* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; - void CopyFrom(const DeleteTaskRequest& from); - void MergeFrom(const DeleteTaskRequest& from); + void CopyFrom(const ListAgentsRequest& from); + void MergeFrom(const ListAgentsRequest& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1150,7 +1832,7 @@ class DeleteTaskRequest final : void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(DeleteTaskRequest* other); + void InternalSwap(ListAgentsRequest* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return nullptr; @@ -1166,65 +1848,35 @@ class DeleteTaskRequest final : // accessors ------------------------------------------------------- - // string task_type = 1; - void clear_task_type(); - static const int kTaskTypeFieldNumber = 1; - const ::std::string& task_type() const; - void set_task_type(const ::std::string& value); - #if LANG_CXX11 - void set_task_type(::std::string&& value); - #endif - void set_task_type(const char* value); - void set_task_type(const char* value, size_t size); - ::std::string* mutable_task_type(); - ::std::string* release_task_type(); - void set_allocated_task_type(::std::string* task_type); - - // bytes resource_meta = 2; - void clear_resource_meta(); - static const int kResourceMetaFieldNumber = 2; - const ::std::string& resource_meta() const; - void set_resource_meta(const ::std::string& value); - #if LANG_CXX11 - void set_resource_meta(::std::string&& value); - #endif - void set_resource_meta(const char* value); - void set_resource_meta(const void* value, size_t size); - ::std::string* mutable_resource_meta(); - ::std::string* release_resource_meta(); - void set_allocated_resource_meta(::std::string* resource_meta); - - // @@protoc_insertion_point(class_scope:flyteidl.admin.DeleteTaskRequest) + // @@protoc_insertion_point(class_scope:flyteidl.admin.ListAgentsRequest) private: class HasBitSetters; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr task_type_; - ::google::protobuf::internal::ArenaStringPtr resource_meta_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_flyteidl_2fadmin_2fagent_2eproto; }; // ------------------------------------------------------------------- -class DeleteTaskResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.DeleteTaskResponse) */ { +class ListAgentsResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:flyteidl.admin.ListAgentsResponse) */ { public: - DeleteTaskResponse(); - virtual ~DeleteTaskResponse(); + ListAgentsResponse(); + virtual ~ListAgentsResponse(); - DeleteTaskResponse(const DeleteTaskResponse& from); + ListAgentsResponse(const ListAgentsResponse& from); - inline DeleteTaskResponse& operator=(const DeleteTaskResponse& from) { + inline ListAgentsResponse& operator=(const ListAgentsResponse& from) { CopyFrom(from); return *this; } #if LANG_CXX11 - DeleteTaskResponse(DeleteTaskResponse&& from) noexcept - : DeleteTaskResponse() { + ListAgentsResponse(ListAgentsResponse&& from) noexcept + : ListAgentsResponse() { *this = ::std::move(from); } - inline DeleteTaskResponse& operator=(DeleteTaskResponse&& from) noexcept { + inline ListAgentsResponse& operator=(ListAgentsResponse&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { @@ -1236,34 +1888,34 @@ class DeleteTaskResponse final : static const ::google::protobuf::Descriptor* descriptor() { return default_instance().GetDescriptor(); } - static const DeleteTaskResponse& default_instance(); + static const ListAgentsResponse& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const DeleteTaskResponse* internal_default_instance() { - return reinterpret_cast( - &_DeleteTaskResponse_default_instance_); + static inline const ListAgentsResponse* internal_default_instance() { + return reinterpret_cast( + &_ListAgentsResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 15; - void Swap(DeleteTaskResponse* other); - friend void swap(DeleteTaskResponse& a, DeleteTaskResponse& b) { + void Swap(ListAgentsResponse* other); + friend void swap(ListAgentsResponse& a, ListAgentsResponse& b) { a.Swap(&b); } // implements Message ---------------------------------------------- - inline DeleteTaskResponse* New() const final { - return CreateMaybeMessage(nullptr); + inline ListAgentsResponse* New() const final { + return CreateMaybeMessage(nullptr); } - DeleteTaskResponse* New(::google::protobuf::Arena* arena) const final { - return CreateMaybeMessage(arena); + ListAgentsResponse* New(::google::protobuf::Arena* arena) const final { + return CreateMaybeMessage(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; - void CopyFrom(const DeleteTaskResponse& from); - void MergeFrom(const DeleteTaskResponse& from); + void CopyFrom(const ListAgentsResponse& from); + void MergeFrom(const ListAgentsResponse& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1285,7 +1937,7 @@ class DeleteTaskResponse final : void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(DeleteTaskResponse* other); + void InternalSwap(ListAgentsResponse* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return nullptr; @@ -1301,11 +1953,24 @@ class DeleteTaskResponse final : // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:flyteidl.admin.DeleteTaskResponse) + // repeated .flyteidl.admin.Agent agents = 1; + int agents_size() const; + void clear_agents(); + static const int kAgentsFieldNumber = 1; + ::flyteidl::admin::Agent* mutable_agents(int index); + ::google::protobuf::RepeatedPtrField< ::flyteidl::admin::Agent >* + mutable_agents(); + const ::flyteidl::admin::Agent& agents(int index) const; + ::flyteidl::admin::Agent* add_agents(); + const ::google::protobuf::RepeatedPtrField< ::flyteidl::admin::Agent >& + agents() const; + + // @@protoc_insertion_point(class_scope:flyteidl.admin.ListAgentsResponse) private: class HasBitSetters; ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::RepeatedPtrField< ::flyteidl::admin::Agent > agents_; mutable ::google::protobuf::internal::CachedSize _cached_size_; friend struct ::TableStruct_flyteidl_2fadmin_2fagent_2eproto; }; @@ -1734,58 +2399,147 @@ inline void CreateTaskRequest::set_allocated_task_execution_metadata(::flyteidl: // CreateTaskResponse // bytes resource_meta = 1; +inline bool CreateTaskResponse::has_resource_meta() const { + return res_case() == kResourceMeta; +} +inline void CreateTaskResponse::set_has_resource_meta() { + _oneof_case_[0] = kResourceMeta; +} inline void CreateTaskResponse::clear_resource_meta() { - resource_meta_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_resource_meta()) { + res_.resource_meta_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_res(); + } } inline const ::std::string& CreateTaskResponse::resource_meta() const { // @@protoc_insertion_point(field_get:flyteidl.admin.CreateTaskResponse.resource_meta) - return resource_meta_.GetNoArena(); + if (has_resource_meta()) { + return res_.resource_meta_.GetNoArena(); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void CreateTaskResponse::set_resource_meta(const ::std::string& value) { - - resource_meta_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.admin.CreateTaskResponse.resource_meta) + if (!has_resource_meta()) { + clear_res(); + set_has_resource_meta(); + res_.resource_meta_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + res_.resource_meta_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:flyteidl.admin.CreateTaskResponse.resource_meta) } #if LANG_CXX11 inline void CreateTaskResponse::set_resource_meta(::std::string&& value) { - - resource_meta_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set:flyteidl.admin.CreateTaskResponse.resource_meta) + if (!has_resource_meta()) { + clear_res(); + set_has_resource_meta(); + res_.resource_meta_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + res_.resource_meta_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:flyteidl.admin.CreateTaskResponse.resource_meta) } #endif inline void CreateTaskResponse::set_resource_meta(const char* value) { GOOGLE_DCHECK(value != nullptr); - - resource_meta_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + if (!has_resource_meta()) { + clear_res(); + set_has_resource_meta(); + res_.resource_meta_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + res_.resource_meta_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); // @@protoc_insertion_point(field_set_char:flyteidl.admin.CreateTaskResponse.resource_meta) } inline void CreateTaskResponse::set_resource_meta(const void* value, size_t size) { - - resource_meta_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); + if (!has_resource_meta()) { + clear_res(); + set_has_resource_meta(); + res_.resource_meta_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + res_.resource_meta_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:flyteidl.admin.CreateTaskResponse.resource_meta) } inline ::std::string* CreateTaskResponse::mutable_resource_meta() { - + if (!has_resource_meta()) { + clear_res(); + set_has_resource_meta(); + res_.resource_meta_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } // @@protoc_insertion_point(field_mutable:flyteidl.admin.CreateTaskResponse.resource_meta) - return resource_meta_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return res_.resource_meta_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* CreateTaskResponse::release_resource_meta() { // @@protoc_insertion_point(field_release:flyteidl.admin.CreateTaskResponse.resource_meta) - - return resource_meta_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_resource_meta()) { + clear_has_res(); + return res_.resource_meta_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return nullptr; + } } inline void CreateTaskResponse::set_allocated_resource_meta(::std::string* resource_meta) { + if (has_res()) { + clear_res(); + } if (resource_meta != nullptr) { - - } else { - + set_has_resource_meta(); + res_.resource_meta_.UnsafeSetDefault(resource_meta); } - resource_meta_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), resource_meta); // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.CreateTaskResponse.resource_meta) } +// .flyteidl.admin.Resource resource = 2; +inline bool CreateTaskResponse::has_resource() const { + return res_case() == kResource; +} +inline void CreateTaskResponse::set_has_resource() { + _oneof_case_[0] = kResource; +} +inline void CreateTaskResponse::clear_resource() { + if (has_resource()) { + delete res_.resource_; + clear_has_res(); + } +} +inline ::flyteidl::admin::Resource* CreateTaskResponse::release_resource() { + // @@protoc_insertion_point(field_release:flyteidl.admin.CreateTaskResponse.resource) + if (has_resource()) { + clear_has_res(); + ::flyteidl::admin::Resource* temp = res_.resource_; + res_.resource_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::flyteidl::admin::Resource& CreateTaskResponse::resource() const { + // @@protoc_insertion_point(field_get:flyteidl.admin.CreateTaskResponse.resource) + return has_resource() + ? *res_.resource_ + : *reinterpret_cast< ::flyteidl::admin::Resource*>(&::flyteidl::admin::_Resource_default_instance_); +} +inline ::flyteidl::admin::Resource* CreateTaskResponse::mutable_resource() { + if (!has_resource()) { + clear_res(); + set_has_resource(); + res_.resource_ = CreateMaybeMessage< ::flyteidl::admin::Resource >( + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(field_mutable:flyteidl.admin.CreateTaskResponse.resource) + return res_.resource_; +} + +inline bool CreateTaskResponse::has_res() const { + return res_case() != RES_NOT_SET; +} +inline void CreateTaskResponse::clear_has_res() { + _oneof_case_[0] = RES_NOT_SET; +} +inline CreateTaskResponse::ResCase CreateTaskResponse::res_case() const { + return CreateTaskResponse::ResCase(_oneof_case_[0]); +} // ------------------------------------------------------------------- // GetTaskRequest @@ -2094,6 +2848,33 @@ inline void Resource::set_allocated_message(::std::string* message) { // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.Resource.message) } +// repeated .flyteidl.core.TaskLog log_links = 4; +inline int Resource::log_links_size() const { + return log_links_.size(); +} +inline ::flyteidl::core::TaskLog* Resource::mutable_log_links(int index) { + // @@protoc_insertion_point(field_mutable:flyteidl.admin.Resource.log_links) + return log_links_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::flyteidl::core::TaskLog >* +Resource::mutable_log_links() { + // @@protoc_insertion_point(field_mutable_list:flyteidl.admin.Resource.log_links) + return &log_links_; +} +inline const ::flyteidl::core::TaskLog& Resource::log_links(int index) const { + // @@protoc_insertion_point(field_get:flyteidl.admin.Resource.log_links) + return log_links_.Get(index); +} +inline ::flyteidl::core::TaskLog* Resource::add_log_links() { + // @@protoc_insertion_point(field_add:flyteidl.admin.Resource.log_links) + return log_links_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::flyteidl::core::TaskLog >& +Resource::log_links() const { + // @@protoc_insertion_point(field_list:flyteidl.admin.Resource.log_links) + return log_links_; +} + // ------------------------------------------------------------------- // DeleteTaskRequest @@ -2208,6 +2989,282 @@ inline void DeleteTaskRequest::set_allocated_resource_meta(::std::string* resour // DeleteTaskResponse +// ------------------------------------------------------------------- + +// Agent + +// string name = 1; +inline void Agent::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Agent::name() const { + // @@protoc_insertion_point(field_get:flyteidl.admin.Agent.name) + return name_.GetNoArena(); +} +inline void Agent::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.admin.Agent.name) +} +#if LANG_CXX11 +inline void Agent::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.admin.Agent.name) +} +#endif +inline void Agent::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.admin.Agent.name) +} +inline void Agent::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.admin.Agent.name) +} +inline ::std::string* Agent::mutable_name() { + + // @@protoc_insertion_point(field_mutable:flyteidl.admin.Agent.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Agent::release_name() { + // @@protoc_insertion_point(field_release:flyteidl.admin.Agent.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Agent::set_allocated_name(::std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.Agent.name) +} + +// repeated string supported_task_types = 2; +inline int Agent::supported_task_types_size() const { + return supported_task_types_.size(); +} +inline void Agent::clear_supported_task_types() { + supported_task_types_.Clear(); +} +inline const ::std::string& Agent::supported_task_types(int index) const { + // @@protoc_insertion_point(field_get:flyteidl.admin.Agent.supported_task_types) + return supported_task_types_.Get(index); +} +inline ::std::string* Agent::mutable_supported_task_types(int index) { + // @@protoc_insertion_point(field_mutable:flyteidl.admin.Agent.supported_task_types) + return supported_task_types_.Mutable(index); +} +inline void Agent::set_supported_task_types(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:flyteidl.admin.Agent.supported_task_types) + supported_task_types_.Mutable(index)->assign(value); +} +#if LANG_CXX11 +inline void Agent::set_supported_task_types(int index, ::std::string&& value) { + // @@protoc_insertion_point(field_set:flyteidl.admin.Agent.supported_task_types) + supported_task_types_.Mutable(index)->assign(std::move(value)); +} +#endif +inline void Agent::set_supported_task_types(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + supported_task_types_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:flyteidl.admin.Agent.supported_task_types) +} +inline void Agent::set_supported_task_types(int index, const char* value, size_t size) { + supported_task_types_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:flyteidl.admin.Agent.supported_task_types) +} +inline ::std::string* Agent::add_supported_task_types() { + // @@protoc_insertion_point(field_add_mutable:flyteidl.admin.Agent.supported_task_types) + return supported_task_types_.Add(); +} +inline void Agent::add_supported_task_types(const ::std::string& value) { + supported_task_types_.Add()->assign(value); + // @@protoc_insertion_point(field_add:flyteidl.admin.Agent.supported_task_types) +} +#if LANG_CXX11 +inline void Agent::add_supported_task_types(::std::string&& value) { + supported_task_types_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:flyteidl.admin.Agent.supported_task_types) +} +#endif +inline void Agent::add_supported_task_types(const char* value) { + GOOGLE_DCHECK(value != nullptr); + supported_task_types_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:flyteidl.admin.Agent.supported_task_types) +} +inline void Agent::add_supported_task_types(const char* value, size_t size) { + supported_task_types_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:flyteidl.admin.Agent.supported_task_types) +} +inline const ::google::protobuf::RepeatedPtrField<::std::string>& +Agent::supported_task_types() const { + // @@protoc_insertion_point(field_list:flyteidl.admin.Agent.supported_task_types) + return supported_task_types_; +} +inline ::google::protobuf::RepeatedPtrField<::std::string>* +Agent::mutable_supported_task_types() { + // @@protoc_insertion_point(field_mutable_list:flyteidl.admin.Agent.supported_task_types) + return &supported_task_types_; +} + +// ------------------------------------------------------------------- + +// GetAgentRequest + +// string name = 1; +inline void GetAgentRequest::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& GetAgentRequest::name() const { + // @@protoc_insertion_point(field_get:flyteidl.admin.GetAgentRequest.name) + return name_.GetNoArena(); +} +inline void GetAgentRequest::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:flyteidl.admin.GetAgentRequest.name) +} +#if LANG_CXX11 +inline void GetAgentRequest::set_name(::std::string&& value) { + + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:flyteidl.admin.GetAgentRequest.name) +} +#endif +inline void GetAgentRequest::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:flyteidl.admin.GetAgentRequest.name) +} +inline void GetAgentRequest::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:flyteidl.admin.GetAgentRequest.name) +} +inline ::std::string* GetAgentRequest::mutable_name() { + + // @@protoc_insertion_point(field_mutable:flyteidl.admin.GetAgentRequest.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* GetAgentRequest::release_name() { + // @@protoc_insertion_point(field_release:flyteidl.admin.GetAgentRequest.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void GetAgentRequest::set_allocated_name(::std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.GetAgentRequest.name) +} + +// ------------------------------------------------------------------- + +// GetAgentResponse + +// .flyteidl.admin.Agent agent = 1; +inline bool GetAgentResponse::has_agent() const { + return this != internal_default_instance() && agent_ != nullptr; +} +inline void GetAgentResponse::clear_agent() { + if (GetArenaNoVirtual() == nullptr && agent_ != nullptr) { + delete agent_; + } + agent_ = nullptr; +} +inline const ::flyteidl::admin::Agent& GetAgentResponse::agent() const { + const ::flyteidl::admin::Agent* p = agent_; + // @@protoc_insertion_point(field_get:flyteidl.admin.GetAgentResponse.agent) + return p != nullptr ? *p : *reinterpret_cast( + &::flyteidl::admin::_Agent_default_instance_); +} +inline ::flyteidl::admin::Agent* GetAgentResponse::release_agent() { + // @@protoc_insertion_point(field_release:flyteidl.admin.GetAgentResponse.agent) + + ::flyteidl::admin::Agent* temp = agent_; + agent_ = nullptr; + return temp; +} +inline ::flyteidl::admin::Agent* GetAgentResponse::mutable_agent() { + + if (agent_ == nullptr) { + auto* p = CreateMaybeMessage<::flyteidl::admin::Agent>(GetArenaNoVirtual()); + agent_ = p; + } + // @@protoc_insertion_point(field_mutable:flyteidl.admin.GetAgentResponse.agent) + return agent_; +} +inline void GetAgentResponse::set_allocated_agent(::flyteidl::admin::Agent* agent) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete agent_; + } + if (agent) { + ::google::protobuf::Arena* submessage_arena = nullptr; + if (message_arena != submessage_arena) { + agent = ::google::protobuf::internal::GetOwnedMessage( + message_arena, agent, submessage_arena); + } + + } else { + + } + agent_ = agent; + // @@protoc_insertion_point(field_set_allocated:flyteidl.admin.GetAgentResponse.agent) +} + +// ------------------------------------------------------------------- + +// ListAgentsRequest + +// ------------------------------------------------------------------- + +// ListAgentsResponse + +// repeated .flyteidl.admin.Agent agents = 1; +inline int ListAgentsResponse::agents_size() const { + return agents_.size(); +} +inline void ListAgentsResponse::clear_agents() { + agents_.Clear(); +} +inline ::flyteidl::admin::Agent* ListAgentsResponse::mutable_agents(int index) { + // @@protoc_insertion_point(field_mutable:flyteidl.admin.ListAgentsResponse.agents) + return agents_.Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::flyteidl::admin::Agent >* +ListAgentsResponse::mutable_agents() { + // @@protoc_insertion_point(field_mutable_list:flyteidl.admin.ListAgentsResponse.agents) + return &agents_; +} +inline const ::flyteidl::admin::Agent& ListAgentsResponse::agents(int index) const { + // @@protoc_insertion_point(field_get:flyteidl.admin.ListAgentsResponse.agents) + return agents_.Get(index); +} +inline ::flyteidl::admin::Agent* ListAgentsResponse::add_agents() { + // @@protoc_insertion_point(field_add:flyteidl.admin.ListAgentsResponse.agents) + return agents_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::flyteidl::admin::Agent >& +ListAgentsResponse::agents() const { + // @@protoc_insertion_point(field_list:flyteidl.admin.ListAgentsResponse.agents) + return agents_; +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -2231,6 +3288,16 @@ inline void DeleteTaskRequest::set_allocated_resource_meta(::std::string* resour // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/flyteidl/gen/pb-cpp/flyteidl/service/agent.grpc.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/service/agent.grpc.pb.cc index d3505f4ce8..0dd9e3d2d1 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/service/agent.grpc.pb.cc +++ b/flyteidl/gen/pb-cpp/flyteidl/service/agent.grpc.pb.cc @@ -164,6 +164,109 @@ ::grpc::Status AsyncAgentService::Service::DeleteTask(::grpc::ServerContext* con } +static const char* AgentMetadataService_method_names[] = { + "/flyteidl.service.AgentMetadataService/GetAgent", + "/flyteidl.service.AgentMetadataService/ListAgents", +}; + +std::unique_ptr< AgentMetadataService::Stub> AgentMetadataService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< AgentMetadataService::Stub> stub(new AgentMetadataService::Stub(channel)); + return stub; +} + +AgentMetadataService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_GetAgent_(AgentMetadataService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ListAgents_(AgentMetadataService_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status AgentMetadataService::Stub::GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::flyteidl::admin::GetAgentResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_GetAgent_, context, request, response); +} + +void AgentMetadataService::Stub::experimental_async::GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetAgent_, context, request, response, std::move(f)); +} + +void AgentMetadataService::Stub::experimental_async::GetAgent(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::GetAgentResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_GetAgent_, context, request, response, std::move(f)); +} + +void AgentMetadataService::Stub::experimental_async::GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetAgent_, context, request, response, reactor); +} + +void AgentMetadataService::Stub::experimental_async::GetAgent(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::GetAgentResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_GetAgent_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::flyteidl::admin::GetAgentResponse>* AgentMetadataService::Stub::AsyncGetAgentRaw(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::flyteidl::admin::GetAgentResponse>::Create(channel_.get(), cq, rpcmethod_GetAgent_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::flyteidl::admin::GetAgentResponse>* AgentMetadataService::Stub::PrepareAsyncGetAgentRaw(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::flyteidl::admin::GetAgentResponse>::Create(channel_.get(), cq, rpcmethod_GetAgent_, context, request, false); +} + +::grpc::Status AgentMetadataService::Stub::ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::flyteidl::admin::ListAgentsResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ListAgents_, context, request, response); +} + +void AgentMetadataService::Stub::experimental_async::ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ListAgents_, context, request, response, std::move(f)); +} + +void AgentMetadataService::Stub::experimental_async::ListAgents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::ListAgentsResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_ListAgents_, context, request, response, std::move(f)); +} + +void AgentMetadataService::Stub::experimental_async::ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ListAgents_, context, request, response, reactor); +} + +void AgentMetadataService::Stub::experimental_async::ListAgents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::ListAgentsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_ListAgents_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::flyteidl::admin::ListAgentsResponse>* AgentMetadataService::Stub::AsyncListAgentsRaw(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::flyteidl::admin::ListAgentsResponse>::Create(channel_.get(), cq, rpcmethod_ListAgents_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::flyteidl::admin::ListAgentsResponse>* AgentMetadataService::Stub::PrepareAsyncListAgentsRaw(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::flyteidl::admin::ListAgentsResponse>::Create(channel_.get(), cq, rpcmethod_ListAgents_, context, request, false); +} + +AgentMetadataService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + AgentMetadataService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AgentMetadataService::Service, ::flyteidl::admin::GetAgentRequest, ::flyteidl::admin::GetAgentResponse>( + std::mem_fn(&AgentMetadataService::Service::GetAgent), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AgentMetadataService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< AgentMetadataService::Service, ::flyteidl::admin::ListAgentsRequest, ::flyteidl::admin::ListAgentsResponse>( + std::mem_fn(&AgentMetadataService::Service::ListAgents), this))); +} + +AgentMetadataService::Service::~Service() { +} + +::grpc::Status AgentMetadataService::Service::GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status AgentMetadataService::Service::ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + } // namespace flyteidl } // namespace service diff --git a/flyteidl/gen/pb-cpp/flyteidl/service/agent.grpc.pb.h b/flyteidl/gen/pb-cpp/flyteidl/service/agent.grpc.pb.h index 16b36b249a..e1cb5da223 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/service/agent.grpc.pb.h +++ b/flyteidl/gen/pb-cpp/flyteidl/service/agent.grpc.pb.h @@ -40,7 +40,7 @@ class ServerContext; namespace flyteidl { namespace service { -// AgentService defines an RPC Service that allows propeller to send the request to the agent server. +// AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. class AsyncAgentService final { public: static constexpr char const* service_full_name() { @@ -580,6 +580,383 @@ class AsyncAgentService final { typedef WithStreamedUnaryMethod_CreateTask > > StreamedService; }; +// AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. +// This service allows propeller or users to get the metadata of agents. +class AgentMetadataService final { + public: + static constexpr char const* service_full_name() { + return "flyteidl.service.AgentMetadataService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // Fetch a :ref:`ref_flyteidl.admin.Agent` definition. + virtual ::grpc::Status GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::flyteidl::admin::GetAgentResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::GetAgentResponse>> AsyncGetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::GetAgentResponse>>(AsyncGetAgentRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::GetAgentResponse>> PrepareAsyncGetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::GetAgentResponse>>(PrepareAsyncGetAgentRaw(context, request, cq)); + } + // Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. + virtual ::grpc::Status ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::flyteidl::admin::ListAgentsResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::ListAgentsResponse>> AsyncListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::ListAgentsResponse>>(AsyncListAgentsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::ListAgentsResponse>> PrepareAsyncListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::ListAgentsResponse>>(PrepareAsyncListAgentsRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // Fetch a :ref:`ref_flyteidl.admin.Agent` definition. + virtual void GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response, std::function) = 0; + virtual void GetAgent(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::GetAgentResponse* response, std::function) = 0; + virtual void GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void GetAgent(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::GetAgentResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + // Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. + virtual void ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response, std::function) = 0; + virtual void ListAgents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::ListAgentsResponse* response, std::function) = 0; + virtual void ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void ListAgents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::ListAgentsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + }; + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::GetAgentResponse>* AsyncGetAgentRaw(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::GetAgentResponse>* PrepareAsyncGetAgentRaw(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::ListAgentsResponse>* AsyncListAgentsRaw(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::flyteidl::admin::ListAgentsResponse>* PrepareAsyncListAgentsRaw(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::flyteidl::admin::GetAgentResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::GetAgentResponse>> AsyncGetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::GetAgentResponse>>(AsyncGetAgentRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::GetAgentResponse>> PrepareAsyncGetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::GetAgentResponse>>(PrepareAsyncGetAgentRaw(context, request, cq)); + } + ::grpc::Status ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::flyteidl::admin::ListAgentsResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::ListAgentsResponse>> AsyncListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::ListAgentsResponse>>(AsyncListAgentsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::ListAgentsResponse>> PrepareAsyncListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::ListAgentsResponse>>(PrepareAsyncListAgentsRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + void GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response, std::function) override; + void GetAgent(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::GetAgentResponse* response, std::function) override; + void GetAgent(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void GetAgent(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::GetAgentResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response, std::function) override; + void ListAgents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::ListAgentsResponse* response, std::function) override; + void ListAgents(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void ListAgents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::flyteidl::admin::ListAgentsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::GetAgentResponse>* AsyncGetAgentRaw(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::GetAgentResponse>* PrepareAsyncGetAgentRaw(::grpc::ClientContext* context, const ::flyteidl::admin::GetAgentRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::ListAgentsResponse>* AsyncListAgentsRaw(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::flyteidl::admin::ListAgentsResponse>* PrepareAsyncListAgentsRaw(::grpc::ClientContext* context, const ::flyteidl::admin::ListAgentsRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_GetAgent_; + const ::grpc::internal::RpcMethod rpcmethod_ListAgents_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // Fetch a :ref:`ref_flyteidl.admin.Agent` definition. + virtual ::grpc::Status GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response); + // Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. + virtual ::grpc::Status ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response); + }; + template + class WithAsyncMethod_GetAgent : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_GetAgent() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_GetAgent() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetAgent(::grpc::ServerContext* context, ::flyteidl::admin::GetAgentRequest* request, ::grpc::ServerAsyncResponseWriter< ::flyteidl::admin::GetAgentResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_ListAgents : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_ListAgents() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_ListAgents() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListAgents(::grpc::ServerContext* context, ::flyteidl::admin::ListAgentsRequest* request, ::grpc::ServerAsyncResponseWriter< ::flyteidl::admin::ListAgentsResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_GetAgent > AsyncService; + template + class ExperimentalWithCallbackMethod_GetAgent : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_GetAgent() { + ::grpc::Service::experimental().MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::flyteidl::admin::GetAgentRequest, ::flyteidl::admin::GetAgentResponse>( + [this](::grpc::ServerContext* context, + const ::flyteidl::admin::GetAgentRequest* request, + ::flyteidl::admin::GetAgentResponse* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->GetAgent(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_GetAgent( + ::grpc::experimental::MessageAllocator< ::flyteidl::admin::GetAgentRequest, ::flyteidl::admin::GetAgentResponse>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::flyteidl::admin::GetAgentRequest, ::flyteidl::admin::GetAgentResponse>*>( + ::grpc::Service::experimental().GetHandler(0)) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_GetAgent() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithCallbackMethod_ListAgents : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_ListAgents() { + ::grpc::Service::experimental().MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::flyteidl::admin::ListAgentsRequest, ::flyteidl::admin::ListAgentsResponse>( + [this](::grpc::ServerContext* context, + const ::flyteidl::admin::ListAgentsRequest* request, + ::flyteidl::admin::ListAgentsResponse* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->ListAgents(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_ListAgents( + ::grpc::experimental::MessageAllocator< ::flyteidl::admin::ListAgentsRequest, ::flyteidl::admin::ListAgentsResponse>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::flyteidl::admin::ListAgentsRequest, ::flyteidl::admin::ListAgentsResponse>*>( + ::grpc::Service::experimental().GetHandler(1)) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_ListAgents() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + typedef ExperimentalWithCallbackMethod_GetAgent > ExperimentalCallbackService; + template + class WithGenericMethod_GetAgent : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_GetAgent() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_GetAgent() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_ListAgents : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_ListAgents() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_ListAgents() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_GetAgent : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_GetAgent() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_GetAgent() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetAgent(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_ListAgents : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_ListAgents() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_ListAgents() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListAgents(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class ExperimentalWithRawCallbackMethod_GetAgent : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_GetAgent() { + ::grpc::Service::experimental().MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->GetAgent(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_GetAgent() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void GetAgent(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class ExperimentalWithRawCallbackMethod_ListAgents : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_ListAgents() { + ::grpc::Service::experimental().MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->ListAgents(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_ListAgents() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void ListAgents(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template + class WithStreamedUnaryMethod_GetAgent : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_GetAgent() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< ::flyteidl::admin::GetAgentRequest, ::flyteidl::admin::GetAgentResponse>(std::bind(&WithStreamedUnaryMethod_GetAgent::StreamedGetAgent, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_GetAgent() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetAgent(::grpc::ServerContext* context, const ::flyteidl::admin::GetAgentRequest* request, ::flyteidl::admin::GetAgentResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetAgent(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::flyteidl::admin::GetAgentRequest,::flyteidl::admin::GetAgentResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_ListAgents : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_ListAgents() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< ::flyteidl::admin::ListAgentsRequest, ::flyteidl::admin::ListAgentsResponse>(std::bind(&WithStreamedUnaryMethod_ListAgents::StreamedListAgents, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_ListAgents() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ListAgents(::grpc::ServerContext* context, const ::flyteidl::admin::ListAgentsRequest* request, ::flyteidl::admin::ListAgentsResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedListAgents(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::flyteidl::admin::ListAgentsRequest,::flyteidl::admin::ListAgentsResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetAgent > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_GetAgent > StreamedService; +}; + } // namespace service } // namespace flyteidl diff --git a/flyteidl/gen/pb-cpp/flyteidl/service/agent.pb.cc b/flyteidl/gen/pb-cpp/flyteidl/service/agent.pb.cc index 4963d13cc8..4b7c5d0557 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/service/agent.pb.cc +++ b/flyteidl/gen/pb-cpp/flyteidl/service/agent.pb.cc @@ -38,29 +38,37 @@ ::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_fl const char descriptor_table_protodef_flyteidl_2fservice_2fagent_2eproto[] = "\n\034flyteidl/service/agent.proto\022\020flyteidl" - ".service\032\032flyteidl/admin/agent.proto2\217\002\n" - "\021AsyncAgentService\022U\n\nCreateTask\022!.flyte" - "idl.admin.CreateTaskRequest\032\".flyteidl.a" - "dmin.CreateTaskResponse\"\000\022L\n\007GetTask\022\036.f" - "lyteidl.admin.GetTaskRequest\032\037.flyteidl." - "admin.GetTaskResponse\"\000\022U\n\nDeleteTask\022!." - "flyteidl.admin.DeleteTaskRequest\032\".flyte" - "idl.admin.DeleteTaskResponse\"\000B\?Z=github" - ".com/flyteorg/flyte/flyteidl/gen/pb-go/f" - "lyteidl/serviceb\006proto3" + ".service\032\034google/api/annotations.proto\032\032" + "flyteidl/admin/agent.proto2\217\002\n\021AsyncAgen" + "tService\022U\n\nCreateTask\022!.flyteidl.admin." + "CreateTaskRequest\032\".flyteidl.admin.Creat" + "eTaskResponse\"\000\022L\n\007GetTask\022\036.flyteidl.ad" + "min.GetTaskRequest\032\037.flyteidl.admin.GetT" + "askResponse\"\000\022U\n\nDeleteTask\022!.flyteidl.a" + "dmin.DeleteTaskRequest\032\".flyteidl.admin." + "DeleteTaskResponse\"\0002\360\001\n\024AgentMetadataSe" + "rvice\022k\n\010GetAgent\022\037.flyteidl.admin.GetAg" + "entRequest\032 .flyteidl.admin.GetAgentResp" + "onse\"\034\202\323\344\223\002\026\022\024/api/v1/agent/{name}\022k\n\nLi" + "stAgents\022!.flyteidl.admin.ListAgentsRequ" + "est\032\".flyteidl.admin.ListAgentsResponse\"" + "\026\202\323\344\223\002\020\022\016/api/v1/agentsB\?Z=github.com/fl" + "yteorg/flyte/flyteidl/gen/pb-go/flyteidl" + "/serviceb\006proto3" ; ::google::protobuf::internal::DescriptorTable descriptor_table_flyteidl_2fservice_2fagent_2eproto = { false, InitDefaults_flyteidl_2fservice_2fagent_2eproto, descriptor_table_protodef_flyteidl_2fservice_2fagent_2eproto, - "flyteidl/service/agent.proto", &assign_descriptors_table_flyteidl_2fservice_2fagent_2eproto, 423, + "flyteidl/service/agent.proto", &assign_descriptors_table_flyteidl_2fservice_2fagent_2eproto, 696, }; void AddDescriptors_flyteidl_2fservice_2fagent_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = + static constexpr ::google::protobuf::internal::InitFunc deps[2] = { + ::AddDescriptors_google_2fapi_2fannotations_2eproto, ::AddDescriptors_flyteidl_2fadmin_2fagent_2eproto, }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fservice_2fagent_2eproto, deps, 1); + ::google::protobuf::internal::AddDescriptors(&descriptor_table_flyteidl_2fservice_2fagent_2eproto, deps, 2); } // Force running AddDescriptors() at dynamic initialization time. diff --git a/flyteidl/gen/pb-cpp/flyteidl/service/agent.pb.h b/flyteidl/gen/pb-cpp/flyteidl/service/agent.pb.h index 367d5b767e..2b91672863 100644 --- a/flyteidl/gen/pb-cpp/flyteidl/service/agent.pb.h +++ b/flyteidl/gen/pb-cpp/flyteidl/service/agent.pb.h @@ -29,6 +29,7 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export +#include "google/api/annotations.pb.h" #include "flyteidl/admin/agent.pb.h" // @@protoc_insertion_point(includes) #include diff --git a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go index e070c2e85e..2e255f5c88 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.go @@ -215,10 +215,15 @@ func (m *CreateTaskRequest) GetTaskExecutionMetadata() *TaskExecutionMetadata { // Represents a create response structure. type CreateTaskResponse struct { // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). - ResourceMeta []byte `protobuf:"bytes,1,opt,name=resource_meta,json=resourceMeta,proto3" json:"resource_meta,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Resource is for synchronous task execution. + // + // Types that are valid to be assigned to Res: + // *CreateTaskResponse_ResourceMeta + // *CreateTaskResponse_Resource + Res isCreateTaskResponse_Res `protobuf_oneof:"res"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} } @@ -246,13 +251,51 @@ func (m *CreateTaskResponse) XXX_DiscardUnknown() { var xxx_messageInfo_CreateTaskResponse proto.InternalMessageInfo -func (m *CreateTaskResponse) GetResourceMeta() []byte { +type isCreateTaskResponse_Res interface { + isCreateTaskResponse_Res() +} + +type CreateTaskResponse_ResourceMeta struct { + ResourceMeta []byte `protobuf:"bytes,1,opt,name=resource_meta,json=resourceMeta,proto3,oneof"` +} + +type CreateTaskResponse_Resource struct { + Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3,oneof"` +} + +func (*CreateTaskResponse_ResourceMeta) isCreateTaskResponse_Res() {} + +func (*CreateTaskResponse_Resource) isCreateTaskResponse_Res() {} + +func (m *CreateTaskResponse) GetRes() isCreateTaskResponse_Res { if m != nil { - return m.ResourceMeta + return m.Res + } + return nil +} + +func (m *CreateTaskResponse) GetResourceMeta() []byte { + if x, ok := m.GetRes().(*CreateTaskResponse_ResourceMeta); ok { + return x.ResourceMeta + } + return nil +} + +func (m *CreateTaskResponse) GetResource() *Resource { + if x, ok := m.GetRes().(*CreateTaskResponse_Resource); ok { + return x.Resource } return nil } +// XXX_OneofWrappers is for the internal use of the proto package. +func (*CreateTaskResponse) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*CreateTaskResponse_ResourceMeta)(nil), + (*CreateTaskResponse_Resource)(nil), + } +} + // A message used to fetch a job resource from flyte agent server. type GetTaskRequest struct { // A predefined yet extensible Task type identifier. @@ -306,7 +349,7 @@ func (m *GetTaskRequest) GetResourceMeta() []byte { // Response to get an individual task resource. type GetTaskResponse struct { Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // log information for the task execution. + // log information for the task execution LogLinks []*core.TaskLog `protobuf:"bytes,2,rep,name=log_links,json=logLinks,proto3" json:"log_links,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -360,10 +403,12 @@ type Resource struct { // +optional Outputs *core.LiteralMap `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"` // A descriptive message for the current state. e.g. waiting for cluster. - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + // log information for the task execution. + LogLinks []*core.TaskLog `protobuf:"bytes,4,rep,name=log_links,json=logLinks,proto3" json:"log_links,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Resource) Reset() { *m = Resource{} } @@ -412,6 +457,13 @@ func (m *Resource) GetMessage() string { return "" } +func (m *Resource) GetLogLinks() []*core.TaskLog { + if m != nil { + return m.LogLinks + } + return nil +} + // A message used to delete a task. type DeleteTaskRequest struct { // A predefined yet extensible Task type identifier. @@ -494,6 +546,209 @@ func (m *DeleteTaskResponse) XXX_DiscardUnknown() { var xxx_messageInfo_DeleteTaskResponse proto.InternalMessageInfo +// A message containing the agent metadata. +type Agent struct { + // Name is the developer-assigned name of the agent. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // SupportedTaskTypes are the types of the tasks that the agent can handle. + SupportedTaskTypes []string `protobuf:"bytes,2,rep,name=supported_task_types,json=supportedTaskTypes,proto3" json:"supported_task_types,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Agent) Reset() { *m = Agent{} } +func (m *Agent) String() string { return proto.CompactTextString(m) } +func (*Agent) ProtoMessage() {} +func (*Agent) Descriptor() ([]byte, []int) { + return fileDescriptor_c434e52bb0028071, []int{8} +} + +func (m *Agent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Agent.Unmarshal(m, b) +} +func (m *Agent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Agent.Marshal(b, m, deterministic) +} +func (m *Agent) XXX_Merge(src proto.Message) { + xxx_messageInfo_Agent.Merge(m, src) +} +func (m *Agent) XXX_Size() int { + return xxx_messageInfo_Agent.Size(m) +} +func (m *Agent) XXX_DiscardUnknown() { + xxx_messageInfo_Agent.DiscardUnknown(m) +} + +var xxx_messageInfo_Agent proto.InternalMessageInfo + +func (m *Agent) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Agent) GetSupportedTaskTypes() []string { + if m != nil { + return m.SupportedTaskTypes + } + return nil +} + +// A request to get an agent. +type GetAgentRequest struct { + // The name of the agent. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAgentRequest) Reset() { *m = GetAgentRequest{} } +func (m *GetAgentRequest) String() string { return proto.CompactTextString(m) } +func (*GetAgentRequest) ProtoMessage() {} +func (*GetAgentRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c434e52bb0028071, []int{9} +} + +func (m *GetAgentRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetAgentRequest.Unmarshal(m, b) +} +func (m *GetAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetAgentRequest.Marshal(b, m, deterministic) +} +func (m *GetAgentRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAgentRequest.Merge(m, src) +} +func (m *GetAgentRequest) XXX_Size() int { + return xxx_messageInfo_GetAgentRequest.Size(m) +} +func (m *GetAgentRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetAgentRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAgentRequest proto.InternalMessageInfo + +func (m *GetAgentRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// A response containing an agent. +type GetAgentResponse struct { + Agent *Agent `protobuf:"bytes,1,opt,name=agent,proto3" json:"agent,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAgentResponse) Reset() { *m = GetAgentResponse{} } +func (m *GetAgentResponse) String() string { return proto.CompactTextString(m) } +func (*GetAgentResponse) ProtoMessage() {} +func (*GetAgentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c434e52bb0028071, []int{10} +} + +func (m *GetAgentResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetAgentResponse.Unmarshal(m, b) +} +func (m *GetAgentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetAgentResponse.Marshal(b, m, deterministic) +} +func (m *GetAgentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAgentResponse.Merge(m, src) +} +func (m *GetAgentResponse) XXX_Size() int { + return xxx_messageInfo_GetAgentResponse.Size(m) +} +func (m *GetAgentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetAgentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAgentResponse proto.InternalMessageInfo + +func (m *GetAgentResponse) GetAgent() *Agent { + if m != nil { + return m.Agent + } + return nil +} + +// A request to list all agents. +type ListAgentsRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListAgentsRequest) Reset() { *m = ListAgentsRequest{} } +func (m *ListAgentsRequest) String() string { return proto.CompactTextString(m) } +func (*ListAgentsRequest) ProtoMessage() {} +func (*ListAgentsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c434e52bb0028071, []int{11} +} + +func (m *ListAgentsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListAgentsRequest.Unmarshal(m, b) +} +func (m *ListAgentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListAgentsRequest.Marshal(b, m, deterministic) +} +func (m *ListAgentsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListAgentsRequest.Merge(m, src) +} +func (m *ListAgentsRequest) XXX_Size() int { + return xxx_messageInfo_ListAgentsRequest.Size(m) +} +func (m *ListAgentsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListAgentsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListAgentsRequest proto.InternalMessageInfo + +// A response containing a list of agents. +type ListAgentsResponse struct { + Agents []*Agent `protobuf:"bytes,1,rep,name=agents,proto3" json:"agents,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListAgentsResponse) Reset() { *m = ListAgentsResponse{} } +func (m *ListAgentsResponse) String() string { return proto.CompactTextString(m) } +func (*ListAgentsResponse) ProtoMessage() {} +func (*ListAgentsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c434e52bb0028071, []int{12} +} + +func (m *ListAgentsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListAgentsResponse.Unmarshal(m, b) +} +func (m *ListAgentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListAgentsResponse.Marshal(b, m, deterministic) +} +func (m *ListAgentsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListAgentsResponse.Merge(m, src) +} +func (m *ListAgentsResponse) XXX_Size() int { + return xxx_messageInfo_ListAgentsResponse.Size(m) +} +func (m *ListAgentsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListAgentsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListAgentsResponse proto.InternalMessageInfo + +func (m *ListAgentsResponse) GetAgents() []*Agent { + if m != nil { + return m.Agents + } + return nil +} + func init() { proto.RegisterEnum("flyteidl.admin.State", State_name, State_value) proto.RegisterType((*TaskExecutionMetadata)(nil), "flyteidl.admin.TaskExecutionMetadata") @@ -507,59 +762,72 @@ func init() { proto.RegisterType((*Resource)(nil), "flyteidl.admin.Resource") proto.RegisterType((*DeleteTaskRequest)(nil), "flyteidl.admin.DeleteTaskRequest") proto.RegisterType((*DeleteTaskResponse)(nil), "flyteidl.admin.DeleteTaskResponse") + proto.RegisterType((*Agent)(nil), "flyteidl.admin.Agent") + proto.RegisterType((*GetAgentRequest)(nil), "flyteidl.admin.GetAgentRequest") + proto.RegisterType((*GetAgentResponse)(nil), "flyteidl.admin.GetAgentResponse") + proto.RegisterType((*ListAgentsRequest)(nil), "flyteidl.admin.ListAgentsRequest") + proto.RegisterType((*ListAgentsResponse)(nil), "flyteidl.admin.ListAgentsResponse") } func init() { proto.RegisterFile("flyteidl/admin/agent.proto", fileDescriptor_c434e52bb0028071) } var fileDescriptor_c434e52bb0028071 = []byte{ - // 773 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x7f, 0x6f, 0xe3, 0x44, - 0x10, 0x25, 0x49, 0xd3, 0x26, 0x93, 0x5e, 0x2f, 0x59, 0x1a, 0x70, 0x73, 0x07, 0xaa, 0x82, 0x40, - 0x15, 0x08, 0x47, 0xd7, 0x22, 0xe8, 0x81, 0x00, 0xe5, 0x5a, 0x53, 0x45, 0x4a, 0xa3, 0x6a, 0x9b, - 0x20, 0x40, 0x02, 0x6b, 0xe3, 0x4c, 0x8c, 0x15, 0x67, 0xd7, 0x78, 0xd7, 0xd1, 0x45, 0xe2, 0x3f, - 0x24, 0x3e, 0x03, 0x1f, 0x17, 0x79, 0xfd, 0xa3, 0x49, 0x64, 0x50, 0x4f, 0xf7, 0x9f, 0x77, 0xde, - 0x9b, 0x37, 0x6f, 0x67, 0xc6, 0x5a, 0xe8, 0xcc, 0xfd, 0xb5, 0x42, 0x6f, 0xe6, 0xf7, 0xd8, 0x6c, - 0xe9, 0xf1, 0x1e, 0x73, 0x91, 0x2b, 0x33, 0x08, 0x85, 0x12, 0xe4, 0x28, 0xc3, 0x4c, 0x8d, 0x75, - 0x9e, 0xe7, 0x5c, 0x47, 0x84, 0xd8, 0xf3, 0x3d, 0x85, 0x21, 0xf3, 0x65, 0xc2, 0xee, 0x9c, 0x6c, - 0xa3, 0x8a, 0xc9, 0x45, 0x06, 0x7d, 0xb0, 0x0d, 0x79, 0x5c, 0x61, 0x38, 0x67, 0x0e, 0xa6, 0xf0, - 0x87, 0x3b, 0xf0, 0x0c, 0xb9, 0xf2, 0xe6, 0x1e, 0x86, 0xc5, 0xe9, 0xf8, 0x1a, 0x9d, 0x48, 0x79, - 0x82, 0x27, 0x70, 0xf7, 0x9f, 0x2a, 0xb4, 0xc7, 0x4c, 0x2e, 0xac, 0x2c, 0x7e, 0x8b, 0x8a, 0xcd, - 0x98, 0x62, 0x84, 0x42, 0x2b, 0xb6, 0x61, 0xe7, 0x19, 0xb6, 0x37, 0x33, 0x4a, 0xa7, 0xa5, 0xb3, - 0xc6, 0xf9, 0x27, 0x66, 0x7e, 0xb9, 0x58, 0xd4, 0xdc, 0x12, 0x18, 0xe4, 0x0e, 0xe8, 0x53, 0xb5, - 0x0d, 0x90, 0xe7, 0x50, 0xe7, 0x6c, 0x89, 0x32, 0x60, 0x0e, 0x1a, 0xe5, 0xd3, 0xd2, 0x59, 0x9d, - 0x3e, 0x04, 0xc8, 0x00, 0xf6, 0x7d, 0x36, 0x45, 0x5f, 0x1a, 0x95, 0xd3, 0xca, 0x59, 0xe3, 0xfc, - 0x85, 0xb9, 0xdd, 0x43, 0xb3, 0xd0, 0xa8, 0x39, 0xd4, 0x39, 0x16, 0x57, 0xe1, 0x9a, 0xa6, 0x02, - 0xe4, 0x27, 0x68, 0x30, 0xce, 0x85, 0x62, 0x31, 0x53, 0x1a, 0x7b, 0x5a, 0xef, 0xcb, 0xc7, 0xe9, - 0xf5, 0x1f, 0x12, 0x13, 0xd1, 0x4d, 0x29, 0x62, 0xc2, 0xbb, 0x8b, 0x4b, 0x69, 0x4b, 0x0c, 0x57, - 0x9e, 0x83, 0x36, 0x73, 0x1c, 0x11, 0x71, 0x65, 0x54, 0xf5, 0x65, 0x5a, 0x8b, 0x4b, 0x79, 0x9f, - 0x20, 0xfd, 0x04, 0x20, 0x0a, 0xda, 0xc8, 0x57, 0x5e, 0x28, 0xf8, 0x12, 0xb9, 0xb2, 0x57, 0x2c, - 0xf4, 0xd8, 0xd4, 0x47, 0x69, 0xec, 0x6b, 0x4f, 0xdf, 0x3f, 0xce, 0x93, 0xf5, 0x20, 0xf1, 0x63, - 0xa6, 0x90, 0x98, 0x3b, 0xc6, 0x02, 0xa8, 0xf3, 0x12, 0x1a, 0x1b, 0x6d, 0x21, 0x4d, 0xa8, 0x2c, - 0x70, 0xad, 0xa7, 0x57, 0xa7, 0xf1, 0x27, 0x39, 0x86, 0xea, 0x8a, 0xf9, 0x51, 0x36, 0x85, 0xe4, - 0xf0, 0x75, 0xf9, 0xb2, 0xd4, 0xf9, 0x0e, 0x9a, 0xbb, 0x1d, 0x78, 0xa3, 0xfc, 0x1b, 0x38, 0xf9, - 0x4f, 0xb7, 0x6f, 0x22, 0xd4, 0xfd, 0xab, 0x0c, 0xad, 0xab, 0x10, 0x99, 0xc2, 0xb8, 0x27, 0x14, - 0xff, 0x88, 0x50, 0x2a, 0xf2, 0x02, 0xf6, 0x3d, 0x1e, 0x44, 0x4a, 0xa6, 0xbb, 0x78, 0xb2, 0xb3, - 0x8b, 0xc3, 0xe4, 0xc7, 0xba, 0x65, 0x01, 0x4d, 0x89, 0xe4, 0x2b, 0xa8, 0x29, 0x5c, 0x06, 0x3e, - 0x53, 0x49, 0x95, 0xc6, 0xf9, 0xb3, 0x82, 0x05, 0x1e, 0xa7, 0x14, 0x9a, 0x93, 0xc9, 0x47, 0xf0, - 0x44, 0x44, 0x2a, 0x88, 0x94, 0x1d, 0x84, 0x38, 0xf7, 0x5e, 0x1b, 0x15, 0xed, 0xf1, 0x30, 0x09, - 0xde, 0xe9, 0x18, 0xf9, 0x15, 0xde, 0xdf, 0xf9, 0x4f, 0x96, 0xe9, 0xd4, 0x8c, 0x3d, 0x5d, 0xec, - 0xe3, 0x47, 0x8d, 0x98, 0xb6, 0x55, 0x51, 0xb8, 0xfb, 0x12, 0xc8, 0x66, 0x13, 0x64, 0x20, 0xb8, - 0xd4, 0xce, 0x42, 0x94, 0x22, 0x0a, 0x1d, 0xd4, 0xe5, 0x74, 0x33, 0x0e, 0xe9, 0x61, 0x16, 0x8c, - 0xd3, 0xbb, 0x14, 0x8e, 0x6e, 0x50, 0x6d, 0x36, 0xef, 0x19, 0xd4, 0xb5, 0x57, 0xb5, 0x0e, 0x30, - 0x1d, 0x42, 0x2d, 0x0e, 0x8c, 0xd7, 0x41, 0x81, 0x66, 0xb9, 0x40, 0xf3, 0x4f, 0x78, 0x9a, 0x6b, - 0xa6, 0x5e, 0xbe, 0x80, 0x5a, 0x46, 0x49, 0x67, 0x62, 0xec, 0xde, 0x98, 0xa6, 0x38, 0xcd, 0x99, - 0xe4, 0x02, 0xea, 0xbe, 0x70, 0x6d, 0xdf, 0xe3, 0x0b, 0x69, 0x94, 0xf5, 0xbf, 0xf0, 0x5e, 0xc1, - 0x54, 0x86, 0xc2, 0xa5, 0x35, 0x5f, 0xb8, 0xc3, 0x98, 0xd7, 0xfd, 0xbb, 0x04, 0xb5, 0x4c, 0x8b, - 0x7c, 0x06, 0x55, 0xa9, 0xe2, 0x99, 0xc6, 0x45, 0x8f, 0xce, 0xdb, 0xbb, 0x45, 0xef, 0x63, 0x90, - 0x26, 0x1c, 0x72, 0x01, 0x07, 0xc9, 0xd4, 0x64, 0xba, 0x02, 0xff, 0xb3, 0x37, 0x19, 0x93, 0x18, - 0x70, 0xb0, 0x44, 0x29, 0x99, 0x8b, 0xe9, 0xe4, 0xb3, 0x63, 0x77, 0x02, 0xad, 0x6b, 0xf4, 0x71, - 0x7b, 0x35, 0xdf, 0xbe, 0xbb, 0xc7, 0x40, 0x36, 0x65, 0x93, 0x06, 0x7f, 0xfa, 0x1b, 0x54, 0xf5, - 0x5d, 0x48, 0x1b, 0x5a, 0xd4, 0x1a, 0xd3, 0x9f, 0xfb, 0xaf, 0x86, 0x96, 0xfd, 0x43, 0x7f, 0x30, - 0x9c, 0x50, 0xab, 0xf9, 0x4e, 0x1c, 0xbe, 0xb3, 0xe8, 0x6d, 0x7f, 0x64, 0x8d, 0xc6, 0x79, 0xb8, - 0x44, 0x1a, 0x70, 0x70, 0x67, 0x8d, 0xae, 0x07, 0xa3, 0x9b, 0x66, 0x39, 0x3e, 0xd0, 0xc9, 0x68, - 0x14, 0x1f, 0x2a, 0xe4, 0x09, 0xd4, 0xef, 0x27, 0x57, 0x57, 0x96, 0x75, 0x6d, 0x5d, 0x37, 0xf7, - 0x5e, 0x7d, 0xfb, 0xcb, 0x37, 0xae, 0xa7, 0x7e, 0x8f, 0xa6, 0xa6, 0x23, 0x96, 0x3d, 0xdd, 0x16, - 0x11, 0xba, 0xc9, 0x47, 0x2f, 0x7f, 0x3e, 0x5c, 0xe4, 0xbd, 0x60, 0xfa, 0xb9, 0x2b, 0x7a, 0xdb, - 0xaf, 0xde, 0x74, 0x5f, 0xbf, 0x24, 0x17, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x8d, 0xa5, - 0xb7, 0x0e, 0x07, 0x00, 0x00, + // 901 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x7f, 0x6f, 0xe3, 0x44, + 0x10, 0x6d, 0x7e, 0x36, 0x99, 0xb4, 0xbd, 0x64, 0xaf, 0x01, 0x37, 0x77, 0xa0, 0xca, 0xa8, 0xa8, + 0xe2, 0x74, 0x09, 0xd7, 0xa2, 0xa3, 0x80, 0xe0, 0x94, 0xb6, 0xa6, 0x57, 0x29, 0x8d, 0xaa, 0x6d, + 0x8a, 0x00, 0x09, 0xa2, 0x4d, 0x32, 0x35, 0x56, 0x1c, 0xdb, 0x78, 0xd7, 0xd5, 0x05, 0xf1, 0x1f, + 0x5f, 0x82, 0xef, 0xc2, 0x97, 0x43, 0xde, 0x5d, 0x3b, 0x71, 0xc8, 0x9d, 0x7a, 0xe2, 0x3f, 0xef, + 0xbc, 0xb7, 0x6f, 0xde, 0xce, 0xcc, 0x66, 0x03, 0xad, 0x3b, 0x77, 0x2e, 0xd0, 0x99, 0xb8, 0x1d, + 0x36, 0x99, 0x39, 0x5e, 0x87, 0xd9, 0xe8, 0x89, 0x76, 0x10, 0xfa, 0xc2, 0x27, 0x3b, 0x09, 0xd6, + 0x96, 0x58, 0xeb, 0x69, 0xca, 0x1d, 0xfb, 0x21, 0x76, 0x5c, 0x47, 0x60, 0xc8, 0x5c, 0xae, 0xd8, + 0xad, 0xbd, 0x2c, 0x2a, 0x18, 0x9f, 0x26, 0xd0, 0x47, 0x59, 0xc8, 0xf1, 0x04, 0x86, 0x77, 0x6c, + 0x8c, 0x1a, 0xfe, 0x78, 0x05, 0x9e, 0xa0, 0x27, 0x9c, 0x3b, 0x07, 0xc3, 0xf5, 0xdb, 0xf1, 0x0d, + 0x8e, 0x23, 0xe1, 0xf8, 0x9e, 0x82, 0xcd, 0xbf, 0x4b, 0xd0, 0x1c, 0x30, 0x3e, 0xb5, 0x92, 0xf8, + 0x15, 0x0a, 0x36, 0x61, 0x82, 0x11, 0x0a, 0x8d, 0xd8, 0xc6, 0x30, 0xdd, 0x31, 0x74, 0x26, 0x46, + 0x6e, 0x3f, 0x77, 0x58, 0x3b, 0xfa, 0xb4, 0x9d, 0x1e, 0x2e, 0x16, 0x6d, 0x67, 0x04, 0x2e, 0x53, + 0x07, 0xf4, 0x91, 0xc8, 0x02, 0xe4, 0x29, 0x54, 0x3d, 0x36, 0x43, 0x1e, 0xb0, 0x31, 0x1a, 0xf9, + 0xfd, 0xdc, 0x61, 0x95, 0x2e, 0x02, 0xe4, 0x12, 0xca, 0x2e, 0x1b, 0xa1, 0xcb, 0x8d, 0xc2, 0x7e, + 0xe1, 0xb0, 0x76, 0xf4, 0xa2, 0x9d, 0xad, 0x61, 0x7b, 0xad, 0xd1, 0x76, 0x4f, 0xee, 0xb1, 0x3c, + 0x11, 0xce, 0xa9, 0x16, 0x20, 0x3f, 0x42, 0x8d, 0x79, 0x9e, 0x2f, 0x58, 0xcc, 0xe4, 0x46, 0x51, + 0xea, 0xbd, 0x7c, 0x98, 0x5e, 0x77, 0xb1, 0x51, 0x89, 0x2e, 0x4b, 0x91, 0x36, 0x3c, 0x9e, 0x9e, + 0xf0, 0x21, 0xc7, 0xf0, 0xde, 0x19, 0xe3, 0x90, 0x8d, 0xc7, 0x7e, 0xe4, 0x09, 0xa3, 0x24, 0x0f, + 0xd3, 0x98, 0x9e, 0xf0, 0x1b, 0x85, 0x74, 0x15, 0x40, 0x04, 0x34, 0xd1, 0xbb, 0x77, 0x42, 0xdf, + 0x9b, 0xa1, 0x27, 0x86, 0xf7, 0x2c, 0x74, 0xd8, 0xc8, 0x45, 0x6e, 0x94, 0xa5, 0xa7, 0x57, 0x0f, + 0xf3, 0x64, 0x2d, 0x24, 0x7e, 0x48, 0x14, 0x94, 0xb9, 0x5d, 0x5c, 0x03, 0xb5, 0xbe, 0x82, 0xda, + 0x52, 0x59, 0x48, 0x1d, 0x0a, 0x53, 0x9c, 0xcb, 0xee, 0x55, 0x69, 0xfc, 0x49, 0x76, 0xa1, 0x74, + 0xcf, 0xdc, 0x28, 0xe9, 0x82, 0x5a, 0x7c, 0x9d, 0x3f, 0xc9, 0xb5, 0xbe, 0x83, 0xfa, 0x6a, 0x05, + 0xde, 0x6b, 0xff, 0x05, 0xec, 0xbd, 0xd5, 0xed, 0xfb, 0x08, 0x99, 0x7f, 0xe5, 0xa1, 0x71, 0x16, + 0x22, 0x13, 0x18, 0xd7, 0x84, 0xe2, 0xef, 0x11, 0x72, 0x41, 0x5e, 0x40, 0xd9, 0xf1, 0x82, 0x48, + 0x70, 0x3d, 0x8b, 0x7b, 0x2b, 0xb3, 0xd8, 0x53, 0x17, 0xeb, 0x8a, 0x05, 0x54, 0x13, 0xc9, 0x97, + 0x50, 0x11, 0x38, 0x0b, 0x5c, 0x26, 0x54, 0x96, 0xda, 0xd1, 0x93, 0x35, 0x03, 0x3c, 0xd0, 0x14, + 0x9a, 0x92, 0xc9, 0x27, 0xb0, 0xed, 0x47, 0x22, 0x88, 0xc4, 0x30, 0x08, 0xf1, 0xce, 0x79, 0x63, + 0x14, 0xa4, 0xc7, 0x2d, 0x15, 0xbc, 0x96, 0x31, 0xf2, 0x0b, 0x7c, 0xb8, 0x72, 0x4f, 0x66, 0xba, + 0x6b, 0x46, 0x51, 0x26, 0x3b, 0x78, 0x50, 0x8b, 0x69, 0x53, 0xac, 0x0b, 0x9b, 0x7f, 0x00, 0x59, + 0x2e, 0x02, 0x0f, 0x7c, 0x8f, 0x23, 0x39, 0x80, 0xed, 0x10, 0xb9, 0x1f, 0x85, 0x63, 0x94, 0xe9, + 0x64, 0x31, 0xb6, 0x5e, 0x6f, 0xd0, 0xad, 0x24, 0x1c, 0x0b, 0x90, 0x97, 0x50, 0x49, 0xd6, 0xfa, + 0xe4, 0xc6, 0xaa, 0x19, 0xaa, 0xf1, 0xd7, 0x1b, 0x34, 0xe5, 0x9e, 0x96, 0xa0, 0x10, 0x22, 0x37, + 0x29, 0xec, 0x5c, 0xa0, 0x58, 0xae, 0xfe, 0x13, 0xa8, 0xca, 0xc3, 0x8a, 0x79, 0x80, 0xba, 0x8b, + 0x95, 0x38, 0x30, 0x98, 0x07, 0xb2, 0x5c, 0x59, 0x53, 0x71, 0xca, 0xad, 0xac, 0x25, 0xf3, 0x4f, + 0x78, 0x94, 0x6a, 0xea, 0xc3, 0x7c, 0xb1, 0xe4, 0x32, 0xf7, 0x6e, 0x97, 0x0b, 0x8f, 0xe4, 0x18, + 0xaa, 0xae, 0x6f, 0x0f, 0x5d, 0xc7, 0x9b, 0x72, 0x23, 0x2f, 0x2f, 0xd3, 0x07, 0x6b, 0xda, 0xda, + 0xf3, 0x6d, 0x5a, 0x71, 0x7d, 0xbb, 0x17, 0xf3, 0xcc, 0x7f, 0x72, 0x50, 0x49, 0xb4, 0xc8, 0x33, + 0x28, 0x71, 0x11, 0x0f, 0x45, 0x9c, 0x74, 0xe7, 0xa8, 0xb9, 0x9a, 0xf4, 0x26, 0x06, 0xa9, 0xe2, + 0x90, 0x63, 0xd8, 0x54, 0x6d, 0xe7, 0xba, 0x92, 0xef, 0x18, 0xbc, 0x84, 0x49, 0x0c, 0xd8, 0x9c, + 0x21, 0xe7, 0xcc, 0x46, 0x3d, 0x3a, 0xc9, 0x32, 0xeb, 0xbe, 0xf8, 0x40, 0xf7, 0xb7, 0xd0, 0x38, + 0x47, 0x17, 0xb3, 0x17, 0xe2, 0xff, 0xb7, 0x64, 0x17, 0xc8, 0xb2, 0xac, 0xea, 0x8a, 0x79, 0x05, + 0xa5, 0x6e, 0xfc, 0x9e, 0x11, 0x02, 0xc5, 0xf8, 0x37, 0x5a, 0x6b, 0xcb, 0x6f, 0xf2, 0x39, 0xec, + 0xf2, 0x28, 0x08, 0xfc, 0x50, 0xe0, 0x64, 0x98, 0xa6, 0x57, 0x7d, 0xa8, 0x52, 0x92, 0x62, 0x03, + 0x6d, 0x84, 0x9b, 0x07, 0xb2, 0xef, 0x52, 0x31, 0x71, 0xbe, 0x46, 0xd8, 0x7c, 0x05, 0xf5, 0x05, + 0x4d, 0xcf, 0xc7, 0x33, 0x28, 0xc9, 0x97, 0x55, 0x0f, 0xc7, 0x7f, 0xfa, 0xa4, 0xd8, 0x8a, 0x63, + 0x3e, 0x86, 0x46, 0xcf, 0xe1, 0x4a, 0x81, 0xeb, 0x4c, 0xe6, 0x19, 0x90, 0xe5, 0xa0, 0xd6, 0x7d, + 0x0e, 0x65, 0xb9, 0x27, 0xfe, 0x29, 0x29, 0xbc, 0x5d, 0x58, 0x93, 0x3e, 0xfb, 0x15, 0x4a, 0x72, + 0x22, 0x48, 0x13, 0x1a, 0xd4, 0x1a, 0xd0, 0x9f, 0xba, 0xa7, 0x3d, 0x6b, 0xf8, 0x7d, 0xf7, 0xb2, + 0x77, 0x4b, 0xad, 0xfa, 0x46, 0x1c, 0xbe, 0xb6, 0xe8, 0x55, 0xb7, 0x6f, 0xf5, 0x07, 0x69, 0x38, + 0x47, 0x6a, 0xb0, 0x79, 0x6d, 0xf5, 0xcf, 0x2f, 0xfb, 0x17, 0xf5, 0x7c, 0xbc, 0xa0, 0xb7, 0xfd, + 0x7e, 0xbc, 0x28, 0x90, 0x6d, 0xa8, 0xde, 0xdc, 0x9e, 0x9d, 0x59, 0xd6, 0xb9, 0x75, 0x5e, 0x2f, + 0x9e, 0x7e, 0xfb, 0xf3, 0x37, 0xb6, 0x23, 0x7e, 0x8b, 0x46, 0xed, 0xb1, 0x3f, 0xeb, 0x48, 0x2b, + 0x7e, 0x68, 0xab, 0x8f, 0x4e, 0xfa, 0x8a, 0xdb, 0xe8, 0x75, 0x82, 0xd1, 0x73, 0xdb, 0xef, 0x64, + 0xff, 0x7c, 0x8c, 0xca, 0xf2, 0x41, 0x3f, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x11, 0x18, + 0x7d, 0x95, 0x08, 0x00, 0x00, } diff --git a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.validate.go b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.validate.go index 221003b999..8bdff082f3 100644 --- a/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.validate.go +++ b/flyteidl/gen/pb-go/flyteidl/admin/agent.pb.validate.go @@ -230,7 +230,24 @@ func (m *CreateTaskResponse) Validate() error { return nil } - // no validation rules for ResourceMeta + switch m.Res.(type) { + + case *CreateTaskResponse_ResourceMeta: + // no validation rules for ResourceMeta + + case *CreateTaskResponse_Resource: + + if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateTaskResponseValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } return nil } @@ -471,6 +488,21 @@ func (m *Resource) Validate() error { // no validation rules for Message + for idx, item := range m.GetLogLinks() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceValidationError{ + field: fmt.Sprintf("LogLinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + return nil } @@ -665,3 +697,360 @@ var _ interface { Cause() error ErrorName() string } = DeleteTaskResponseValidationError{} + +// Validate checks the field values on Agent with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Agent) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Name + + return nil +} + +// AgentValidationError is the validation error returned by Agent.Validate if +// the designated constraints aren't met. +type AgentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AgentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AgentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AgentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AgentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AgentValidationError) ErrorName() string { return "AgentValidationError" } + +// Error satisfies the builtin error interface +func (e AgentValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAgent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AgentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AgentValidationError{} + +// Validate checks the field values on GetAgentRequest with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *GetAgentRequest) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Name + + return nil +} + +// GetAgentRequestValidationError is the validation error returned by +// GetAgentRequest.Validate if the designated constraints aren't met. +type GetAgentRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetAgentRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetAgentRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetAgentRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetAgentRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetAgentRequestValidationError) ErrorName() string { return "GetAgentRequestValidationError" } + +// Error satisfies the builtin error interface +func (e GetAgentRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetAgentRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetAgentRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetAgentRequestValidationError{} + +// Validate checks the field values on GetAgentResponse with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *GetAgentResponse) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetAgent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetAgentResponseValidationError{ + field: "Agent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// GetAgentResponseValidationError is the validation error returned by +// GetAgentResponse.Validate if the designated constraints aren't met. +type GetAgentResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetAgentResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetAgentResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetAgentResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetAgentResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetAgentResponseValidationError) ErrorName() string { return "GetAgentResponseValidationError" } + +// Error satisfies the builtin error interface +func (e GetAgentResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetAgentResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetAgentResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetAgentResponseValidationError{} + +// Validate checks the field values on ListAgentsRequest with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *ListAgentsRequest) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// ListAgentsRequestValidationError is the validation error returned by +// ListAgentsRequest.Validate if the designated constraints aren't met. +type ListAgentsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListAgentsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListAgentsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListAgentsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListAgentsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListAgentsRequestValidationError) ErrorName() string { + return "ListAgentsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListAgentsRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListAgentsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListAgentsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListAgentsRequestValidationError{} + +// Validate checks the field values on ListAgentsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ListAgentsResponse) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetAgents() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListAgentsResponseValidationError{ + field: fmt.Sprintf("Agents[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ListAgentsResponseValidationError is the validation error returned by +// ListAgentsResponse.Validate if the designated constraints aren't met. +type ListAgentsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListAgentsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListAgentsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListAgentsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListAgentsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListAgentsResponseValidationError) ErrorName() string { + return "ListAgentsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListAgentsResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListAgentsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListAgentsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListAgentsResponseValidationError{} diff --git a/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go index 274daaf196..c816a1f3ac 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.go @@ -8,6 +8,7 @@ import ( fmt "fmt" admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -28,21 +29,28 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("flyteidl/service/agent.proto", fileDescriptor_f7d1dfd1fb77d2ef) } var fileDescriptor_f7d1dfd1fb77d2ef = []byte{ - // 214 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xcb, 0xa9, 0x2c, - 0x49, 0xcd, 0x4c, 0xc9, 0xd1, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x4f, 0x4c, 0x4f, - 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc9, 0xea, 0x41, 0x65, 0xa5, - 0xa4, 0xe0, 0xea, 0x13, 0x53, 0x72, 0x33, 0xf3, 0x90, 0x55, 0x1b, 0xf5, 0x33, 0x71, 0x09, 0x3a, - 0x16, 0x57, 0xe6, 0x25, 0x3b, 0x82, 0x04, 0x83, 0x21, 0x3a, 0x84, 0x42, 0xb9, 0xb8, 0x9c, 0x8b, - 0x52, 0x13, 0x4b, 0x52, 0x43, 0x12, 0x8b, 0xb3, 0x85, 0x14, 0xf5, 0xe0, 0x46, 0x82, 0x0d, 0xd0, - 0x43, 0xc8, 0x05, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x48, 0x29, 0xe1, 0x53, 0x52, 0x5c, 0x90, - 0x9f, 0x57, 0x9c, 0xaa, 0xc4, 0x20, 0xe4, 0xc3, 0xc5, 0xee, 0x9e, 0x5a, 0x02, 0x36, 0x53, 0x0e, - 0x5d, 0x03, 0x54, 0x02, 0x66, 0xa0, 0x3c, 0x4e, 0x79, 0xb8, 0x69, 0xa1, 0x5c, 0x5c, 0x2e, 0xa9, - 0x39, 0xa9, 0xb8, 0x1c, 0x89, 0x90, 0xc3, 0xe9, 0x48, 0x64, 0x25, 0x30, 0x63, 0x9d, 0xec, 0xa3, - 0x6c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xc1, 0x3a, 0xf2, 0x8b, - 0xd2, 0x21, 0x0c, 0x7d, 0x78, 0x48, 0xa6, 0xa7, 0xe6, 0xe9, 0x17, 0x24, 0xe9, 0xa6, 0xe7, 0xeb, - 0xa3, 0x47, 0x46, 0x12, 0x1b, 0x38, 0x64, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x92, 0xbb, - 0xf6, 0x3c, 0xa7, 0x01, 0x00, 0x00, + // 324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xbd, 0x4e, 0xf3, 0x30, + 0x14, 0x86, 0xbf, 0xaf, 0x03, 0x20, 0x0f, 0xa8, 0x58, 0x55, 0x87, 0xa8, 0xe2, 0xa7, 0x3b, 0xb1, + 0x28, 0x33, 0x42, 0x05, 0xa4, 0x2e, 0x65, 0x01, 0xba, 0xb0, 0x9d, 0x26, 0x07, 0x63, 0x25, 0xb1, + 0x43, 0x7c, 0x5a, 0xa9, 0x42, 0x2c, 0xdc, 0x00, 0x03, 0x97, 0xc6, 0x2d, 0x70, 0x01, 0x5c, 0x02, + 0xc2, 0xf9, 0xa5, 0x10, 0xb6, 0x28, 0xcf, 0xeb, 0xe7, 0xf5, 0xcf, 0x61, 0x83, 0xbb, 0x78, 0x45, + 0xa8, 0xc2, 0x58, 0x58, 0xcc, 0x96, 0x2a, 0x40, 0x01, 0x12, 0x35, 0xf9, 0x69, 0x66, 0xc8, 0xf0, + 0x6e, 0x49, 0xfd, 0x82, 0x7a, 0x03, 0x69, 0x8c, 0x8c, 0x51, 0x40, 0xaa, 0x04, 0x68, 0x6d, 0x08, + 0x48, 0x19, 0x6d, 0xf3, 0xbc, 0xe7, 0x55, 0x36, 0x08, 0x13, 0xa5, 0x9b, 0xae, 0xd1, 0x4b, 0x87, + 0xed, 0x8c, 0xed, 0x4a, 0x07, 0xe3, 0xaf, 0x9f, 0xd7, 0xb9, 0x8f, 0xcf, 0x18, 0x3b, 0xcf, 0x10, + 0x08, 0x6f, 0xc0, 0x46, 0xfc, 0xc0, 0xaf, 0x0a, 0x9d, 0xc0, 0xaf, 0xd9, 0x15, 0x3e, 0x2c, 0xd0, + 0x92, 0x37, 0xfc, 0x2b, 0x62, 0x53, 0xa3, 0x2d, 0x0e, 0xff, 0xf1, 0x29, 0xdb, 0x9c, 0x20, 0x39, + 0xe7, 0xee, 0xfa, 0x82, 0x02, 0x94, 0xc2, 0xbd, 0x56, 0x5e, 0xd9, 0x66, 0x8c, 0x5d, 0x60, 0x8c, + 0x6d, 0x9b, 0xac, 0x59, 0xeb, 0x26, 0x9b, 0x91, 0x52, 0x3b, 0xfa, 0xf8, 0xcf, 0x7a, 0xee, 0x32, + 0x2e, 0x91, 0x20, 0x04, 0x82, 0xf2, 0x52, 0x22, 0xb6, 0x35, 0x41, 0x72, 0x88, 0xff, 0xb6, 0x3d, + 0x47, 0xca, 0xae, 0xfd, 0xf6, 0x40, 0xd1, 0x34, 0x78, 0x7e, 0x7b, 0x7f, 0xed, 0xf4, 0x79, 0xcf, + 0xbd, 0xda, 0xf2, 0x28, 0x7f, 0x16, 0xf1, 0xa8, 0x21, 0xc1, 0x27, 0x1e, 0x31, 0x36, 0x55, 0x36, + 0x5f, 0x62, 0x7f, 0x1e, 0xae, 0x66, 0xad, 0x87, 0x6b, 0x46, 0x8a, 0xca, 0xbe, 0xab, 0xec, 0xf2, + 0xed, 0x6f, 0x95, 0xf6, 0xec, 0xf4, 0xf6, 0x44, 0x2a, 0xba, 0x5f, 0xcc, 0xfd, 0xc0, 0x24, 0xc2, + 0x79, 0x4c, 0x26, 0xf3, 0x0f, 0x51, 0x0d, 0x8f, 0x44, 0x2d, 0xd2, 0xf9, 0xa1, 0x34, 0x62, 0x7d, + 0x3a, 0xe7, 0x1b, 0x6e, 0x98, 0x8e, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x2d, 0xd1, 0xd9, + 0xb8, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -202,3 +210,115 @@ var _AsyncAgentService_serviceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "flyteidl/service/agent.proto", } + +// AgentMetadataServiceClient is the client API for AgentMetadataService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AgentMetadataServiceClient interface { + // Fetch a :ref:`ref_flyteidl.admin.Agent` definition. + GetAgent(ctx context.Context, in *admin.GetAgentRequest, opts ...grpc.CallOption) (*admin.GetAgentResponse, error) + // Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. + ListAgents(ctx context.Context, in *admin.ListAgentsRequest, opts ...grpc.CallOption) (*admin.ListAgentsResponse, error) +} + +type agentMetadataServiceClient struct { + cc *grpc.ClientConn +} + +func NewAgentMetadataServiceClient(cc *grpc.ClientConn) AgentMetadataServiceClient { + return &agentMetadataServiceClient{cc} +} + +func (c *agentMetadataServiceClient) GetAgent(ctx context.Context, in *admin.GetAgentRequest, opts ...grpc.CallOption) (*admin.GetAgentResponse, error) { + out := new(admin.GetAgentResponse) + err := c.cc.Invoke(ctx, "/flyteidl.service.AgentMetadataService/GetAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *agentMetadataServiceClient) ListAgents(ctx context.Context, in *admin.ListAgentsRequest, opts ...grpc.CallOption) (*admin.ListAgentsResponse, error) { + out := new(admin.ListAgentsResponse) + err := c.cc.Invoke(ctx, "/flyteidl.service.AgentMetadataService/ListAgents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AgentMetadataServiceServer is the server API for AgentMetadataService service. +type AgentMetadataServiceServer interface { + // Fetch a :ref:`ref_flyteidl.admin.Agent` definition. + GetAgent(context.Context, *admin.GetAgentRequest) (*admin.GetAgentResponse, error) + // Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. + ListAgents(context.Context, *admin.ListAgentsRequest) (*admin.ListAgentsResponse, error) +} + +// UnimplementedAgentMetadataServiceServer can be embedded to have forward compatible implementations. +type UnimplementedAgentMetadataServiceServer struct { +} + +func (*UnimplementedAgentMetadataServiceServer) GetAgent(ctx context.Context, req *admin.GetAgentRequest) (*admin.GetAgentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAgent not implemented") +} +func (*UnimplementedAgentMetadataServiceServer) ListAgents(ctx context.Context, req *admin.ListAgentsRequest) (*admin.ListAgentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") +} + +func RegisterAgentMetadataServiceServer(s *grpc.Server, srv AgentMetadataServiceServer) { + s.RegisterService(&_AgentMetadataService_serviceDesc, srv) +} + +func _AgentMetadataService_GetAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(admin.GetAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentMetadataServiceServer).GetAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/flyteidl.service.AgentMetadataService/GetAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentMetadataServiceServer).GetAgent(ctx, req.(*admin.GetAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AgentMetadataService_ListAgents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(admin.ListAgentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AgentMetadataServiceServer).ListAgents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/flyteidl.service.AgentMetadataService/ListAgents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AgentMetadataServiceServer).ListAgents(ctx, req.(*admin.ListAgentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AgentMetadataService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "flyteidl.service.AgentMetadataService", + HandlerType: (*AgentMetadataServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAgent", + Handler: _AgentMetadataService_GetAgent_Handler, + }, + { + MethodName: "ListAgents", + Handler: _AgentMetadataService_ListAgents_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "flyteidl/service/agent.proto", +} diff --git a/flyteidl/gen/pb-go/flyteidl/service/agent.pb.gw.go b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.gw.go new file mode 100644 index 0000000000..33e7c2fb7f --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/service/agent.pb.gw.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: flyteidl/service/agent.proto + +/* +Package service is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package service + +import ( + "context" + "io" + "net/http" + + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_AgentMetadataService_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentMetadataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq admin.GetAgentRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_AgentMetadataService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client AgentMetadataServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq admin.ListAgentsRequest + var metadata runtime.ServerMetadata + + msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterAgentMetadataServiceHandlerFromEndpoint is same as RegisterAgentMetadataServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAgentMetadataServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAgentMetadataServiceHandler(ctx, mux, conn) +} + +// RegisterAgentMetadataServiceHandler registers the http handlers for service AgentMetadataService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAgentMetadataServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAgentMetadataServiceHandlerClient(ctx, mux, NewAgentMetadataServiceClient(conn)) +} + +// RegisterAgentMetadataServiceHandlerClient registers the http handlers for service AgentMetadataService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AgentMetadataServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AgentMetadataServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AgentMetadataServiceClient" to call the correct interceptors. +func RegisterAgentMetadataServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentMetadataServiceClient) error { + + mux.Handle("GET", pattern_AgentMetadataService_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AgentMetadataService_GetAgent_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AgentMetadataService_GetAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AgentMetadataService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AgentMetadataService_ListAgents_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AgentMetadataService_ListAgents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_AgentMetadataService_GetAgent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "agent", "name"}, "")) + + pattern_AgentMetadataService_ListAgents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "agents"}, "")) +) + +var ( + forward_AgentMetadataService_GetAgent_0 = runtime.ForwardResponseMessage + + forward_AgentMetadataService_ListAgents_0 = runtime.ForwardResponseMessage +) diff --git a/flyteidl/gen/pb-go/flyteidl/service/agent.swagger.json b/flyteidl/gen/pb-go/flyteidl/service/agent.swagger.json index e623c1b872..623a3ecd94 100644 --- a/flyteidl/gen/pb-go/flyteidl/service/agent.swagger.json +++ b/flyteidl/gen/pb-go/flyteidl/service/agent.swagger.json @@ -14,7 +14,51 @@ "produces": [ "application/json" ], - "paths": {}, + "paths": { + "/api/v1/agent/{name}": { + "get": { + "summary": "Send a task create request to the agent server.", + "operationId": "GetAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminGetAgentResponse" + } + } + }, + "parameters": [ + { + "name": "name", + "description": "The name of the agent.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "AgentMetadataService" + ] + } + }, + "/api/v1/agents": { + "get": { + "summary": "Get job status.", + "operationId": "ListAgents", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/adminListAgentsResponse" + } + } + }, + "tags": [ + "AgentMetadataService" + ] + } + } + }, "definitions": { "BlobTypeBlobDimensionality": { "type": "string", @@ -172,13 +216,32 @@ ], "default": "UNKNOWN" }, + "adminAgent": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name is the developer-assigned name of the agent." + }, + "supported_task_types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "SupportedTaskTypes are the types of the tasks that the agent can handle." + } + }, + "description": "A message containing the agent metadata." + }, "adminCreateTaskResponse": { "type": "object", "properties": { "resource_meta": { "type": "string", - "format": "byte", - "description": "Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata)." + "format": "byte" + }, + "resource": { + "$ref": "#/definitions/adminResource" } }, "description": "Represents a create response structure." @@ -187,6 +250,15 @@ "type": "object", "description": "Response to delete a task." }, + "adminGetAgentResponse": { + "type": "object", + "properties": { + "agent": { + "$ref": "#/definitions/adminAgent" + } + }, + "description": "A response containing an agent." + }, "adminGetTaskResponse": { "type": "object", "properties": { @@ -198,11 +270,23 @@ "items": { "$ref": "#/definitions/coreTaskLog" }, - "description": "log information for the task execution." + "title": "log information for the task execution" } }, "description": "Response to get an individual task resource." }, + "adminListAgentsResponse": { + "type": "object", + "properties": { + "agents": { + "type": "array", + "items": { + "$ref": "#/definitions/adminAgent" + } + } + }, + "description": "A response containing a list of agents." + }, "adminResource": { "type": "object", "properties": { @@ -217,6 +301,13 @@ "message": { "type": "string", "description": "A descriptive message for the current state. e.g. waiting for cluster." + }, + "log_links": { + "type": "array", + "items": { + "$ref": "#/definitions/coreTaskLog" + }, + "description": "log information for the task execution." } } }, diff --git a/flyteidl/gen/pb-java/flyteidl/admin/Agent.java b/flyteidl/gen/pb-java/flyteidl/admin/AgentOuterClass.java similarity index 58% rename from flyteidl/gen/pb-java/flyteidl/admin/Agent.java rename to flyteidl/gen/pb-java/flyteidl/admin/AgentOuterClass.java index b18c298749..f71d1743ff 100644 --- a/flyteidl/gen/pb-java/flyteidl/admin/Agent.java +++ b/flyteidl/gen/pb-java/flyteidl/admin/AgentOuterClass.java @@ -3,8 +3,8 @@ package flyteidl.admin; -public final class Agent { - private Agent() {} +public final class AgentOuterClass { + private AgentOuterClass() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } @@ -117,7 +117,7 @@ public State findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return flyteidl.admin.Agent.getDescriptor().getEnumTypes().get(0); + return flyteidl.admin.AgentOuterClass.getDescriptor().getEnumTypes().get(0); } private static final State[] VALUES = values(); @@ -500,7 +500,7 @@ private TaskExecutionMetadata( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_TaskExecutionMetadata_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_TaskExecutionMetadata_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -522,9 +522,9 @@ protected com.google.protobuf.MapField internalGetMapField( @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_TaskExecutionMetadata_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_TaskExecutionMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.TaskExecutionMetadata.class, flyteidl.admin.Agent.TaskExecutionMetadata.Builder.class); + flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.class, flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.Builder.class); } private int bitField0_; @@ -609,7 +609,7 @@ private static final class LabelsDefaultEntryHolder { java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - flyteidl.admin.Agent.internal_static_flyteidl_admin_TaskExecutionMetadata_LabelsEntry_descriptor, + flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_TaskExecutionMetadata_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, @@ -701,7 +701,7 @@ private static final class AnnotationsDefaultEntryHolder { java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - flyteidl.admin.Agent.internal_static_flyteidl_admin_TaskExecutionMetadata_AnnotationsEntry_descriptor, + flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_TaskExecutionMetadata_AnnotationsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, @@ -835,7 +835,7 @@ private static final class EnvironmentVariablesDefaultEntryHolder { java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - flyteidl.admin.Agent.internal_static_flyteidl_admin_TaskExecutionMetadata_EnvironmentVariablesEntry_descriptor, + flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_TaskExecutionMetadata_EnvironmentVariablesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, @@ -1021,10 +1021,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof flyteidl.admin.Agent.TaskExecutionMetadata)) { + if (!(obj instanceof flyteidl.admin.AgentOuterClass.TaskExecutionMetadata)) { return super.equals(obj); } - flyteidl.admin.Agent.TaskExecutionMetadata other = (flyteidl.admin.Agent.TaskExecutionMetadata) obj; + flyteidl.admin.AgentOuterClass.TaskExecutionMetadata other = (flyteidl.admin.AgentOuterClass.TaskExecutionMetadata) obj; if (hasTaskExecutionId() != other.hasTaskExecutionId()) return false; if (hasTaskExecutionId()) { @@ -1077,69 +1077,69 @@ public int hashCode() { return hash; } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom(byte[] data) + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseDelimitedFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseDelimitedFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1152,7 +1152,7 @@ public static flyteidl.admin.Agent.TaskExecutionMetadata parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(flyteidl.admin.Agent.TaskExecutionMetadata prototype) { + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.TaskExecutionMetadata prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -1177,10 +1177,10 @@ protected Builder newBuilderForType( public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:flyteidl.admin.TaskExecutionMetadata) - flyteidl.admin.Agent.TaskExecutionMetadataOrBuilder { + flyteidl.admin.AgentOuterClass.TaskExecutionMetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_TaskExecutionMetadata_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_TaskExecutionMetadata_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -1216,12 +1216,12 @@ protected com.google.protobuf.MapField internalGetMutableMapField( @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_TaskExecutionMetadata_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_TaskExecutionMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.TaskExecutionMetadata.class, flyteidl.admin.Agent.TaskExecutionMetadata.Builder.class); + flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.class, flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.Builder.class); } - // Construct using flyteidl.admin.Agent.TaskExecutionMetadata.newBuilder() + // Construct using flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1258,17 +1258,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_TaskExecutionMetadata_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_TaskExecutionMetadata_descriptor; } @java.lang.Override - public flyteidl.admin.Agent.TaskExecutionMetadata getDefaultInstanceForType() { - return flyteidl.admin.Agent.TaskExecutionMetadata.getDefaultInstance(); + public flyteidl.admin.AgentOuterClass.TaskExecutionMetadata getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.getDefaultInstance(); } @java.lang.Override - public flyteidl.admin.Agent.TaskExecutionMetadata build() { - flyteidl.admin.Agent.TaskExecutionMetadata result = buildPartial(); + public flyteidl.admin.AgentOuterClass.TaskExecutionMetadata build() { + flyteidl.admin.AgentOuterClass.TaskExecutionMetadata result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1276,8 +1276,8 @@ public flyteidl.admin.Agent.TaskExecutionMetadata build() { } @java.lang.Override - public flyteidl.admin.Agent.TaskExecutionMetadata buildPartial() { - flyteidl.admin.Agent.TaskExecutionMetadata result = new flyteidl.admin.Agent.TaskExecutionMetadata(this); + public flyteidl.admin.AgentOuterClass.TaskExecutionMetadata buildPartial() { + flyteidl.admin.AgentOuterClass.TaskExecutionMetadata result = new flyteidl.admin.AgentOuterClass.TaskExecutionMetadata(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (taskExecutionIdBuilder_ == null) { @@ -1332,16 +1332,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof flyteidl.admin.Agent.TaskExecutionMetadata) { - return mergeFrom((flyteidl.admin.Agent.TaskExecutionMetadata)other); + if (other instanceof flyteidl.admin.AgentOuterClass.TaskExecutionMetadata) { + return mergeFrom((flyteidl.admin.AgentOuterClass.TaskExecutionMetadata)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(flyteidl.admin.Agent.TaskExecutionMetadata other) { - if (other == flyteidl.admin.Agent.TaskExecutionMetadata.getDefaultInstance()) return this; + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.TaskExecutionMetadata other) { + if (other == flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.getDefaultInstance()) return this; if (other.hasTaskExecutionId()) { mergeTaskExecutionId(other.getTaskExecutionId()); } @@ -1374,11 +1374,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - flyteidl.admin.Agent.TaskExecutionMetadata parsedMessage = null; + flyteidl.admin.AgentOuterClass.TaskExecutionMetadata parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (flyteidl.admin.Agent.TaskExecutionMetadata) e.getUnfinishedMessage(); + parsedMessage = (flyteidl.admin.AgentOuterClass.TaskExecutionMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -2189,12 +2189,12 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:flyteidl.admin.TaskExecutionMetadata) - private static final flyteidl.admin.Agent.TaskExecutionMetadata DEFAULT_INSTANCE; + private static final flyteidl.admin.AgentOuterClass.TaskExecutionMetadata DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new flyteidl.admin.Agent.TaskExecutionMetadata(); + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.TaskExecutionMetadata(); } - public static flyteidl.admin.Agent.TaskExecutionMetadata getDefaultInstance() { + public static flyteidl.admin.AgentOuterClass.TaskExecutionMetadata getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -2219,7 +2219,7 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public flyteidl.admin.Agent.TaskExecutionMetadata getDefaultInstanceForType() { + public flyteidl.admin.AgentOuterClass.TaskExecutionMetadata getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -2318,7 +2318,7 @@ public interface CreateTaskRequestOrBuilder extends * * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4; */ - flyteidl.admin.Agent.TaskExecutionMetadata getTaskExecutionMetadata(); + flyteidl.admin.AgentOuterClass.TaskExecutionMetadata getTaskExecutionMetadata(); /** *
      * subset of runtime task execution metadata.
@@ -2326,7 +2326,7 @@ public interface CreateTaskRequestOrBuilder extends
      *
      * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
      */
-    flyteidl.admin.Agent.TaskExecutionMetadataOrBuilder getTaskExecutionMetadataOrBuilder();
+    flyteidl.admin.AgentOuterClass.TaskExecutionMetadataOrBuilder getTaskExecutionMetadataOrBuilder();
   }
   /**
    * 
@@ -2405,11 +2405,11 @@ private CreateTaskRequest(
               break;
             }
             case 34: {
-              flyteidl.admin.Agent.TaskExecutionMetadata.Builder subBuilder = null;
+              flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.Builder subBuilder = null;
               if (taskExecutionMetadata_ != null) {
                 subBuilder = taskExecutionMetadata_.toBuilder();
               }
-              taskExecutionMetadata_ = input.readMessage(flyteidl.admin.Agent.TaskExecutionMetadata.parser(), extensionRegistry);
+              taskExecutionMetadata_ = input.readMessage(flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.parser(), extensionRegistry);
               if (subBuilder != null) {
                 subBuilder.mergeFrom(taskExecutionMetadata_);
                 taskExecutionMetadata_ = subBuilder.buildPartial();
@@ -2438,15 +2438,15 @@ private CreateTaskRequest(
     }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
-      return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskRequest_descriptor;
+      return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskRequest_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskRequest_fieldAccessorTable
+      return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskRequest_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              flyteidl.admin.Agent.CreateTaskRequest.class, flyteidl.admin.Agent.CreateTaskRequest.Builder.class);
+              flyteidl.admin.AgentOuterClass.CreateTaskRequest.class, flyteidl.admin.AgentOuterClass.CreateTaskRequest.Builder.class);
     }
 
     public static final int INPUTS_FIELD_NUMBER = 1;
@@ -2564,7 +2564,7 @@ public java.lang.String getOutputPrefix() {
     }
 
     public static final int TASK_EXECUTION_METADATA_FIELD_NUMBER = 4;
-    private flyteidl.admin.Agent.TaskExecutionMetadata taskExecutionMetadata_;
+    private flyteidl.admin.AgentOuterClass.TaskExecutionMetadata taskExecutionMetadata_;
     /**
      * 
      * subset of runtime task execution metadata.
@@ -2582,8 +2582,8 @@ public boolean hasTaskExecutionMetadata() {
      *
      * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
      */
-    public flyteidl.admin.Agent.TaskExecutionMetadata getTaskExecutionMetadata() {
-      return taskExecutionMetadata_ == null ? flyteidl.admin.Agent.TaskExecutionMetadata.getDefaultInstance() : taskExecutionMetadata_;
+    public flyteidl.admin.AgentOuterClass.TaskExecutionMetadata getTaskExecutionMetadata() {
+      return taskExecutionMetadata_ == null ? flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.getDefaultInstance() : taskExecutionMetadata_;
     }
     /**
      * 
@@ -2592,7 +2592,7 @@ public flyteidl.admin.Agent.TaskExecutionMetadata getTaskExecutionMetadata() {
      *
      * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
      */
-    public flyteidl.admin.Agent.TaskExecutionMetadataOrBuilder getTaskExecutionMetadataOrBuilder() {
+    public flyteidl.admin.AgentOuterClass.TaskExecutionMetadataOrBuilder getTaskExecutionMetadataOrBuilder() {
       return getTaskExecutionMetadata();
     }
 
@@ -2656,10 +2656,10 @@ public boolean equals(final java.lang.Object obj) {
       if (obj == this) {
        return true;
       }
-      if (!(obj instanceof flyteidl.admin.Agent.CreateTaskRequest)) {
+      if (!(obj instanceof flyteidl.admin.AgentOuterClass.CreateTaskRequest)) {
         return super.equals(obj);
       }
-      flyteidl.admin.Agent.CreateTaskRequest other = (flyteidl.admin.Agent.CreateTaskRequest) obj;
+      flyteidl.admin.AgentOuterClass.CreateTaskRequest other = (flyteidl.admin.AgentOuterClass.CreateTaskRequest) obj;
 
       if (hasInputs() != other.hasInputs()) return false;
       if (hasInputs()) {
@@ -2708,69 +2708,69 @@ public int hashCode() {
       return hash;
     }
 
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(
         java.nio.ByteBuffer data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(
         java.nio.ByteBuffer data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(byte[] data)
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(java.io.InputStream input)
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseDelimitedFrom(java.io.InputStream input)
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseDelimitedFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input);
     }
-    public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
@@ -2783,7 +2783,7 @@ public static flyteidl.admin.Agent.CreateTaskRequest parseFrom(
     public static Builder newBuilder() {
       return DEFAULT_INSTANCE.toBuilder();
     }
-    public static Builder newBuilder(flyteidl.admin.Agent.CreateTaskRequest prototype) {
+    public static Builder newBuilder(flyteidl.admin.AgentOuterClass.CreateTaskRequest prototype) {
       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
     }
     @java.lang.Override
@@ -2808,21 +2808,21 @@ protected Builder newBuilderForType(
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageV3.Builder implements
         // @@protoc_insertion_point(builder_implements:flyteidl.admin.CreateTaskRequest)
-        flyteidl.admin.Agent.CreateTaskRequestOrBuilder {
+        flyteidl.admin.AgentOuterClass.CreateTaskRequestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
-        return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskRequest_descriptor;
+        return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskRequest_descriptor;
       }
 
       @java.lang.Override
       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
           internalGetFieldAccessorTable() {
-        return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskRequest_fieldAccessorTable
+        return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskRequest_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                flyteidl.admin.Agent.CreateTaskRequest.class, flyteidl.admin.Agent.CreateTaskRequest.Builder.class);
+                flyteidl.admin.AgentOuterClass.CreateTaskRequest.class, flyteidl.admin.AgentOuterClass.CreateTaskRequest.Builder.class);
       }
 
-      // Construct using flyteidl.admin.Agent.CreateTaskRequest.newBuilder()
+      // Construct using flyteidl.admin.AgentOuterClass.CreateTaskRequest.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
@@ -2866,17 +2866,17 @@ public Builder clear() {
       @java.lang.Override
       public com.google.protobuf.Descriptors.Descriptor
           getDescriptorForType() {
-        return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskRequest_descriptor;
+        return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskRequest_descriptor;
       }
 
       @java.lang.Override
-      public flyteidl.admin.Agent.CreateTaskRequest getDefaultInstanceForType() {
-        return flyteidl.admin.Agent.CreateTaskRequest.getDefaultInstance();
+      public flyteidl.admin.AgentOuterClass.CreateTaskRequest getDefaultInstanceForType() {
+        return flyteidl.admin.AgentOuterClass.CreateTaskRequest.getDefaultInstance();
       }
 
       @java.lang.Override
-      public flyteidl.admin.Agent.CreateTaskRequest build() {
-        flyteidl.admin.Agent.CreateTaskRequest result = buildPartial();
+      public flyteidl.admin.AgentOuterClass.CreateTaskRequest build() {
+        flyteidl.admin.AgentOuterClass.CreateTaskRequest result = buildPartial();
         if (!result.isInitialized()) {
           throw newUninitializedMessageException(result);
         }
@@ -2884,8 +2884,8 @@ public flyteidl.admin.Agent.CreateTaskRequest build() {
       }
 
       @java.lang.Override
-      public flyteidl.admin.Agent.CreateTaskRequest buildPartial() {
-        flyteidl.admin.Agent.CreateTaskRequest result = new flyteidl.admin.Agent.CreateTaskRequest(this);
+      public flyteidl.admin.AgentOuterClass.CreateTaskRequest buildPartial() {
+        flyteidl.admin.AgentOuterClass.CreateTaskRequest result = new flyteidl.admin.AgentOuterClass.CreateTaskRequest(this);
         if (inputsBuilder_ == null) {
           result.inputs_ = inputs_;
         } else {
@@ -2940,16 +2940,16 @@ public Builder addRepeatedField(
       }
       @java.lang.Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof flyteidl.admin.Agent.CreateTaskRequest) {
-          return mergeFrom((flyteidl.admin.Agent.CreateTaskRequest)other);
+        if (other instanceof flyteidl.admin.AgentOuterClass.CreateTaskRequest) {
+          return mergeFrom((flyteidl.admin.AgentOuterClass.CreateTaskRequest)other);
         } else {
           super.mergeFrom(other);
           return this;
         }
       }
 
-      public Builder mergeFrom(flyteidl.admin.Agent.CreateTaskRequest other) {
-        if (other == flyteidl.admin.Agent.CreateTaskRequest.getDefaultInstance()) return this;
+      public Builder mergeFrom(flyteidl.admin.AgentOuterClass.CreateTaskRequest other) {
+        if (other == flyteidl.admin.AgentOuterClass.CreateTaskRequest.getDefaultInstance()) return this;
         if (other.hasInputs()) {
           mergeInputs(other.getInputs());
         }
@@ -2978,11 +2978,11 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        flyteidl.admin.Agent.CreateTaskRequest parsedMessage = null;
+        flyteidl.admin.AgentOuterClass.CreateTaskRequest parsedMessage = null;
         try {
           parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (flyteidl.admin.Agent.CreateTaskRequest) e.getUnfinishedMessage();
+          parsedMessage = (flyteidl.admin.AgentOuterClass.CreateTaskRequest) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
           if (parsedMessage != null) {
@@ -3405,9 +3405,9 @@ public Builder setOutputPrefixBytes(
         return this;
       }
 
-      private flyteidl.admin.Agent.TaskExecutionMetadata taskExecutionMetadata_;
+      private flyteidl.admin.AgentOuterClass.TaskExecutionMetadata taskExecutionMetadata_;
       private com.google.protobuf.SingleFieldBuilderV3<
-          flyteidl.admin.Agent.TaskExecutionMetadata, flyteidl.admin.Agent.TaskExecutionMetadata.Builder, flyteidl.admin.Agent.TaskExecutionMetadataOrBuilder> taskExecutionMetadataBuilder_;
+          flyteidl.admin.AgentOuterClass.TaskExecutionMetadata, flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.Builder, flyteidl.admin.AgentOuterClass.TaskExecutionMetadataOrBuilder> taskExecutionMetadataBuilder_;
       /**
        * 
        * subset of runtime task execution metadata.
@@ -3425,9 +3425,9 @@ public boolean hasTaskExecutionMetadata() {
        *
        * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
        */
-      public flyteidl.admin.Agent.TaskExecutionMetadata getTaskExecutionMetadata() {
+      public flyteidl.admin.AgentOuterClass.TaskExecutionMetadata getTaskExecutionMetadata() {
         if (taskExecutionMetadataBuilder_ == null) {
-          return taskExecutionMetadata_ == null ? flyteidl.admin.Agent.TaskExecutionMetadata.getDefaultInstance() : taskExecutionMetadata_;
+          return taskExecutionMetadata_ == null ? flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.getDefaultInstance() : taskExecutionMetadata_;
         } else {
           return taskExecutionMetadataBuilder_.getMessage();
         }
@@ -3439,7 +3439,7 @@ public flyteidl.admin.Agent.TaskExecutionMetadata getTaskExecutionMetadata() {
        *
        * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
        */
-      public Builder setTaskExecutionMetadata(flyteidl.admin.Agent.TaskExecutionMetadata value) {
+      public Builder setTaskExecutionMetadata(flyteidl.admin.AgentOuterClass.TaskExecutionMetadata value) {
         if (taskExecutionMetadataBuilder_ == null) {
           if (value == null) {
             throw new NullPointerException();
@@ -3460,7 +3460,7 @@ public Builder setTaskExecutionMetadata(flyteidl.admin.Agent.TaskExecutionMetada
        * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
        */
       public Builder setTaskExecutionMetadata(
-          flyteidl.admin.Agent.TaskExecutionMetadata.Builder builderForValue) {
+          flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.Builder builderForValue) {
         if (taskExecutionMetadataBuilder_ == null) {
           taskExecutionMetadata_ = builderForValue.build();
           onChanged();
@@ -3477,11 +3477,11 @@ public Builder setTaskExecutionMetadata(
        *
        * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
        */
-      public Builder mergeTaskExecutionMetadata(flyteidl.admin.Agent.TaskExecutionMetadata value) {
+      public Builder mergeTaskExecutionMetadata(flyteidl.admin.AgentOuterClass.TaskExecutionMetadata value) {
         if (taskExecutionMetadataBuilder_ == null) {
           if (taskExecutionMetadata_ != null) {
             taskExecutionMetadata_ =
-              flyteidl.admin.Agent.TaskExecutionMetadata.newBuilder(taskExecutionMetadata_).mergeFrom(value).buildPartial();
+              flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.newBuilder(taskExecutionMetadata_).mergeFrom(value).buildPartial();
           } else {
             taskExecutionMetadata_ = value;
           }
@@ -3517,7 +3517,7 @@ public Builder clearTaskExecutionMetadata() {
        *
        * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
        */
-      public flyteidl.admin.Agent.TaskExecutionMetadata.Builder getTaskExecutionMetadataBuilder() {
+      public flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.Builder getTaskExecutionMetadataBuilder() {
         
         onChanged();
         return getTaskExecutionMetadataFieldBuilder().getBuilder();
@@ -3529,12 +3529,12 @@ public flyteidl.admin.Agent.TaskExecutionMetadata.Builder getTaskExecutionMetada
        *
        * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
        */
-      public flyteidl.admin.Agent.TaskExecutionMetadataOrBuilder getTaskExecutionMetadataOrBuilder() {
+      public flyteidl.admin.AgentOuterClass.TaskExecutionMetadataOrBuilder getTaskExecutionMetadataOrBuilder() {
         if (taskExecutionMetadataBuilder_ != null) {
           return taskExecutionMetadataBuilder_.getMessageOrBuilder();
         } else {
           return taskExecutionMetadata_ == null ?
-              flyteidl.admin.Agent.TaskExecutionMetadata.getDefaultInstance() : taskExecutionMetadata_;
+              flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.getDefaultInstance() : taskExecutionMetadata_;
         }
       }
       /**
@@ -3545,11 +3545,11 @@ public flyteidl.admin.Agent.TaskExecutionMetadataOrBuilder getTaskExecutionMetad
        * .flyteidl.admin.TaskExecutionMetadata task_execution_metadata = 4;
        */
       private com.google.protobuf.SingleFieldBuilderV3<
-          flyteidl.admin.Agent.TaskExecutionMetadata, flyteidl.admin.Agent.TaskExecutionMetadata.Builder, flyteidl.admin.Agent.TaskExecutionMetadataOrBuilder> 
+          flyteidl.admin.AgentOuterClass.TaskExecutionMetadata, flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.Builder, flyteidl.admin.AgentOuterClass.TaskExecutionMetadataOrBuilder> 
           getTaskExecutionMetadataFieldBuilder() {
         if (taskExecutionMetadataBuilder_ == null) {
           taskExecutionMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-              flyteidl.admin.Agent.TaskExecutionMetadata, flyteidl.admin.Agent.TaskExecutionMetadata.Builder, flyteidl.admin.Agent.TaskExecutionMetadataOrBuilder>(
+              flyteidl.admin.AgentOuterClass.TaskExecutionMetadata, flyteidl.admin.AgentOuterClass.TaskExecutionMetadata.Builder, flyteidl.admin.AgentOuterClass.TaskExecutionMetadataOrBuilder>(
                   getTaskExecutionMetadata(),
                   getParentForChildren(),
                   isClean());
@@ -3574,12 +3574,12 @@ public final Builder mergeUnknownFields(
     }
 
     // @@protoc_insertion_point(class_scope:flyteidl.admin.CreateTaskRequest)
-    private static final flyteidl.admin.Agent.CreateTaskRequest DEFAULT_INSTANCE;
+    private static final flyteidl.admin.AgentOuterClass.CreateTaskRequest DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new flyteidl.admin.Agent.CreateTaskRequest();
+      DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.CreateTaskRequest();
     }
 
-    public static flyteidl.admin.Agent.CreateTaskRequest getDefaultInstance() {
+    public static flyteidl.admin.AgentOuterClass.CreateTaskRequest getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
@@ -3604,7 +3604,7 @@ public com.google.protobuf.Parser getParserForType() {
     }
 
     @java.lang.Override
-    public flyteidl.admin.Agent.CreateTaskRequest getDefaultInstanceForType() {
+    public flyteidl.admin.AgentOuterClass.CreateTaskRequest getDefaultInstanceForType() {
       return DEFAULT_INSTANCE;
     }
 
@@ -3615,13 +3615,24 @@ public interface CreateTaskResponseOrBuilder extends
       com.google.protobuf.MessageOrBuilder {
 
     /**
-     * 
-     * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata).
-     * 
- * * bytes resource_meta = 1; */ com.google.protobuf.ByteString getResourceMeta(); + + /** + * .flyteidl.admin.Resource resource = 2; + */ + boolean hasResource(); + /** + * .flyteidl.admin.Resource resource = 2; + */ + flyteidl.admin.AgentOuterClass.Resource getResource(); + /** + * .flyteidl.admin.Resource resource = 2; + */ + flyteidl.admin.AgentOuterClass.ResourceOrBuilder getResourceOrBuilder(); + + public flyteidl.admin.AgentOuterClass.CreateTaskResponse.ResCase getResCase(); } /** *
@@ -3640,7 +3651,6 @@ private CreateTaskResponse(com.google.protobuf.GeneratedMessageV3.Builder bui
       super(builder);
     }
     private CreateTaskResponse() {
-      resourceMeta_ = com.google.protobuf.ByteString.EMPTY;
     }
 
     @java.lang.Override
@@ -3668,8 +3678,22 @@ private CreateTaskResponse(
               done = true;
               break;
             case 10: {
-
-              resourceMeta_ = input.readBytes();
+              resCase_ = 1;
+              res_ = input.readBytes();
+              break;
+            }
+            case 18: {
+              flyteidl.admin.AgentOuterClass.Resource.Builder subBuilder = null;
+              if (resCase_ == 2) {
+                subBuilder = ((flyteidl.admin.AgentOuterClass.Resource) res_).toBuilder();
+              }
+              res_ =
+                  input.readMessage(flyteidl.admin.AgentOuterClass.Resource.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom((flyteidl.admin.AgentOuterClass.Resource) res_);
+                res_ = subBuilder.buildPartial();
+              }
+              resCase_ = 2;
               break;
             }
             default: {
@@ -3693,28 +3717,90 @@ private CreateTaskResponse(
     }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
-      return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskResponse_descriptor;
+      return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskResponse_descriptor;
     }
 
     @java.lang.Override
     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
         internalGetFieldAccessorTable() {
-      return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskResponse_fieldAccessorTable
+      return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskResponse_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              flyteidl.admin.Agent.CreateTaskResponse.class, flyteidl.admin.Agent.CreateTaskResponse.Builder.class);
+              flyteidl.admin.AgentOuterClass.CreateTaskResponse.class, flyteidl.admin.AgentOuterClass.CreateTaskResponse.Builder.class);
+    }
+
+    private int resCase_ = 0;
+    private java.lang.Object res_;
+    public enum ResCase
+        implements com.google.protobuf.Internal.EnumLite {
+      RESOURCE_META(1),
+      RESOURCE(2),
+      RES_NOT_SET(0);
+      private final int value;
+      private ResCase(int value) {
+        this.value = value;
+      }
+      /**
+       * @deprecated Use {@link #forNumber(int)} instead.
+       */
+      @java.lang.Deprecated
+      public static ResCase valueOf(int value) {
+        return forNumber(value);
+      }
+
+      public static ResCase forNumber(int value) {
+        switch (value) {
+          case 1: return RESOURCE_META;
+          case 2: return RESOURCE;
+          case 0: return RES_NOT_SET;
+          default: return null;
+        }
+      }
+      public int getNumber() {
+        return this.value;
+      }
+    };
+
+    public ResCase
+    getResCase() {
+      return ResCase.forNumber(
+          resCase_);
     }
 
     public static final int RESOURCE_META_FIELD_NUMBER = 1;
-    private com.google.protobuf.ByteString resourceMeta_;
     /**
-     * 
-     * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata).
-     * 
- * * bytes resource_meta = 1; */ public com.google.protobuf.ByteString getResourceMeta() { - return resourceMeta_; + if (resCase_ == 1) { + return (com.google.protobuf.ByteString) res_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + /** + * .flyteidl.admin.Resource resource = 2; + */ + public boolean hasResource() { + return resCase_ == 2; + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public flyteidl.admin.AgentOuterClass.Resource getResource() { + if (resCase_ == 2) { + return (flyteidl.admin.AgentOuterClass.Resource) res_; + } + return flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance(); + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public flyteidl.admin.AgentOuterClass.ResourceOrBuilder getResourceOrBuilder() { + if (resCase_ == 2) { + return (flyteidl.admin.AgentOuterClass.Resource) res_; + } + return flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -3731,8 +3817,12 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!resourceMeta_.isEmpty()) { - output.writeBytes(1, resourceMeta_); + if (resCase_ == 1) { + output.writeBytes( + 1, (com.google.protobuf.ByteString) res_); + } + if (resCase_ == 2) { + output.writeMessage(2, (flyteidl.admin.AgentOuterClass.Resource) res_); } unknownFields.writeTo(output); } @@ -3743,9 +3833,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!resourceMeta_.isEmpty()) { + if (resCase_ == 1) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, resourceMeta_); + .computeBytesSize( + 1, (com.google.protobuf.ByteString) res_); + } + if (resCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (flyteidl.admin.AgentOuterClass.Resource) res_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -3757,13 +3852,24 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof flyteidl.admin.Agent.CreateTaskResponse)) { + if (!(obj instanceof flyteidl.admin.AgentOuterClass.CreateTaskResponse)) { return super.equals(obj); } - flyteidl.admin.Agent.CreateTaskResponse other = (flyteidl.admin.Agent.CreateTaskResponse) obj; - - if (!getResourceMeta() - .equals(other.getResourceMeta())) return false; + flyteidl.admin.AgentOuterClass.CreateTaskResponse other = (flyteidl.admin.AgentOuterClass.CreateTaskResponse) obj; + + if (!getResCase().equals(other.getResCase())) return false; + switch (resCase_) { + case 1: + if (!getResourceMeta() + .equals(other.getResourceMeta())) return false; + break; + case 2: + if (!getResource() + .equals(other.getResource())) return false; + break; + case 0: + default: + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3775,76 +3881,86 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_META_FIELD_NUMBER; - hash = (53 * hash) + getResourceMeta().hashCode(); + switch (resCase_) { + case 1: + hash = (37 * hash) + RESOURCE_META_FIELD_NUMBER; + hash = (53 * hash) + getResourceMeta().hashCode(); + break; + case 2: + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom(byte[] data) + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.CreateTaskResponse parseDelimitedFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.CreateTaskResponse parseDelimitedFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3857,7 +3973,7 @@ public static flyteidl.admin.Agent.CreateTaskResponse parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(flyteidl.admin.Agent.CreateTaskResponse prototype) { + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.CreateTaskResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -3882,21 +3998,21 @@ protected Builder newBuilderForType( public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:flyteidl.admin.CreateTaskResponse) - flyteidl.admin.Agent.CreateTaskResponseOrBuilder { + flyteidl.admin.AgentOuterClass.CreateTaskResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskResponse_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskResponse_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.CreateTaskResponse.class, flyteidl.admin.Agent.CreateTaskResponse.Builder.class); + flyteidl.admin.AgentOuterClass.CreateTaskResponse.class, flyteidl.admin.AgentOuterClass.CreateTaskResponse.Builder.class); } - // Construct using flyteidl.admin.Agent.CreateTaskResponse.newBuilder() + // Construct using flyteidl.admin.AgentOuterClass.CreateTaskResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3914,25 +4030,25 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - resourceMeta_ = com.google.protobuf.ByteString.EMPTY; - + resCase_ = 0; + res_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_CreateTaskResponse_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_CreateTaskResponse_descriptor; } @java.lang.Override - public flyteidl.admin.Agent.CreateTaskResponse getDefaultInstanceForType() { - return flyteidl.admin.Agent.CreateTaskResponse.getDefaultInstance(); + public flyteidl.admin.AgentOuterClass.CreateTaskResponse getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.CreateTaskResponse.getDefaultInstance(); } @java.lang.Override - public flyteidl.admin.Agent.CreateTaskResponse build() { - flyteidl.admin.Agent.CreateTaskResponse result = buildPartial(); + public flyteidl.admin.AgentOuterClass.CreateTaskResponse build() { + flyteidl.admin.AgentOuterClass.CreateTaskResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -3940,9 +4056,19 @@ public flyteidl.admin.Agent.CreateTaskResponse build() { } @java.lang.Override - public flyteidl.admin.Agent.CreateTaskResponse buildPartial() { - flyteidl.admin.Agent.CreateTaskResponse result = new flyteidl.admin.Agent.CreateTaskResponse(this); - result.resourceMeta_ = resourceMeta_; + public flyteidl.admin.AgentOuterClass.CreateTaskResponse buildPartial() { + flyteidl.admin.AgentOuterClass.CreateTaskResponse result = new flyteidl.admin.AgentOuterClass.CreateTaskResponse(this); + if (resCase_ == 1) { + result.res_ = res_; + } + if (resCase_ == 2) { + if (resourceBuilder_ == null) { + result.res_ = res_; + } else { + result.res_ = resourceBuilder_.build(); + } + } + result.resCase_ = resCase_; onBuilt(); return result; } @@ -3981,18 +4107,28 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof flyteidl.admin.Agent.CreateTaskResponse) { - return mergeFrom((flyteidl.admin.Agent.CreateTaskResponse)other); + if (other instanceof flyteidl.admin.AgentOuterClass.CreateTaskResponse) { + return mergeFrom((flyteidl.admin.AgentOuterClass.CreateTaskResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(flyteidl.admin.Agent.CreateTaskResponse other) { - if (other == flyteidl.admin.Agent.CreateTaskResponse.getDefaultInstance()) return this; - if (other.getResourceMeta() != com.google.protobuf.ByteString.EMPTY) { - setResourceMeta(other.getResourceMeta()); + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.CreateTaskResponse other) { + if (other == flyteidl.admin.AgentOuterClass.CreateTaskResponse.getDefaultInstance()) return this; + switch (other.getResCase()) { + case RESOURCE_META: { + setResourceMeta(other.getResourceMeta()); + break; + } + case RESOURCE: { + mergeResource(other.getResource()); + break; + } + case RES_NOT_SET: { + break; + } } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -4009,11 +4145,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - flyteidl.admin.Agent.CreateTaskResponse parsedMessage = null; + flyteidl.admin.AgentOuterClass.CreateTaskResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (flyteidl.admin.Agent.CreateTaskResponse) e.getUnfinishedMessage(); + parsedMessage = (flyteidl.admin.AgentOuterClass.CreateTaskResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -4022,47 +4158,190 @@ public Builder mergeFrom( } return this; } + private int resCase_ = 0; + private java.lang.Object res_; + public ResCase + getResCase() { + return ResCase.forNumber( + resCase_); + } + + public Builder clearRes() { + resCase_ = 0; + res_ = null; + onChanged(); + return this; + } + - private com.google.protobuf.ByteString resourceMeta_ = com.google.protobuf.ByteString.EMPTY; /** - *
-       * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata).
-       * 
- * * bytes resource_meta = 1; */ public com.google.protobuf.ByteString getResourceMeta() { - return resourceMeta_; + if (resCase_ == 1) { + return (com.google.protobuf.ByteString) res_; + } + return com.google.protobuf.ByteString.EMPTY; } /** - *
-       * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata).
-       * 
- * * bytes resource_meta = 1; */ public Builder setResourceMeta(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - - resourceMeta_ = value; + resCase_ = 1; + res_ = value; onChanged(); return this; } /** - *
-       * Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata).
-       * 
- * * bytes resource_meta = 1; */ public Builder clearResourceMeta() { - - resourceMeta_ = getDefaultInstance().getResourceMeta(); - onChanged(); + if (resCase_ == 1) { + resCase_ = 0; + res_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Resource, flyteidl.admin.AgentOuterClass.Resource.Builder, flyteidl.admin.AgentOuterClass.ResourceOrBuilder> resourceBuilder_; + /** + * .flyteidl.admin.Resource resource = 2; + */ + public boolean hasResource() { + return resCase_ == 2; + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public flyteidl.admin.AgentOuterClass.Resource getResource() { + if (resourceBuilder_ == null) { + if (resCase_ == 2) { + return (flyteidl.admin.AgentOuterClass.Resource) res_; + } + return flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance(); + } else { + if (resCase_ == 2) { + return resourceBuilder_.getMessage(); + } + return flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance(); + } + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public Builder setResource(flyteidl.admin.AgentOuterClass.Resource value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + res_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + resCase_ = 2; + return this; + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public Builder setResource( + flyteidl.admin.AgentOuterClass.Resource.Builder builderForValue) { + if (resourceBuilder_ == null) { + res_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + resCase_ = 2; + return this; + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public Builder mergeResource(flyteidl.admin.AgentOuterClass.Resource value) { + if (resourceBuilder_ == null) { + if (resCase_ == 2 && + res_ != flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance()) { + res_ = flyteidl.admin.AgentOuterClass.Resource.newBuilder((flyteidl.admin.AgentOuterClass.Resource) res_) + .mergeFrom(value).buildPartial(); + } else { + res_ = value; + } + onChanged(); + } else { + if (resCase_ == 2) { + resourceBuilder_.mergeFrom(value); + } + resourceBuilder_.setMessage(value); + } + resCase_ = 2; + return this; + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + if (resCase_ == 2) { + resCase_ = 0; + res_ = null; + onChanged(); + } + } else { + if (resCase_ == 2) { + resCase_ = 0; + res_ = null; + } + resourceBuilder_.clear(); + } return this; } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public flyteidl.admin.AgentOuterClass.Resource.Builder getResourceBuilder() { + return getResourceFieldBuilder().getBuilder(); + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + public flyteidl.admin.AgentOuterClass.ResourceOrBuilder getResourceOrBuilder() { + if ((resCase_ == 2) && (resourceBuilder_ != null)) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + if (resCase_ == 2) { + return (flyteidl.admin.AgentOuterClass.Resource) res_; + } + return flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance(); + } + } + /** + * .flyteidl.admin.Resource resource = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Resource, flyteidl.admin.AgentOuterClass.Resource.Builder, flyteidl.admin.AgentOuterClass.ResourceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + if (!(resCase_ == 2)) { + res_ = flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance(); + } + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Resource, flyteidl.admin.AgentOuterClass.Resource.Builder, flyteidl.admin.AgentOuterClass.ResourceOrBuilder>( + (flyteidl.admin.AgentOuterClass.Resource) res_, + getParentForChildren(), + isClean()); + res_ = null; + } + resCase_ = 2; + onChanged();; + return resourceBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4080,12 +4359,12 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:flyteidl.admin.CreateTaskResponse) - private static final flyteidl.admin.Agent.CreateTaskResponse DEFAULT_INSTANCE; + private static final flyteidl.admin.AgentOuterClass.CreateTaskResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new flyteidl.admin.Agent.CreateTaskResponse(); + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.CreateTaskResponse(); } - public static flyteidl.admin.Agent.CreateTaskResponse getDefaultInstance() { + public static flyteidl.admin.AgentOuterClass.CreateTaskResponse getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -4110,7 +4389,7 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public flyteidl.admin.Agent.CreateTaskResponse getDefaultInstanceForType() { + public flyteidl.admin.AgentOuterClass.CreateTaskResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -4224,15 +4503,15 @@ private GetTaskRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskRequest_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskRequest_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.GetTaskRequest.class, flyteidl.admin.Agent.GetTaskRequest.Builder.class); + flyteidl.admin.AgentOuterClass.GetTaskRequest.class, flyteidl.admin.AgentOuterClass.GetTaskRequest.Builder.class); } public static final int TASK_TYPE_FIELD_NUMBER = 1; @@ -4336,10 +4615,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof flyteidl.admin.Agent.GetTaskRequest)) { + if (!(obj instanceof flyteidl.admin.AgentOuterClass.GetTaskRequest)) { return super.equals(obj); } - flyteidl.admin.Agent.GetTaskRequest other = (flyteidl.admin.Agent.GetTaskRequest) obj; + flyteidl.admin.AgentOuterClass.GetTaskRequest other = (flyteidl.admin.AgentOuterClass.GetTaskRequest) obj; if (!getTaskType() .equals(other.getTaskType())) return false; @@ -4365,69 +4644,69 @@ public int hashCode() { return hash; } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom(byte[] data) + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskRequest parseDelimitedFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.GetTaskRequest parseDelimitedFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.GetTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4440,7 +4719,7 @@ public static flyteidl.admin.Agent.GetTaskRequest parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(flyteidl.admin.Agent.GetTaskRequest prototype) { + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.GetTaskRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -4465,21 +4744,21 @@ protected Builder newBuilderForType( public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:flyteidl.admin.GetTaskRequest) - flyteidl.admin.Agent.GetTaskRequestOrBuilder { + flyteidl.admin.AgentOuterClass.GetTaskRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskRequest_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskRequest_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.GetTaskRequest.class, flyteidl.admin.Agent.GetTaskRequest.Builder.class); + flyteidl.admin.AgentOuterClass.GetTaskRequest.class, flyteidl.admin.AgentOuterClass.GetTaskRequest.Builder.class); } - // Construct using flyteidl.admin.Agent.GetTaskRequest.newBuilder() + // Construct using flyteidl.admin.AgentOuterClass.GetTaskRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4507,17 +4786,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskRequest_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskRequest_descriptor; } @java.lang.Override - public flyteidl.admin.Agent.GetTaskRequest getDefaultInstanceForType() { - return flyteidl.admin.Agent.GetTaskRequest.getDefaultInstance(); + public flyteidl.admin.AgentOuterClass.GetTaskRequest getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.GetTaskRequest.getDefaultInstance(); } @java.lang.Override - public flyteidl.admin.Agent.GetTaskRequest build() { - flyteidl.admin.Agent.GetTaskRequest result = buildPartial(); + public flyteidl.admin.AgentOuterClass.GetTaskRequest build() { + flyteidl.admin.AgentOuterClass.GetTaskRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -4525,8 +4804,8 @@ public flyteidl.admin.Agent.GetTaskRequest build() { } @java.lang.Override - public flyteidl.admin.Agent.GetTaskRequest buildPartial() { - flyteidl.admin.Agent.GetTaskRequest result = new flyteidl.admin.Agent.GetTaskRequest(this); + public flyteidl.admin.AgentOuterClass.GetTaskRequest buildPartial() { + flyteidl.admin.AgentOuterClass.GetTaskRequest result = new flyteidl.admin.AgentOuterClass.GetTaskRequest(this); result.taskType_ = taskType_; result.resourceMeta_ = resourceMeta_; onBuilt(); @@ -4567,16 +4846,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof flyteidl.admin.Agent.GetTaskRequest) { - return mergeFrom((flyteidl.admin.Agent.GetTaskRequest)other); + if (other instanceof flyteidl.admin.AgentOuterClass.GetTaskRequest) { + return mergeFrom((flyteidl.admin.AgentOuterClass.GetTaskRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(flyteidl.admin.Agent.GetTaskRequest other) { - if (other == flyteidl.admin.Agent.GetTaskRequest.getDefaultInstance()) return this; + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.GetTaskRequest other) { + if (other == flyteidl.admin.AgentOuterClass.GetTaskRequest.getDefaultInstance()) return this; if (!other.getTaskType().isEmpty()) { taskType_ = other.taskType_; onChanged(); @@ -4599,11 +4878,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - flyteidl.admin.Agent.GetTaskRequest parsedMessage = null; + flyteidl.admin.AgentOuterClass.GetTaskRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (flyteidl.admin.Agent.GetTaskRequest) e.getUnfinishedMessage(); + parsedMessage = (flyteidl.admin.AgentOuterClass.GetTaskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -4759,12 +5038,12 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:flyteidl.admin.GetTaskRequest) - private static final flyteidl.admin.Agent.GetTaskRequest DEFAULT_INSTANCE; + private static final flyteidl.admin.AgentOuterClass.GetTaskRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new flyteidl.admin.Agent.GetTaskRequest(); + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.GetTaskRequest(); } - public static flyteidl.admin.Agent.GetTaskRequest getDefaultInstance() { + public static flyteidl.admin.AgentOuterClass.GetTaskRequest getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -4789,7 +5068,7 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public flyteidl.admin.Agent.GetTaskRequest getDefaultInstanceForType() { + public flyteidl.admin.AgentOuterClass.GetTaskRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -4806,15 +5085,15 @@ public interface GetTaskResponseOrBuilder extends /** * .flyteidl.admin.Resource resource = 1; */ - flyteidl.admin.Agent.Resource getResource(); + flyteidl.admin.AgentOuterClass.Resource getResource(); /** * .flyteidl.admin.Resource resource = 1; */ - flyteidl.admin.Agent.ResourceOrBuilder getResourceOrBuilder(); + flyteidl.admin.AgentOuterClass.ResourceOrBuilder getResourceOrBuilder(); /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -4823,7 +5102,7 @@ public interface GetTaskResponseOrBuilder extends getLogLinksList(); /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -4831,7 +5110,7 @@ public interface GetTaskResponseOrBuilder extends flyteidl.core.Execution.TaskLog getLogLinks(int index); /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -4839,7 +5118,7 @@ public interface GetTaskResponseOrBuilder extends int getLogLinksCount(); /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -4848,7 +5127,7 @@ public interface GetTaskResponseOrBuilder extends getLogLinksOrBuilderList(); /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -4901,11 +5180,11 @@ private GetTaskResponse( done = true; break; case 10: { - flyteidl.admin.Agent.Resource.Builder subBuilder = null; + flyteidl.admin.AgentOuterClass.Resource.Builder subBuilder = null; if (resource_ != null) { subBuilder = resource_.toBuilder(); } - resource_ = input.readMessage(flyteidl.admin.Agent.Resource.parser(), extensionRegistry); + resource_ = input.readMessage(flyteidl.admin.AgentOuterClass.Resource.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(resource_); resource_ = subBuilder.buildPartial(); @@ -4946,20 +5225,20 @@ private GetTaskResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskResponse_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskResponse_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.GetTaskResponse.class, flyteidl.admin.Agent.GetTaskResponse.Builder.class); + flyteidl.admin.AgentOuterClass.GetTaskResponse.class, flyteidl.admin.AgentOuterClass.GetTaskResponse.Builder.class); } private int bitField0_; public static final int RESOURCE_FIELD_NUMBER = 1; - private flyteidl.admin.Agent.Resource resource_; + private flyteidl.admin.AgentOuterClass.Resource resource_; /** * .flyteidl.admin.Resource resource = 1; */ @@ -4969,13 +5248,13 @@ public boolean hasResource() { /** * .flyteidl.admin.Resource resource = 1; */ - public flyteidl.admin.Agent.Resource getResource() { - return resource_ == null ? flyteidl.admin.Agent.Resource.getDefaultInstance() : resource_; + public flyteidl.admin.AgentOuterClass.Resource getResource() { + return resource_ == null ? flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance() : resource_; } /** * .flyteidl.admin.Resource resource = 1; */ - public flyteidl.admin.Agent.ResourceOrBuilder getResourceOrBuilder() { + public flyteidl.admin.AgentOuterClass.ResourceOrBuilder getResourceOrBuilder() { return getResource(); } @@ -4983,7 +5262,7 @@ public flyteidl.admin.Agent.ResourceOrBuilder getResourceOrBuilder() { private java.util.List logLinks_; /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -4993,7 +5272,7 @@ public java.util.List getLogLinksList() { } /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5004,7 +5283,7 @@ public java.util.List getLogLinksList() { } /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5014,7 +5293,7 @@ public int getLogLinksCount() { } /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5024,7 +5303,7 @@ public flyteidl.core.Execution.TaskLog getLogLinks(int index) { } /** *
-     * log information for the task execution.
+     * log information for the task execution
      * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5081,10 +5360,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof flyteidl.admin.Agent.GetTaskResponse)) { + if (!(obj instanceof flyteidl.admin.AgentOuterClass.GetTaskResponse)) { return super.equals(obj); } - flyteidl.admin.Agent.GetTaskResponse other = (flyteidl.admin.Agent.GetTaskResponse) obj; + flyteidl.admin.AgentOuterClass.GetTaskResponse other = (flyteidl.admin.AgentOuterClass.GetTaskResponse) obj; if (hasResource() != other.hasResource()) return false; if (hasResource()) { @@ -5117,69 +5396,69 @@ public int hashCode() { return hash; } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom(byte[] data) + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskResponse parseDelimitedFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.GetTaskResponse parseDelimitedFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.GetTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.GetTaskResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5192,7 +5471,7 @@ public static flyteidl.admin.Agent.GetTaskResponse parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(flyteidl.admin.Agent.GetTaskResponse prototype) { + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.GetTaskResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -5217,21 +5496,21 @@ protected Builder newBuilderForType( public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:flyteidl.admin.GetTaskResponse) - flyteidl.admin.Agent.GetTaskResponseOrBuilder { + flyteidl.admin.AgentOuterClass.GetTaskResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskResponse_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskResponse_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.GetTaskResponse.class, flyteidl.admin.Agent.GetTaskResponse.Builder.class); + flyteidl.admin.AgentOuterClass.GetTaskResponse.class, flyteidl.admin.AgentOuterClass.GetTaskResponse.Builder.class); } - // Construct using flyteidl.admin.Agent.GetTaskResponse.newBuilder() + // Construct using flyteidl.admin.AgentOuterClass.GetTaskResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -5268,17 +5547,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_GetTaskResponse_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetTaskResponse_descriptor; } @java.lang.Override - public flyteidl.admin.Agent.GetTaskResponse getDefaultInstanceForType() { - return flyteidl.admin.Agent.GetTaskResponse.getDefaultInstance(); + public flyteidl.admin.AgentOuterClass.GetTaskResponse getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.GetTaskResponse.getDefaultInstance(); } @java.lang.Override - public flyteidl.admin.Agent.GetTaskResponse build() { - flyteidl.admin.Agent.GetTaskResponse result = buildPartial(); + public flyteidl.admin.AgentOuterClass.GetTaskResponse build() { + flyteidl.admin.AgentOuterClass.GetTaskResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -5286,8 +5565,8 @@ public flyteidl.admin.Agent.GetTaskResponse build() { } @java.lang.Override - public flyteidl.admin.Agent.GetTaskResponse buildPartial() { - flyteidl.admin.Agent.GetTaskResponse result = new flyteidl.admin.Agent.GetTaskResponse(this); + public flyteidl.admin.AgentOuterClass.GetTaskResponse buildPartial() { + flyteidl.admin.AgentOuterClass.GetTaskResponse result = new flyteidl.admin.AgentOuterClass.GetTaskResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (resourceBuilder_ == null) { @@ -5343,16 +5622,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof flyteidl.admin.Agent.GetTaskResponse) { - return mergeFrom((flyteidl.admin.Agent.GetTaskResponse)other); + if (other instanceof flyteidl.admin.AgentOuterClass.GetTaskResponse) { + return mergeFrom((flyteidl.admin.AgentOuterClass.GetTaskResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(flyteidl.admin.Agent.GetTaskResponse other) { - if (other == flyteidl.admin.Agent.GetTaskResponse.getDefaultInstance()) return this; + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.GetTaskResponse other) { + if (other == flyteidl.admin.AgentOuterClass.GetTaskResponse.getDefaultInstance()) return this; if (other.hasResource()) { mergeResource(other.getResource()); } @@ -5397,11 +5676,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - flyteidl.admin.Agent.GetTaskResponse parsedMessage = null; + flyteidl.admin.AgentOuterClass.GetTaskResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (flyteidl.admin.Agent.GetTaskResponse) e.getUnfinishedMessage(); + parsedMessage = (flyteidl.admin.AgentOuterClass.GetTaskResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -5412,9 +5691,9 @@ public Builder mergeFrom( } private int bitField0_; - private flyteidl.admin.Agent.Resource resource_; + private flyteidl.admin.AgentOuterClass.Resource resource_; private com.google.protobuf.SingleFieldBuilderV3< - flyteidl.admin.Agent.Resource, flyteidl.admin.Agent.Resource.Builder, flyteidl.admin.Agent.ResourceOrBuilder> resourceBuilder_; + flyteidl.admin.AgentOuterClass.Resource, flyteidl.admin.AgentOuterClass.Resource.Builder, flyteidl.admin.AgentOuterClass.ResourceOrBuilder> resourceBuilder_; /** * .flyteidl.admin.Resource resource = 1; */ @@ -5424,9 +5703,9 @@ public boolean hasResource() { /** * .flyteidl.admin.Resource resource = 1; */ - public flyteidl.admin.Agent.Resource getResource() { + public flyteidl.admin.AgentOuterClass.Resource getResource() { if (resourceBuilder_ == null) { - return resource_ == null ? flyteidl.admin.Agent.Resource.getDefaultInstance() : resource_; + return resource_ == null ? flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance() : resource_; } else { return resourceBuilder_.getMessage(); } @@ -5434,7 +5713,7 @@ public flyteidl.admin.Agent.Resource getResource() { /** * .flyteidl.admin.Resource resource = 1; */ - public Builder setResource(flyteidl.admin.Agent.Resource value) { + public Builder setResource(flyteidl.admin.AgentOuterClass.Resource value) { if (resourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5451,7 +5730,7 @@ public Builder setResource(flyteidl.admin.Agent.Resource value) { * .flyteidl.admin.Resource resource = 1; */ public Builder setResource( - flyteidl.admin.Agent.Resource.Builder builderForValue) { + flyteidl.admin.AgentOuterClass.Resource.Builder builderForValue) { if (resourceBuilder_ == null) { resource_ = builderForValue.build(); onChanged(); @@ -5464,11 +5743,11 @@ public Builder setResource( /** * .flyteidl.admin.Resource resource = 1; */ - public Builder mergeResource(flyteidl.admin.Agent.Resource value) { + public Builder mergeResource(flyteidl.admin.AgentOuterClass.Resource value) { if (resourceBuilder_ == null) { if (resource_ != null) { resource_ = - flyteidl.admin.Agent.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); + flyteidl.admin.AgentOuterClass.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); } else { resource_ = value; } @@ -5496,7 +5775,7 @@ public Builder clearResource() { /** * .flyteidl.admin.Resource resource = 1; */ - public flyteidl.admin.Agent.Resource.Builder getResourceBuilder() { + public flyteidl.admin.AgentOuterClass.Resource.Builder getResourceBuilder() { onChanged(); return getResourceFieldBuilder().getBuilder(); @@ -5504,23 +5783,23 @@ public flyteidl.admin.Agent.Resource.Builder getResourceBuilder() { /** * .flyteidl.admin.Resource resource = 1; */ - public flyteidl.admin.Agent.ResourceOrBuilder getResourceOrBuilder() { + public flyteidl.admin.AgentOuterClass.ResourceOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { return resourceBuilder_.getMessageOrBuilder(); } else { return resource_ == null ? - flyteidl.admin.Agent.Resource.getDefaultInstance() : resource_; + flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance() : resource_; } } /** * .flyteidl.admin.Resource resource = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - flyteidl.admin.Agent.Resource, flyteidl.admin.Agent.Resource.Builder, flyteidl.admin.Agent.ResourceOrBuilder> + flyteidl.admin.AgentOuterClass.Resource, flyteidl.admin.AgentOuterClass.Resource.Builder, flyteidl.admin.AgentOuterClass.ResourceOrBuilder> getResourceFieldBuilder() { if (resourceBuilder_ == null) { resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - flyteidl.admin.Agent.Resource, flyteidl.admin.Agent.Resource.Builder, flyteidl.admin.Agent.ResourceOrBuilder>( + flyteidl.admin.AgentOuterClass.Resource, flyteidl.admin.AgentOuterClass.Resource.Builder, flyteidl.admin.AgentOuterClass.ResourceOrBuilder>( getResource(), getParentForChildren(), isClean()); @@ -5543,7 +5822,7 @@ private void ensureLogLinksIsMutable() { /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5557,7 +5836,7 @@ public java.util.List getLogLinksList() { } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5571,7 +5850,7 @@ public int getLogLinksCount() { } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5585,7 +5864,7 @@ public flyteidl.core.Execution.TaskLog getLogLinks(int index) { } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5606,7 +5885,7 @@ public Builder setLogLinks( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5624,7 +5903,7 @@ public Builder setLogLinks( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5644,7 +5923,7 @@ public Builder addLogLinks(flyteidl.core.Execution.TaskLog value) { } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5665,7 +5944,7 @@ public Builder addLogLinks( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5683,7 +5962,7 @@ public Builder addLogLinks( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5701,7 +5980,7 @@ public Builder addLogLinks( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5720,7 +5999,7 @@ public Builder addAllLogLinks( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5737,7 +6016,7 @@ public Builder clearLogLinks() { } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5754,7 +6033,7 @@ public Builder removeLogLinks(int index) { } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5765,7 +6044,7 @@ public flyteidl.core.Execution.TaskLog.Builder getLogLinksBuilder( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5779,7 +6058,7 @@ public flyteidl.core.Execution.TaskLogOrBuilder getLogLinksOrBuilder( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5794,7 +6073,7 @@ public flyteidl.core.Execution.TaskLogOrBuilder getLogLinksOrBuilder( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5805,7 +6084,7 @@ public flyteidl.core.Execution.TaskLog.Builder addLogLinksBuilder() { } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5817,7 +6096,7 @@ public flyteidl.core.Execution.TaskLog.Builder addLogLinksBuilder( } /** *
-       * log information for the task execution.
+       * log information for the task execution
        * 
* * repeated .flyteidl.core.TaskLog log_links = 2; @@ -5857,12 +6136,12 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:flyteidl.admin.GetTaskResponse) - private static final flyteidl.admin.Agent.GetTaskResponse DEFAULT_INSTANCE; + private static final flyteidl.admin.AgentOuterClass.GetTaskResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new flyteidl.admin.Agent.GetTaskResponse(); + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.GetTaskResponse(); } - public static flyteidl.admin.Agent.GetTaskResponse getDefaultInstance() { + public static flyteidl.admin.AgentOuterClass.GetTaskResponse getDefaultInstance() { return DEFAULT_INSTANCE; } @@ -5887,7 +6166,7 @@ public com.google.protobuf.Parser getParserForType() { } @java.lang.Override - public flyteidl.admin.Agent.GetTaskResponse getDefaultInstanceForType() { + public flyteidl.admin.AgentOuterClass.GetTaskResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -5912,7 +6191,7 @@ public interface ResourceOrBuilder extends * * .flyteidl.admin.State state = 1; */ - flyteidl.admin.Agent.State getState(); + flyteidl.admin.AgentOuterClass.State getState(); /** *
@@ -5962,6 +6241,50 @@ public interface ResourceOrBuilder extends
      */
     com.google.protobuf.ByteString
         getMessageBytes();
+
+    /**
+     * 
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + java.util.List + getLogLinksList(); + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + flyteidl.core.Execution.TaskLog getLogLinks(int index); + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + int getLogLinksCount(); + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + java.util.List + getLogLinksOrBuilderList(); + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + flyteidl.core.Execution.TaskLogOrBuilder getLogLinksOrBuilder( + int index); } /** * Protobuf type {@code flyteidl.admin.Resource} @@ -5978,6 +6301,7 @@ private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Resource() { state_ = 0; message_ = ""; + logLinks_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -6029,7 +6353,16 @@ private Resource( message_ = s; break; } - default: { + case 34: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + logLinks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + logLinks_.add( + input.readMessage(flyteidl.core.Execution.TaskLog.parser(), extensionRegistry)); + break; + } + default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; @@ -6044,23 +6377,27 @@ private Resource( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000008) != 0)) { + logLinks_ = java.util.Collections.unmodifiableList(logLinks_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_Resource_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Resource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_Resource_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Resource_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.Resource.class, flyteidl.admin.Agent.Resource.Builder.class); + flyteidl.admin.AgentOuterClass.Resource.class, flyteidl.admin.AgentOuterClass.Resource.Builder.class); } + private int bitField0_; public static final int STATE_FIELD_NUMBER = 1; private int state_; /** @@ -6080,10 +6417,10 @@ public int getStateValue() { * * .flyteidl.admin.State state = 1; */ - public flyteidl.admin.Agent.State getState() { + public flyteidl.admin.AgentOuterClass.State getState() { @SuppressWarnings("deprecation") - flyteidl.admin.Agent.State result = flyteidl.admin.Agent.State.valueOf(state_); - return result == null ? flyteidl.admin.Agent.State.UNRECOGNIZED : result; + flyteidl.admin.AgentOuterClass.State result = flyteidl.admin.AgentOuterClass.State.valueOf(state_); + return result == null ? flyteidl.admin.AgentOuterClass.State.UNRECOGNIZED : result; } public static final int OUTPUTS_FIELD_NUMBER = 2; @@ -6167,6 +6504,61 @@ public java.lang.String getMessage() { } } + public static final int LOG_LINKS_FIELD_NUMBER = 4; + private java.util.List logLinks_; + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public java.util.List getLogLinksList() { + return logLinks_; + } + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public java.util.List + getLogLinksOrBuilderList() { + return logLinks_; + } + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public int getLogLinksCount() { + return logLinks_.size(); + } + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public flyteidl.core.Execution.TaskLog getLogLinks(int index) { + return logLinks_.get(index); + } + /** + *
+     * log information for the task execution.
+     * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public flyteidl.core.Execution.TaskLogOrBuilder getLogLinksOrBuilder( + int index) { + return logLinks_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -6181,7 +6573,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (state_ != flyteidl.admin.Agent.State.RETRYABLE_FAILURE.getNumber()) { + if (state_ != flyteidl.admin.AgentOuterClass.State.RETRYABLE_FAILURE.getNumber()) { output.writeEnum(1, state_); } if (outputs_ != null) { @@ -6190,6 +6582,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!getMessageBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_); } + for (int i = 0; i < logLinks_.size(); i++) { + output.writeMessage(4, logLinks_.get(i)); + } unknownFields.writeTo(output); } @@ -6199,7 +6594,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (state_ != flyteidl.admin.Agent.State.RETRYABLE_FAILURE.getNumber()) { + if (state_ != flyteidl.admin.AgentOuterClass.State.RETRYABLE_FAILURE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, state_); } @@ -6210,6 +6605,10 @@ public int getSerializedSize() { if (!getMessageBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_); } + for (int i = 0; i < logLinks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, logLinks_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -6220,10 +6619,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof flyteidl.admin.Agent.Resource)) { + if (!(obj instanceof flyteidl.admin.AgentOuterClass.Resource)) { return super.equals(obj); } - flyteidl.admin.Agent.Resource other = (flyteidl.admin.Agent.Resource) obj; + flyteidl.admin.AgentOuterClass.Resource other = (flyteidl.admin.AgentOuterClass.Resource) obj; if (state_ != other.state_) return false; if (hasOutputs() != other.hasOutputs()) return false; @@ -6233,6 +6632,8 @@ public boolean equals(final java.lang.Object obj) { } if (!getMessage() .equals(other.getMessage())) return false; + if (!getLogLinksList() + .equals(other.getLogLinksList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6252,74 +6653,78 @@ public int hashCode() { } hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); + if (getLogLinksCount() > 0) { + hash = (37 * hash) + LOG_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getLogLinksList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static flyteidl.admin.Agent.Resource parseFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.Resource parseFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.Resource parseFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.Resource parseFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.Resource parseFrom(byte[] data) + public static flyteidl.admin.AgentOuterClass.Resource parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.Resource parseFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.Resource parseFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.Resource parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.Resource parseFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.Resource parseDelimitedFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.Resource parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.Resource parseDelimitedFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.Resource parseFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.Resource parseFrom( + public static flyteidl.admin.AgentOuterClass.Resource parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6332,7 +6737,7 @@ public static flyteidl.admin.Agent.Resource parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(flyteidl.admin.Agent.Resource prototype) { + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.Resource prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -6353,21 +6758,21 @@ protected Builder newBuilderForType( public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:flyteidl.admin.Resource) - flyteidl.admin.Agent.ResourceOrBuilder { + flyteidl.admin.AgentOuterClass.ResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_Resource_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Resource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_Resource_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Resource_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.Resource.class, flyteidl.admin.Agent.Resource.Builder.class); + flyteidl.admin.AgentOuterClass.Resource.class, flyteidl.admin.AgentOuterClass.Resource.Builder.class); } - // Construct using flyteidl.admin.Agent.Resource.newBuilder() + // Construct using flyteidl.admin.AgentOuterClass.Resource.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -6380,6 +6785,7 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { + getLogLinksFieldBuilder(); } } @java.lang.Override @@ -6395,23 +6801,29 @@ public Builder clear() { } message_ = ""; + if (logLinksBuilder_ == null) { + logLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + logLinksBuilder_.clear(); + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_Resource_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Resource_descriptor; } @java.lang.Override - public flyteidl.admin.Agent.Resource getDefaultInstanceForType() { - return flyteidl.admin.Agent.Resource.getDefaultInstance(); + public flyteidl.admin.AgentOuterClass.Resource getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance(); } @java.lang.Override - public flyteidl.admin.Agent.Resource build() { - flyteidl.admin.Agent.Resource result = buildPartial(); + public flyteidl.admin.AgentOuterClass.Resource build() { + flyteidl.admin.AgentOuterClass.Resource result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -6419,8 +6831,10 @@ public flyteidl.admin.Agent.Resource build() { } @java.lang.Override - public flyteidl.admin.Agent.Resource buildPartial() { - flyteidl.admin.Agent.Resource result = new flyteidl.admin.Agent.Resource(this); + public flyteidl.admin.AgentOuterClass.Resource buildPartial() { + flyteidl.admin.AgentOuterClass.Resource result = new flyteidl.admin.AgentOuterClass.Resource(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; result.state_ = state_; if (outputsBuilder_ == null) { result.outputs_ = outputs_; @@ -6428,6 +6842,16 @@ public flyteidl.admin.Agent.Resource buildPartial() { result.outputs_ = outputsBuilder_.build(); } result.message_ = message_; + if (logLinksBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + logLinks_ = java.util.Collections.unmodifiableList(logLinks_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.logLinks_ = logLinks_; + } else { + result.logLinks_ = logLinksBuilder_.build(); + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -6466,16 +6890,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof flyteidl.admin.Agent.Resource) { - return mergeFrom((flyteidl.admin.Agent.Resource)other); + if (other instanceof flyteidl.admin.AgentOuterClass.Resource) { + return mergeFrom((flyteidl.admin.AgentOuterClass.Resource)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(flyteidl.admin.Agent.Resource other) { - if (other == flyteidl.admin.Agent.Resource.getDefaultInstance()) return this; + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.Resource other) { + if (other == flyteidl.admin.AgentOuterClass.Resource.getDefaultInstance()) return this; if (other.state_ != 0) { setStateValue(other.getStateValue()); } @@ -6486,6 +6910,32 @@ public Builder mergeFrom(flyteidl.admin.Agent.Resource other) { message_ = other.message_; onChanged(); } + if (logLinksBuilder_ == null) { + if (!other.logLinks_.isEmpty()) { + if (logLinks_.isEmpty()) { + logLinks_ = other.logLinks_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLogLinksIsMutable(); + logLinks_.addAll(other.logLinks_); + } + onChanged(); + } + } else { + if (!other.logLinks_.isEmpty()) { + if (logLinksBuilder_.isEmpty()) { + logLinksBuilder_.dispose(); + logLinksBuilder_ = null; + logLinks_ = other.logLinks_; + bitField0_ = (bitField0_ & ~0x00000008); + logLinksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLogLinksFieldBuilder() : null; + } else { + logLinksBuilder_.addAllMessages(other.logLinks_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -6501,11 +6951,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - flyteidl.admin.Agent.Resource parsedMessage = null; + flyteidl.admin.AgentOuterClass.Resource parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (flyteidl.admin.Agent.Resource) e.getUnfinishedMessage(); + parsedMessage = (flyteidl.admin.AgentOuterClass.Resource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -6514,6 +6964,7 @@ public Builder mergeFrom( } return this; } + private int bitField0_; private int state_ = 0; /** @@ -6545,10 +6996,10 @@ public Builder setStateValue(int value) { * * .flyteidl.admin.State state = 1; */ - public flyteidl.admin.Agent.State getState() { + public flyteidl.admin.AgentOuterClass.State getState() { @SuppressWarnings("deprecation") - flyteidl.admin.Agent.State result = flyteidl.admin.Agent.State.valueOf(state_); - return result == null ? flyteidl.admin.Agent.State.UNRECOGNIZED : result; + flyteidl.admin.AgentOuterClass.State result = flyteidl.admin.AgentOuterClass.State.valueOf(state_); + return result == null ? flyteidl.admin.AgentOuterClass.State.UNRECOGNIZED : result; } /** *
@@ -6557,7 +7008,7 @@ public flyteidl.admin.Agent.State getState() {
        *
        * .flyteidl.admin.State state = 1;
        */
-      public Builder setState(flyteidl.admin.Agent.State value) {
+      public Builder setState(flyteidl.admin.AgentOuterClass.State value) {
         if (value == null) {
           throw new NullPointerException();
         }
@@ -6839,127 +7290,2969 @@ public Builder setMessageBytes(
         onChanged();
         return this;
       }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
 
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
+      private java.util.List logLinks_ =
+        java.util.Collections.emptyList();
+      private void ensureLogLinksIsMutable() {
+        if (!((bitField0_ & 0x00000008) != 0)) {
+          logLinks_ = new java.util.ArrayList(logLinks_);
+          bitField0_ |= 0x00000008;
+         }
       }
 
+      private com.google.protobuf.RepeatedFieldBuilderV3<
+          flyteidl.core.Execution.TaskLog, flyteidl.core.Execution.TaskLog.Builder, flyteidl.core.Execution.TaskLogOrBuilder> logLinksBuilder_;
 
-      // @@protoc_insertion_point(builder_scope:flyteidl.admin.Resource)
-    }
-
-    // @@protoc_insertion_point(class_scope:flyteidl.admin.Resource)
-    private static final flyteidl.admin.Agent.Resource DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new flyteidl.admin.Agent.Resource();
-    }
-
-    public static flyteidl.admin.Agent.Resource getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public Resource parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new Resource(input, extensionRegistry);
+      /**
+       * 
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public java.util.List getLogLinksList() { + if (logLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(logLinks_); + } else { + return logLinksBuilder_.getMessageList(); + } } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public flyteidl.admin.Agent.Resource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DeleteTaskRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:flyteidl.admin.DeleteTaskRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * A predefined yet extensible Task type identifier.
-     * 
- * - * string task_type = 1; - */ - java.lang.String getTaskType(); - /** - *
-     * A predefined yet extensible Task type identifier.
-     * 
- * - * string task_type = 1; - */ - com.google.protobuf.ByteString - getTaskTypeBytes(); - - /** - *
-     * Metadata about the resource to be pass to the agent.
-     * 
- * - * bytes resource_meta = 2; - */ - com.google.protobuf.ByteString getResourceMeta(); - } - /** - *
-   * A message used to delete a task.
-   * 
- * - * Protobuf type {@code flyteidl.admin.DeleteTaskRequest} - */ - public static final class DeleteTaskRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:flyteidl.admin.DeleteTaskRequest) - DeleteTaskRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteTaskRequest.newBuilder() to construct. - private DeleteTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteTaskRequest() { - taskType_ = ""; - resourceMeta_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteTaskRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public int getLogLinksCount() { + if (logLinksBuilder_ == null) { + return logLinks_.size(); + } else { + return logLinksBuilder_.getCount(); + } } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public flyteidl.core.Execution.TaskLog getLogLinks(int index) { + if (logLinksBuilder_ == null) { + return logLinks_.get(index); + } else { + return logLinksBuilder_.getMessage(index); + } + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder setLogLinks( + int index, flyteidl.core.Execution.TaskLog value) { + if (logLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogLinksIsMutable(); + logLinks_.set(index, value); + onChanged(); + } else { + logLinksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder setLogLinks( + int index, flyteidl.core.Execution.TaskLog.Builder builderForValue) { + if (logLinksBuilder_ == null) { + ensureLogLinksIsMutable(); + logLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + logLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder addLogLinks(flyteidl.core.Execution.TaskLog value) { + if (logLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogLinksIsMutable(); + logLinks_.add(value); + onChanged(); + } else { + logLinksBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder addLogLinks( + int index, flyteidl.core.Execution.TaskLog value) { + if (logLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogLinksIsMutable(); + logLinks_.add(index, value); + onChanged(); + } else { + logLinksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder addLogLinks( + flyteidl.core.Execution.TaskLog.Builder builderForValue) { + if (logLinksBuilder_ == null) { + ensureLogLinksIsMutable(); + logLinks_.add(builderForValue.build()); + onChanged(); + } else { + logLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder addLogLinks( + int index, flyteidl.core.Execution.TaskLog.Builder builderForValue) { + if (logLinksBuilder_ == null) { + ensureLogLinksIsMutable(); + logLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + logLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder addAllLogLinks( + java.lang.Iterable values) { + if (logLinksBuilder_ == null) { + ensureLogLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logLinks_); + onChanged(); + } else { + logLinksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder clearLogLinks() { + if (logLinksBuilder_ == null) { + logLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + logLinksBuilder_.clear(); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public Builder removeLogLinks(int index) { + if (logLinksBuilder_ == null) { + ensureLogLinksIsMutable(); + logLinks_.remove(index); + onChanged(); + } else { + logLinksBuilder_.remove(index); + } + return this; + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public flyteidl.core.Execution.TaskLog.Builder getLogLinksBuilder( + int index) { + return getLogLinksFieldBuilder().getBuilder(index); + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public flyteidl.core.Execution.TaskLogOrBuilder getLogLinksOrBuilder( + int index) { + if (logLinksBuilder_ == null) { + return logLinks_.get(index); } else { + return logLinksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public java.util.List + getLogLinksOrBuilderList() { + if (logLinksBuilder_ != null) { + return logLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logLinks_); + } + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public flyteidl.core.Execution.TaskLog.Builder addLogLinksBuilder() { + return getLogLinksFieldBuilder().addBuilder( + flyteidl.core.Execution.TaskLog.getDefaultInstance()); + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public flyteidl.core.Execution.TaskLog.Builder addLogLinksBuilder( + int index) { + return getLogLinksFieldBuilder().addBuilder( + index, flyteidl.core.Execution.TaskLog.getDefaultInstance()); + } + /** + *
+       * log information for the task execution.
+       * 
+ * + * repeated .flyteidl.core.TaskLog log_links = 4; + */ + public java.util.List + getLogLinksBuilderList() { + return getLogLinksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + flyteidl.core.Execution.TaskLog, flyteidl.core.Execution.TaskLog.Builder, flyteidl.core.Execution.TaskLogOrBuilder> + getLogLinksFieldBuilder() { + if (logLinksBuilder_ == null) { + logLinksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + flyteidl.core.Execution.TaskLog, flyteidl.core.Execution.TaskLog.Builder, flyteidl.core.Execution.TaskLogOrBuilder>( + logLinks_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + logLinks_ = null; + } + return logLinksBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.admin.Resource) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.Resource) + private static final flyteidl.admin.AgentOuterClass.Resource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.Resource(); + } + + public static flyteidl.admin.AgentOuterClass.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeleteTaskRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.DeleteTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A predefined yet extensible Task type identifier.
+     * 
+ * + * string task_type = 1; + */ + java.lang.String getTaskType(); + /** + *
+     * A predefined yet extensible Task type identifier.
+     * 
+ * + * string task_type = 1; + */ + com.google.protobuf.ByteString + getTaskTypeBytes(); + + /** + *
+     * Metadata about the resource to be pass to the agent.
+     * 
+ * + * bytes resource_meta = 2; + */ + com.google.protobuf.ByteString getResourceMeta(); + } + /** + *
+   * A message used to delete a task.
+   * 
+ * + * Protobuf type {@code flyteidl.admin.DeleteTaskRequest} + */ + public static final class DeleteTaskRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.DeleteTaskRequest) + DeleteTaskRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTaskRequest.newBuilder() to construct. + private DeleteTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteTaskRequest() { + taskType_ = ""; + resourceMeta_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteTaskRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + taskType_ = s; + break; + } + case 18: { + + resourceMeta_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.DeleteTaskRequest.class, flyteidl.admin.AgentOuterClass.DeleteTaskRequest.Builder.class); + } + + public static final int TASK_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object taskType_; + /** + *
+     * A predefined yet extensible Task type identifier.
+     * 
+ * + * string task_type = 1; + */ + public java.lang.String getTaskType() { + java.lang.Object ref = taskType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskType_ = s; + return s; + } + } + /** + *
+     * A predefined yet extensible Task type identifier.
+     * 
+ * + * string task_type = 1; + */ + public com.google.protobuf.ByteString + getTaskTypeBytes() { + java.lang.Object ref = taskType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + taskType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_META_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString resourceMeta_; + /** + *
+     * Metadata about the resource to be pass to the agent.
+     * 
+ * + * bytes resource_meta = 2; + */ + public com.google.protobuf.ByteString getResourceMeta() { + return resourceMeta_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getTaskTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, taskType_); + } + if (!resourceMeta_.isEmpty()) { + output.writeBytes(2, resourceMeta_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTaskTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, taskType_); + } + if (!resourceMeta_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, resourceMeta_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof flyteidl.admin.AgentOuterClass.DeleteTaskRequest)) { + return super.equals(obj); + } + flyteidl.admin.AgentOuterClass.DeleteTaskRequest other = (flyteidl.admin.AgentOuterClass.DeleteTaskRequest) obj; + + if (!getTaskType() + .equals(other.getTaskType())) return false; + if (!getResourceMeta() + .equals(other.getResourceMeta())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TASK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTaskType().hashCode(); + hash = (37 * hash) + RESOURCE_META_FIELD_NUMBER; + hash = (53 * hash) + getResourceMeta().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.DeleteTaskRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A message used to delete a task.
+     * 
+ * + * Protobuf type {@code flyteidl.admin.DeleteTaskRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.admin.DeleteTaskRequest) + flyteidl.admin.AgentOuterClass.DeleteTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.DeleteTaskRequest.class, flyteidl.admin.AgentOuterClass.DeleteTaskRequest.Builder.class); + } + + // Construct using flyteidl.admin.AgentOuterClass.DeleteTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + taskType_ = ""; + + resourceMeta_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskRequest_descriptor; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.DeleteTaskRequest getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.DeleteTaskRequest.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.DeleteTaskRequest build() { + flyteidl.admin.AgentOuterClass.DeleteTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.DeleteTaskRequest buildPartial() { + flyteidl.admin.AgentOuterClass.DeleteTaskRequest result = new flyteidl.admin.AgentOuterClass.DeleteTaskRequest(this); + result.taskType_ = taskType_; + result.resourceMeta_ = resourceMeta_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.admin.AgentOuterClass.DeleteTaskRequest) { + return mergeFrom((flyteidl.admin.AgentOuterClass.DeleteTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.DeleteTaskRequest other) { + if (other == flyteidl.admin.AgentOuterClass.DeleteTaskRequest.getDefaultInstance()) return this; + if (!other.getTaskType().isEmpty()) { + taskType_ = other.taskType_; + onChanged(); + } + if (other.getResourceMeta() != com.google.protobuf.ByteString.EMPTY) { + setResourceMeta(other.getResourceMeta()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.admin.AgentOuterClass.DeleteTaskRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.AgentOuterClass.DeleteTaskRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object taskType_ = ""; + /** + *
+       * A predefined yet extensible Task type identifier.
+       * 
+ * + * string task_type = 1; + */ + public java.lang.String getTaskType() { + java.lang.Object ref = taskType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A predefined yet extensible Task type identifier.
+       * 
+ * + * string task_type = 1; + */ + public com.google.protobuf.ByteString + getTaskTypeBytes() { + java.lang.Object ref = taskType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + taskType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A predefined yet extensible Task type identifier.
+       * 
+ * + * string task_type = 1; + */ + public Builder setTaskType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + taskType_ = value; + onChanged(); + return this; + } + /** + *
+       * A predefined yet extensible Task type identifier.
+       * 
+ * + * string task_type = 1; + */ + public Builder clearTaskType() { + + taskType_ = getDefaultInstance().getTaskType(); + onChanged(); + return this; + } + /** + *
+       * A predefined yet extensible Task type identifier.
+       * 
+ * + * string task_type = 1; + */ + public Builder setTaskTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + taskType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString resourceMeta_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * Metadata about the resource to be pass to the agent.
+       * 
+ * + * bytes resource_meta = 2; + */ + public com.google.protobuf.ByteString getResourceMeta() { + return resourceMeta_; + } + /** + *
+       * Metadata about the resource to be pass to the agent.
+       * 
+ * + * bytes resource_meta = 2; + */ + public Builder setResourceMeta(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceMeta_ = value; + onChanged(); + return this; + } + /** + *
+       * Metadata about the resource to be pass to the agent.
+       * 
+ * + * bytes resource_meta = 2; + */ + public Builder clearResourceMeta() { + + resourceMeta_ = getDefaultInstance().getResourceMeta(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.admin.DeleteTaskRequest) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.DeleteTaskRequest) + private static final flyteidl.admin.AgentOuterClass.DeleteTaskRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.DeleteTaskRequest(); + } + + public static flyteidl.admin.AgentOuterClass.DeleteTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTaskRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTaskRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.DeleteTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeleteTaskResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.DeleteTaskResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Response to delete a task.
+   * 
+ * + * Protobuf type {@code flyteidl.admin.DeleteTaskResponse} + */ + public static final class DeleteTaskResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.DeleteTaskResponse) + DeleteTaskResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTaskResponse.newBuilder() to construct. + private DeleteTaskResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteTaskResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteTaskResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.DeleteTaskResponse.class, flyteidl.admin.AgentOuterClass.DeleteTaskResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof flyteidl.admin.AgentOuterClass.DeleteTaskResponse)) { + return super.equals(obj); + } + flyteidl.admin.AgentOuterClass.DeleteTaskResponse other = (flyteidl.admin.AgentOuterClass.DeleteTaskResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.DeleteTaskResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response to delete a task.
+     * 
+ * + * Protobuf type {@code flyteidl.admin.DeleteTaskResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.admin.DeleteTaskResponse) + flyteidl.admin.AgentOuterClass.DeleteTaskResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.DeleteTaskResponse.class, flyteidl.admin.AgentOuterClass.DeleteTaskResponse.Builder.class); + } + + // Construct using flyteidl.admin.AgentOuterClass.DeleteTaskResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_DeleteTaskResponse_descriptor; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.DeleteTaskResponse getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.DeleteTaskResponse.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.DeleteTaskResponse build() { + flyteidl.admin.AgentOuterClass.DeleteTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.DeleteTaskResponse buildPartial() { + flyteidl.admin.AgentOuterClass.DeleteTaskResponse result = new flyteidl.admin.AgentOuterClass.DeleteTaskResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.admin.AgentOuterClass.DeleteTaskResponse) { + return mergeFrom((flyteidl.admin.AgentOuterClass.DeleteTaskResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.DeleteTaskResponse other) { + if (other == flyteidl.admin.AgentOuterClass.DeleteTaskResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.admin.AgentOuterClass.DeleteTaskResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.AgentOuterClass.DeleteTaskResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.admin.DeleteTaskResponse) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.DeleteTaskResponse) + private static final flyteidl.admin.AgentOuterClass.DeleteTaskResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.DeleteTaskResponse(); + } + + public static flyteidl.admin.AgentOuterClass.DeleteTaskResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTaskResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTaskResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.DeleteTaskResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AgentOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.Agent) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name is the developer-assigned name of the agent.
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * Name is the developer-assigned name of the agent.
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * SupportedTaskTypes are the types of the tasks that the agent can handle.
+     * 
+ * + * repeated string supported_task_types = 2; + */ + java.util.List + getSupportedTaskTypesList(); + /** + *
+     * SupportedTaskTypes are the types of the tasks that the agent can handle.
+     * 
+ * + * repeated string supported_task_types = 2; + */ + int getSupportedTaskTypesCount(); + /** + *
+     * SupportedTaskTypes are the types of the tasks that the agent can handle.
+     * 
+ * + * repeated string supported_task_types = 2; + */ + java.lang.String getSupportedTaskTypes(int index); + /** + *
+     * SupportedTaskTypes are the types of the tasks that the agent can handle.
+     * 
+ * + * repeated string supported_task_types = 2; + */ + com.google.protobuf.ByteString + getSupportedTaskTypesBytes(int index); + } + /** + *
+   * A message containing the agent metadata.
+   * 
+ * + * Protobuf type {@code flyteidl.admin.Agent} + */ + public static final class Agent extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.Agent) + AgentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Agent.newBuilder() to construct. + private Agent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Agent() { + name_ = ""; + supportedTaskTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Agent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + supportedTaskTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + supportedTaskTypes_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + supportedTaskTypes_ = supportedTaskTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Agent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Agent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.Agent.class, flyteidl.admin.AgentOuterClass.Agent.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Name is the developer-assigned name of the agent.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Name is the developer-assigned name of the agent.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUPPORTED_TASK_TYPES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList supportedTaskTypes_; + /** + *
+     * SupportedTaskTypes are the types of the tasks that the agent can handle.
+     * 
+ * + * repeated string supported_task_types = 2; + */ + public com.google.protobuf.ProtocolStringList + getSupportedTaskTypesList() { + return supportedTaskTypes_; + } + /** + *
+     * SupportedTaskTypes are the types of the tasks that the agent can handle.
+     * 
+ * + * repeated string supported_task_types = 2; + */ + public int getSupportedTaskTypesCount() { + return supportedTaskTypes_.size(); + } + /** + *
+     * SupportedTaskTypes are the types of the tasks that the agent can handle.
+     * 
+ * + * repeated string supported_task_types = 2; + */ + public java.lang.String getSupportedTaskTypes(int index) { + return supportedTaskTypes_.get(index); + } + /** + *
+     * SupportedTaskTypes are the types of the tasks that the agent can handle.
+     * 
+ * + * repeated string supported_task_types = 2; + */ + public com.google.protobuf.ByteString + getSupportedTaskTypesBytes(int index) { + return supportedTaskTypes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < supportedTaskTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, supportedTaskTypes_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedTaskTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(supportedTaskTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getSupportedTaskTypesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof flyteidl.admin.AgentOuterClass.Agent)) { + return super.equals(obj); + } + flyteidl.admin.AgentOuterClass.Agent other = (flyteidl.admin.AgentOuterClass.Agent) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getSupportedTaskTypesList() + .equals(other.getSupportedTaskTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getSupportedTaskTypesCount() > 0) { + hash = (37 * hash) + SUPPORTED_TASK_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getSupportedTaskTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.admin.AgentOuterClass.Agent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.Agent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.Agent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.Agent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.Agent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A message containing the agent metadata.
+     * 
+ * + * Protobuf type {@code flyteidl.admin.Agent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.admin.Agent) + flyteidl.admin.AgentOuterClass.AgentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Agent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Agent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.Agent.class, flyteidl.admin.AgentOuterClass.Agent.Builder.class); + } + + // Construct using flyteidl.admin.AgentOuterClass.Agent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + supportedTaskTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_Agent_descriptor; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.Agent getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.Agent.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.Agent build() { + flyteidl.admin.AgentOuterClass.Agent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.Agent buildPartial() { + flyteidl.admin.AgentOuterClass.Agent result = new flyteidl.admin.AgentOuterClass.Agent(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + if (((bitField0_ & 0x00000002) != 0)) { + supportedTaskTypes_ = supportedTaskTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.supportedTaskTypes_ = supportedTaskTypes_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.admin.AgentOuterClass.Agent) { + return mergeFrom((flyteidl.admin.AgentOuterClass.Agent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.Agent other) { + if (other == flyteidl.admin.AgentOuterClass.Agent.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.supportedTaskTypes_.isEmpty()) { + if (supportedTaskTypes_.isEmpty()) { + supportedTaskTypes_ = other.supportedTaskTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSupportedTaskTypesIsMutable(); + supportedTaskTypes_.addAll(other.supportedTaskTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.admin.AgentOuterClass.Agent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.AgentOuterClass.Agent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+       * Name is the developer-assigned name of the agent.
+       * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name is the developer-assigned name of the agent.
+       * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name is the developer-assigned name of the agent.
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Name is the developer-assigned name of the agent.
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name is the developer-assigned name of the agent.
+       * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList supportedTaskTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSupportedTaskTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + supportedTaskTypes_ = new com.google.protobuf.LazyStringArrayList(supportedTaskTypes_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public com.google.protobuf.ProtocolStringList + getSupportedTaskTypesList() { + return supportedTaskTypes_.getUnmodifiableView(); + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public int getSupportedTaskTypesCount() { + return supportedTaskTypes_.size(); + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public java.lang.String getSupportedTaskTypes(int index) { + return supportedTaskTypes_.get(index); + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public com.google.protobuf.ByteString + getSupportedTaskTypesBytes(int index) { + return supportedTaskTypes_.getByteString(index); + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public Builder setSupportedTaskTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedTaskTypesIsMutable(); + supportedTaskTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public Builder addSupportedTaskTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedTaskTypesIsMutable(); + supportedTaskTypes_.add(value); + onChanged(); + return this; + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public Builder addAllSupportedTaskTypes( + java.lang.Iterable values) { + ensureSupportedTaskTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, supportedTaskTypes_); + onChanged(); + return this; + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public Builder clearSupportedTaskTypes() { + supportedTaskTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * SupportedTaskTypes are the types of the tasks that the agent can handle.
+       * 
+ * + * repeated string supported_task_types = 2; + */ + public Builder addSupportedTaskTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSupportedTaskTypesIsMutable(); + supportedTaskTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.admin.Agent) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.Agent) + private static final flyteidl.admin.AgentOuterClass.Agent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.Agent(); + } + + public static flyteidl.admin.AgentOuterClass.Agent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Agent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Agent(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.Agent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetAgentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.GetAgentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the agent.
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * The name of the agent.
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + *
+   * A request to get an agent.
+   * 
+ * + * Protobuf type {@code flyteidl.admin.GetAgentRequest} + */ + public static final class GetAgentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.GetAgentRequest) + GetAgentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAgentRequest.newBuilder() to construct. + private GetAgentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAgentRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetAgentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.GetAgentRequest.class, flyteidl.admin.AgentOuterClass.GetAgentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * The name of the agent.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * The name of the agent.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof flyteidl.admin.AgentOuterClass.GetAgentRequest)) { + return super.equals(obj); + } + flyteidl.admin.AgentOuterClass.GetAgentRequest other = (flyteidl.admin.AgentOuterClass.GetAgentRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.GetAgentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.GetAgentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A request to get an agent.
+     * 
+ * + * Protobuf type {@code flyteidl.admin.GetAgentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.admin.GetAgentRequest) + flyteidl.admin.AgentOuterClass.GetAgentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.GetAgentRequest.class, flyteidl.admin.AgentOuterClass.GetAgentRequest.Builder.class); + } + + // Construct using flyteidl.admin.AgentOuterClass.GetAgentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentRequest_descriptor; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.GetAgentRequest getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.GetAgentRequest.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.GetAgentRequest build() { + flyteidl.admin.AgentOuterClass.GetAgentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.GetAgentRequest buildPartial() { + flyteidl.admin.AgentOuterClass.GetAgentRequest result = new flyteidl.admin.AgentOuterClass.GetAgentRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.admin.AgentOuterClass.GetAgentRequest) { + return mergeFrom((flyteidl.admin.AgentOuterClass.GetAgentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.GetAgentRequest other) { + if (other == flyteidl.admin.AgentOuterClass.GetAgentRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.admin.AgentOuterClass.GetAgentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.AgentOuterClass.GetAgentRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * The name of the agent.
+       * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the agent.
+       * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the agent.
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the agent.
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * The name of the agent.
+       * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.admin.GetAgentRequest) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.GetAgentRequest) + private static final flyteidl.admin.AgentOuterClass.GetAgentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.GetAgentRequest(); + } + + public static flyteidl.admin.AgentOuterClass.GetAgentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAgentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAgentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.GetAgentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetAgentResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.GetAgentResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .flyteidl.admin.Agent agent = 1; + */ + boolean hasAgent(); + /** + * .flyteidl.admin.Agent agent = 1; + */ + flyteidl.admin.AgentOuterClass.Agent getAgent(); + /** + * .flyteidl.admin.Agent agent = 1; + */ + flyteidl.admin.AgentOuterClass.AgentOrBuilder getAgentOrBuilder(); + } + /** + *
+   * A response containing an agent.
+   * 
+ * + * Protobuf type {@code flyteidl.admin.GetAgentResponse} + */ + public static final class GetAgentResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.GetAgentResponse) + GetAgentResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAgentResponse.newBuilder() to construct. + private GetAgentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAgentResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetAgentResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -6969,16 +10262,605 @@ private DeleteTaskRequest( done = true; break; case 10: { - java.lang.String s = input.readStringRequireUtf8(); + flyteidl.admin.AgentOuterClass.Agent.Builder subBuilder = null; + if (agent_ != null) { + subBuilder = agent_.toBuilder(); + } + agent_ = input.readMessage(flyteidl.admin.AgentOuterClass.Agent.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(agent_); + agent_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.GetAgentResponse.class, flyteidl.admin.AgentOuterClass.GetAgentResponse.Builder.class); + } + + public static final int AGENT_FIELD_NUMBER = 1; + private flyteidl.admin.AgentOuterClass.Agent agent_; + /** + * .flyteidl.admin.Agent agent = 1; + */ + public boolean hasAgent() { + return agent_ != null; + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public flyteidl.admin.AgentOuterClass.Agent getAgent() { + return agent_ == null ? flyteidl.admin.AgentOuterClass.Agent.getDefaultInstance() : agent_; + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public flyteidl.admin.AgentOuterClass.AgentOrBuilder getAgentOrBuilder() { + return getAgent(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (agent_ != null) { + output.writeMessage(1, getAgent()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (agent_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAgent()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof flyteidl.admin.AgentOuterClass.GetAgentResponse)) { + return super.equals(obj); + } + flyteidl.admin.AgentOuterClass.GetAgentResponse other = (flyteidl.admin.AgentOuterClass.GetAgentResponse) obj; + + if (hasAgent() != other.hasAgent()) return false; + if (hasAgent()) { + if (!getAgent() + .equals(other.getAgent())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAgent()) { + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static flyteidl.admin.AgentOuterClass.GetAgentResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.GetAgentResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A response containing an agent.
+     * 
+ * + * Protobuf type {@code flyteidl.admin.GetAgentResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:flyteidl.admin.GetAgentResponse) + flyteidl.admin.AgentOuterClass.GetAgentResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentResponse_descriptor; + } - taskType_ = s; - break; - } - case 18: { + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + flyteidl.admin.AgentOuterClass.GetAgentResponse.class, flyteidl.admin.AgentOuterClass.GetAgentResponse.Builder.class); + } - resourceMeta_ = input.readBytes(); + // Construct using flyteidl.admin.AgentOuterClass.GetAgentResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (agentBuilder_ == null) { + agent_ = null; + } else { + agent_ = null; + agentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_GetAgentResponse_descriptor; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.GetAgentResponse getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.GetAgentResponse.getDefaultInstance(); + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.GetAgentResponse build() { + flyteidl.admin.AgentOuterClass.GetAgentResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.GetAgentResponse buildPartial() { + flyteidl.admin.AgentOuterClass.GetAgentResponse result = new flyteidl.admin.AgentOuterClass.GetAgentResponse(this); + if (agentBuilder_ == null) { + result.agent_ = agent_; + } else { + result.agent_ = agentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof flyteidl.admin.AgentOuterClass.GetAgentResponse) { + return mergeFrom((flyteidl.admin.AgentOuterClass.GetAgentResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.GetAgentResponse other) { + if (other == flyteidl.admin.AgentOuterClass.GetAgentResponse.getDefaultInstance()) return this; + if (other.hasAgent()) { + mergeAgent(other.getAgent()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.admin.AgentOuterClass.GetAgentResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.AgentOuterClass.GetAgentResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private flyteidl.admin.AgentOuterClass.Agent agent_; + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Agent, flyteidl.admin.AgentOuterClass.Agent.Builder, flyteidl.admin.AgentOuterClass.AgentOrBuilder> agentBuilder_; + /** + * .flyteidl.admin.Agent agent = 1; + */ + public boolean hasAgent() { + return agentBuilder_ != null || agent_ != null; + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public flyteidl.admin.AgentOuterClass.Agent getAgent() { + if (agentBuilder_ == null) { + return agent_ == null ? flyteidl.admin.AgentOuterClass.Agent.getDefaultInstance() : agent_; + } else { + return agentBuilder_.getMessage(); + } + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public Builder setAgent(flyteidl.admin.AgentOuterClass.Agent value) { + if (agentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + agent_ = value; + onChanged(); + } else { + agentBuilder_.setMessage(value); + } + + return this; + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public Builder setAgent( + flyteidl.admin.AgentOuterClass.Agent.Builder builderForValue) { + if (agentBuilder_ == null) { + agent_ = builderForValue.build(); + onChanged(); + } else { + agentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public Builder mergeAgent(flyteidl.admin.AgentOuterClass.Agent value) { + if (agentBuilder_ == null) { + if (agent_ != null) { + agent_ = + flyteidl.admin.AgentOuterClass.Agent.newBuilder(agent_).mergeFrom(value).buildPartial(); + } else { + agent_ = value; + } + onChanged(); + } else { + agentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public Builder clearAgent() { + if (agentBuilder_ == null) { + agent_ = null; + onChanged(); + } else { + agent_ = null; + agentBuilder_ = null; + } + + return this; + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public flyteidl.admin.AgentOuterClass.Agent.Builder getAgentBuilder() { + + onChanged(); + return getAgentFieldBuilder().getBuilder(); + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + public flyteidl.admin.AgentOuterClass.AgentOrBuilder getAgentOrBuilder() { + if (agentBuilder_ != null) { + return agentBuilder_.getMessageOrBuilder(); + } else { + return agent_ == null ? + flyteidl.admin.AgentOuterClass.Agent.getDefaultInstance() : agent_; + } + } + /** + * .flyteidl.admin.Agent agent = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Agent, flyteidl.admin.AgentOuterClass.Agent.Builder, flyteidl.admin.AgentOuterClass.AgentOrBuilder> + getAgentFieldBuilder() { + if (agentBuilder_ == null) { + agentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Agent, flyteidl.admin.AgentOuterClass.Agent.Builder, flyteidl.admin.AgentOuterClass.AgentOrBuilder>( + getAgent(), + getParentForChildren(), + isClean()); + agent_ = null; + } + return agentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:flyteidl.admin.GetAgentResponse) + } + + // @@protoc_insertion_point(class_scope:flyteidl.admin.GetAgentResponse) + private static final flyteidl.admin.AgentOuterClass.GetAgentResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.GetAgentResponse(); + } + + public static flyteidl.admin.AgentOuterClass.GetAgentResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAgentResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAgentResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public flyteidl.admin.AgentOuterClass.GetAgentResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ListAgentsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.ListAgentsRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * A request to list all agents.
+   * 
+ * + * Protobuf type {@code flyteidl.admin.ListAgentsRequest} + */ + public static final class ListAgentsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:flyteidl.admin.ListAgentsRequest) + ListAgentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAgentsRequest.newBuilder() to construct. + private ListAgentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAgentsRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListAgentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; break; - } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -7000,70 +10882,15 @@ private DeleteTaskRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskRequest_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskRequest_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.DeleteTaskRequest.class, flyteidl.admin.Agent.DeleteTaskRequest.Builder.class); - } - - public static final int TASK_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object taskType_; - /** - *
-     * A predefined yet extensible Task type identifier.
-     * 
- * - * string task_type = 1; - */ - public java.lang.String getTaskType() { - java.lang.Object ref = taskType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - taskType_ = s; - return s; - } - } - /** - *
-     * A predefined yet extensible Task type identifier.
-     * 
- * - * string task_type = 1; - */ - public com.google.protobuf.ByteString - getTaskTypeBytes() { - java.lang.Object ref = taskType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - taskType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_META_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString resourceMeta_; - /** - *
-     * Metadata about the resource to be pass to the agent.
-     * 
- * - * bytes resource_meta = 2; - */ - public com.google.protobuf.ByteString getResourceMeta() { - return resourceMeta_; + flyteidl.admin.AgentOuterClass.ListAgentsRequest.class, flyteidl.admin.AgentOuterClass.ListAgentsRequest.Builder.class); } private byte memoizedIsInitialized = -1; @@ -7080,12 +10907,6 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTaskTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, taskType_); - } - if (!resourceMeta_.isEmpty()) { - output.writeBytes(2, resourceMeta_); - } unknownFields.writeTo(output); } @@ -7095,13 +10916,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getTaskTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, taskType_); - } - if (!resourceMeta_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, resourceMeta_); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -7112,15 +10926,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof flyteidl.admin.Agent.DeleteTaskRequest)) { + if (!(obj instanceof flyteidl.admin.AgentOuterClass.ListAgentsRequest)) { return super.equals(obj); } - flyteidl.admin.Agent.DeleteTaskRequest other = (flyteidl.admin.Agent.DeleteTaskRequest) obj; + flyteidl.admin.AgentOuterClass.ListAgentsRequest other = (flyteidl.admin.AgentOuterClass.ListAgentsRequest) obj; - if (!getTaskType() - .equals(other.getTaskType())) return false; - if (!getResourceMeta() - .equals(other.getResourceMeta())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7132,78 +10942,74 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TASK_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getTaskType().hashCode(); - hash = (37 * hash) + RESOURCE_META_FIELD_NUMBER; - hash = (53 * hash) + getResourceMeta().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom(byte[] data) + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseDelimitedFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseDelimitedFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7216,7 +11022,7 @@ public static flyteidl.admin.Agent.DeleteTaskRequest parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(flyteidl.admin.Agent.DeleteTaskRequest prototype) { + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.ListAgentsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -7233,29 +11039,29 @@ protected Builder newBuilderForType( } /** *
-     * A message used to delete a task.
+     * A request to list all agents.
      * 
* - * Protobuf type {@code flyteidl.admin.DeleteTaskRequest} + * Protobuf type {@code flyteidl.admin.ListAgentsRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:flyteidl.admin.DeleteTaskRequest) - flyteidl.admin.Agent.DeleteTaskRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:flyteidl.admin.ListAgentsRequest) + flyteidl.admin.AgentOuterClass.ListAgentsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskRequest_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskRequest_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.DeleteTaskRequest.class, flyteidl.admin.Agent.DeleteTaskRequest.Builder.class); + flyteidl.admin.AgentOuterClass.ListAgentsRequest.class, flyteidl.admin.AgentOuterClass.ListAgentsRequest.Builder.class); } - // Construct using flyteidl.admin.Agent.DeleteTaskRequest.newBuilder() + // Construct using flyteidl.admin.AgentOuterClass.ListAgentsRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7273,27 +11079,23 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - taskType_ = ""; - - resourceMeta_ = com.google.protobuf.ByteString.EMPTY; - return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskRequest_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsRequest_descriptor; } @java.lang.Override - public flyteidl.admin.Agent.DeleteTaskRequest getDefaultInstanceForType() { - return flyteidl.admin.Agent.DeleteTaskRequest.getDefaultInstance(); + public flyteidl.admin.AgentOuterClass.ListAgentsRequest getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.ListAgentsRequest.getDefaultInstance(); } @java.lang.Override - public flyteidl.admin.Agent.DeleteTaskRequest build() { - flyteidl.admin.Agent.DeleteTaskRequest result = buildPartial(); + public flyteidl.admin.AgentOuterClass.ListAgentsRequest build() { + flyteidl.admin.AgentOuterClass.ListAgentsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7301,10 +11103,8 @@ public flyteidl.admin.Agent.DeleteTaskRequest build() { } @java.lang.Override - public flyteidl.admin.Agent.DeleteTaskRequest buildPartial() { - flyteidl.admin.Agent.DeleteTaskRequest result = new flyteidl.admin.Agent.DeleteTaskRequest(this); - result.taskType_ = taskType_; - result.resourceMeta_ = resourceMeta_; + public flyteidl.admin.AgentOuterClass.ListAgentsRequest buildPartial() { + flyteidl.admin.AgentOuterClass.ListAgentsRequest result = new flyteidl.admin.AgentOuterClass.ListAgentsRequest(this); onBuilt(); return result; } @@ -7343,181 +11143,44 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof flyteidl.admin.Agent.DeleteTaskRequest) { - return mergeFrom((flyteidl.admin.Agent.DeleteTaskRequest)other); + if (other instanceof flyteidl.admin.AgentOuterClass.ListAgentsRequest) { + return mergeFrom((flyteidl.admin.AgentOuterClass.ListAgentsRequest)other); } else { super.mergeFrom(other); return this; } - } - - public Builder mergeFrom(flyteidl.admin.Agent.DeleteTaskRequest other) { - if (other == flyteidl.admin.Agent.DeleteTaskRequest.getDefaultInstance()) return this; - if (!other.getTaskType().isEmpty()) { - taskType_ = other.taskType_; - onChanged(); - } - if (other.getResourceMeta() != com.google.protobuf.ByteString.EMPTY) { - setResourceMeta(other.getResourceMeta()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - flyteidl.admin.Agent.DeleteTaskRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (flyteidl.admin.Agent.DeleteTaskRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object taskType_ = ""; - /** - *
-       * A predefined yet extensible Task type identifier.
-       * 
- * - * string task_type = 1; - */ - public java.lang.String getTaskType() { - java.lang.Object ref = taskType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - taskType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A predefined yet extensible Task type identifier.
-       * 
- * - * string task_type = 1; - */ - public com.google.protobuf.ByteString - getTaskTypeBytes() { - java.lang.Object ref = taskType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - taskType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A predefined yet extensible Task type identifier.
-       * 
- * - * string task_type = 1; - */ - public Builder setTaskType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - taskType_ = value; - onChanged(); - return this; - } - /** - *
-       * A predefined yet extensible Task type identifier.
-       * 
- * - * string task_type = 1; - */ - public Builder clearTaskType() { - - taskType_ = getDefaultInstance().getTaskType(); - onChanged(); - return this; - } - /** - *
-       * A predefined yet extensible Task type identifier.
-       * 
- * - * string task_type = 1; - */ - public Builder setTaskTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - taskType_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString resourceMeta_ = com.google.protobuf.ByteString.EMPTY; - /** - *
-       * Metadata about the resource to be pass to the agent.
-       * 
- * - * bytes resource_meta = 2; - */ - public com.google.protobuf.ByteString getResourceMeta() { - return resourceMeta_; - } - /** - *
-       * Metadata about the resource to be pass to the agent.
-       * 
- * - * bytes resource_meta = 2; - */ - public Builder setResourceMeta(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceMeta_ = value; - onChanged(); - return this; - } - /** - *
-       * Metadata about the resource to be pass to the agent.
-       * 
- * - * bytes resource_meta = 2; - */ - public Builder clearResourceMeta() { - - resourceMeta_ = getDefaultInstance().getResourceMeta(); + } + + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.ListAgentsRequest other) { + if (other == flyteidl.admin.AgentOuterClass.ListAgentsRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + flyteidl.admin.AgentOuterClass.ListAgentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (flyteidl.admin.AgentOuterClass.ListAgentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -7531,67 +11194,92 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:flyteidl.admin.DeleteTaskRequest) + // @@protoc_insertion_point(builder_scope:flyteidl.admin.ListAgentsRequest) } - // @@protoc_insertion_point(class_scope:flyteidl.admin.DeleteTaskRequest) - private static final flyteidl.admin.Agent.DeleteTaskRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:flyteidl.admin.ListAgentsRequest) + private static final flyteidl.admin.AgentOuterClass.ListAgentsRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new flyteidl.admin.Agent.DeleteTaskRequest(); + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.ListAgentsRequest(); } - public static flyteidl.admin.Agent.DeleteTaskRequest getDefaultInstance() { + public static flyteidl.admin.AgentOuterClass.ListAgentsRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public DeleteTaskRequest parsePartialFrom( + public ListAgentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTaskRequest(input, extensionRegistry); + return new ListAgentsRequest(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public flyteidl.admin.Agent.DeleteTaskRequest getDefaultInstanceForType() { + public flyteidl.admin.AgentOuterClass.ListAgentsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface DeleteTaskResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:flyteidl.admin.DeleteTaskResponse) + public interface ListAgentsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:flyteidl.admin.ListAgentsResponse) com.google.protobuf.MessageOrBuilder { + + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + java.util.List + getAgentsList(); + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + flyteidl.admin.AgentOuterClass.Agent getAgents(int index); + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + int getAgentsCount(); + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + java.util.List + getAgentsOrBuilderList(); + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + flyteidl.admin.AgentOuterClass.AgentOrBuilder getAgentsOrBuilder( + int index); } /** *
-   * Response to delete a task.
+   * A response containing a list of agents.
    * 
* - * Protobuf type {@code flyteidl.admin.DeleteTaskResponse} + * Protobuf type {@code flyteidl.admin.ListAgentsResponse} */ - public static final class DeleteTaskResponse extends + public static final class ListAgentsResponse extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:flyteidl.admin.DeleteTaskResponse) - DeleteTaskResponseOrBuilder { + // @@protoc_insertion_point(message_implements:flyteidl.admin.ListAgentsResponse) + ListAgentsResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use DeleteTaskResponse.newBuilder() to construct. - private DeleteTaskResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use ListAgentsResponse.newBuilder() to construct. + private ListAgentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private DeleteTaskResponse() { + private ListAgentsResponse() { + agents_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -7599,7 +11287,7 @@ private DeleteTaskResponse() { getUnknownFields() { return this.unknownFields; } - private DeleteTaskResponse( + private ListAgentsResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7607,6 +11295,7 @@ private DeleteTaskResponse( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -7617,6 +11306,15 @@ private DeleteTaskResponse( case 0: done = true; break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + agents_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + agents_.add( + input.readMessage(flyteidl.admin.AgentOuterClass.Agent.parser(), extensionRegistry)); + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -7632,21 +11330,59 @@ private DeleteTaskResponse( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + agents_ = java.util.Collections.unmodifiableList(agents_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskResponse_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskResponse_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.DeleteTaskResponse.class, flyteidl.admin.Agent.DeleteTaskResponse.Builder.class); + flyteidl.admin.AgentOuterClass.ListAgentsResponse.class, flyteidl.admin.AgentOuterClass.ListAgentsResponse.Builder.class); + } + + public static final int AGENTS_FIELD_NUMBER = 1; + private java.util.List agents_; + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public java.util.List getAgentsList() { + return agents_; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public java.util.List + getAgentsOrBuilderList() { + return agents_; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public int getAgentsCount() { + return agents_.size(); + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public flyteidl.admin.AgentOuterClass.Agent getAgents(int index) { + return agents_.get(index); + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public flyteidl.admin.AgentOuterClass.AgentOrBuilder getAgentsOrBuilder( + int index) { + return agents_.get(index); } private byte memoizedIsInitialized = -1; @@ -7663,6 +11399,9 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < agents_.size(); i++) { + output.writeMessage(1, agents_.get(i)); + } unknownFields.writeTo(output); } @@ -7672,6 +11411,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + for (int i = 0; i < agents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, agents_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -7682,11 +11425,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof flyteidl.admin.Agent.DeleteTaskResponse)) { + if (!(obj instanceof flyteidl.admin.AgentOuterClass.ListAgentsResponse)) { return super.equals(obj); } - flyteidl.admin.Agent.DeleteTaskResponse other = (flyteidl.admin.Agent.DeleteTaskResponse) obj; + flyteidl.admin.AgentOuterClass.ListAgentsResponse other = (flyteidl.admin.AgentOuterClass.ListAgentsResponse) obj; + if (!getAgentsList() + .equals(other.getAgentsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7698,74 +11443,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + if (getAgentsCount() > 0) { + hash = (37 * hash) + AGENTS_FIELD_NUMBER; + hash = (53 * hash) + getAgentsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom(byte[] data) + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseDelimitedFrom(java.io.InputStream input) + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseDelimitedFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7778,7 +11527,7 @@ public static flyteidl.admin.Agent.DeleteTaskResponse parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(flyteidl.admin.Agent.DeleteTaskResponse prototype) { + public static Builder newBuilder(flyteidl.admin.AgentOuterClass.ListAgentsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -7795,29 +11544,29 @@ protected Builder newBuilderForType( } /** *
-     * Response to delete a task.
+     * A response containing a list of agents.
      * 
* - * Protobuf type {@code flyteidl.admin.DeleteTaskResponse} + * Protobuf type {@code flyteidl.admin.ListAgentsResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:flyteidl.admin.DeleteTaskResponse) - flyteidl.admin.Agent.DeleteTaskResponseOrBuilder { + // @@protoc_insertion_point(builder_implements:flyteidl.admin.ListAgentsResponse) + flyteidl.admin.AgentOuterClass.ListAgentsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskResponse_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskResponse_fieldAccessorTable + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - flyteidl.admin.Agent.DeleteTaskResponse.class, flyteidl.admin.Agent.DeleteTaskResponse.Builder.class); + flyteidl.admin.AgentOuterClass.ListAgentsResponse.class, flyteidl.admin.AgentOuterClass.ListAgentsResponse.Builder.class); } - // Construct using flyteidl.admin.Agent.DeleteTaskResponse.newBuilder() + // Construct using flyteidl.admin.AgentOuterClass.ListAgentsResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7830,28 +11579,35 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { + getAgentsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); + if (agentsBuilder_ == null) { + agents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + agentsBuilder_.clear(); + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return flyteidl.admin.Agent.internal_static_flyteidl_admin_DeleteTaskResponse_descriptor; + return flyteidl.admin.AgentOuterClass.internal_static_flyteidl_admin_ListAgentsResponse_descriptor; } @java.lang.Override - public flyteidl.admin.Agent.DeleteTaskResponse getDefaultInstanceForType() { - return flyteidl.admin.Agent.DeleteTaskResponse.getDefaultInstance(); + public flyteidl.admin.AgentOuterClass.ListAgentsResponse getDefaultInstanceForType() { + return flyteidl.admin.AgentOuterClass.ListAgentsResponse.getDefaultInstance(); } @java.lang.Override - public flyteidl.admin.Agent.DeleteTaskResponse build() { - flyteidl.admin.Agent.DeleteTaskResponse result = buildPartial(); + public flyteidl.admin.AgentOuterClass.ListAgentsResponse build() { + flyteidl.admin.AgentOuterClass.ListAgentsResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7859,8 +11615,18 @@ public flyteidl.admin.Agent.DeleteTaskResponse build() { } @java.lang.Override - public flyteidl.admin.Agent.DeleteTaskResponse buildPartial() { - flyteidl.admin.Agent.DeleteTaskResponse result = new flyteidl.admin.Agent.DeleteTaskResponse(this); + public flyteidl.admin.AgentOuterClass.ListAgentsResponse buildPartial() { + flyteidl.admin.AgentOuterClass.ListAgentsResponse result = new flyteidl.admin.AgentOuterClass.ListAgentsResponse(this); + int from_bitField0_ = bitField0_; + if (agentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + agents_ = java.util.Collections.unmodifiableList(agents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.agents_ = agents_; + } else { + result.agents_ = agentsBuilder_.build(); + } onBuilt(); return result; } @@ -7899,16 +11665,42 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof flyteidl.admin.Agent.DeleteTaskResponse) { - return mergeFrom((flyteidl.admin.Agent.DeleteTaskResponse)other); + if (other instanceof flyteidl.admin.AgentOuterClass.ListAgentsResponse) { + return mergeFrom((flyteidl.admin.AgentOuterClass.ListAgentsResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(flyteidl.admin.Agent.DeleteTaskResponse other) { - if (other == flyteidl.admin.Agent.DeleteTaskResponse.getDefaultInstance()) return this; + public Builder mergeFrom(flyteidl.admin.AgentOuterClass.ListAgentsResponse other) { + if (other == flyteidl.admin.AgentOuterClass.ListAgentsResponse.getDefaultInstance()) return this; + if (agentsBuilder_ == null) { + if (!other.agents_.isEmpty()) { + if (agents_.isEmpty()) { + agents_ = other.agents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAgentsIsMutable(); + agents_.addAll(other.agents_); + } + onChanged(); + } + } else { + if (!other.agents_.isEmpty()) { + if (agentsBuilder_.isEmpty()) { + agentsBuilder_.dispose(); + agentsBuilder_ = null; + agents_ = other.agents_; + bitField0_ = (bitField0_ & ~0x00000001); + agentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAgentsFieldBuilder() : null; + } else { + agentsBuilder_.addAllMessages(other.agents_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -7924,11 +11716,11 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - flyteidl.admin.Agent.DeleteTaskResponse parsedMessage = null; + flyteidl.admin.AgentOuterClass.ListAgentsResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (flyteidl.admin.Agent.DeleteTaskResponse) e.getUnfinishedMessage(); + parsedMessage = (flyteidl.admin.AgentOuterClass.ListAgentsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -7937,6 +11729,247 @@ public Builder mergeFrom( } return this; } + private int bitField0_; + + private java.util.List agents_ = + java.util.Collections.emptyList(); + private void ensureAgentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + agents_ = new java.util.ArrayList(agents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Agent, flyteidl.admin.AgentOuterClass.Agent.Builder, flyteidl.admin.AgentOuterClass.AgentOrBuilder> agentsBuilder_; + + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public java.util.List getAgentsList() { + if (agentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(agents_); + } else { + return agentsBuilder_.getMessageList(); + } + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public int getAgentsCount() { + if (agentsBuilder_ == null) { + return agents_.size(); + } else { + return agentsBuilder_.getCount(); + } + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public flyteidl.admin.AgentOuterClass.Agent getAgents(int index) { + if (agentsBuilder_ == null) { + return agents_.get(index); + } else { + return agentsBuilder_.getMessage(index); + } + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder setAgents( + int index, flyteidl.admin.AgentOuterClass.Agent value) { + if (agentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentsIsMutable(); + agents_.set(index, value); + onChanged(); + } else { + agentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder setAgents( + int index, flyteidl.admin.AgentOuterClass.Agent.Builder builderForValue) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.set(index, builderForValue.build()); + onChanged(); + } else { + agentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder addAgents(flyteidl.admin.AgentOuterClass.Agent value) { + if (agentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentsIsMutable(); + agents_.add(value); + onChanged(); + } else { + agentsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder addAgents( + int index, flyteidl.admin.AgentOuterClass.Agent value) { + if (agentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentsIsMutable(); + agents_.add(index, value); + onChanged(); + } else { + agentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder addAgents( + flyteidl.admin.AgentOuterClass.Agent.Builder builderForValue) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.add(builderForValue.build()); + onChanged(); + } else { + agentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder addAgents( + int index, flyteidl.admin.AgentOuterClass.Agent.Builder builderForValue) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.add(index, builderForValue.build()); + onChanged(); + } else { + agentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder addAllAgents( + java.lang.Iterable values) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, agents_); + onChanged(); + } else { + agentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder clearAgents() { + if (agentsBuilder_ == null) { + agents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + agentsBuilder_.clear(); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public Builder removeAgents(int index) { + if (agentsBuilder_ == null) { + ensureAgentsIsMutable(); + agents_.remove(index); + onChanged(); + } else { + agentsBuilder_.remove(index); + } + return this; + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public flyteidl.admin.AgentOuterClass.Agent.Builder getAgentsBuilder( + int index) { + return getAgentsFieldBuilder().getBuilder(index); + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public flyteidl.admin.AgentOuterClass.AgentOrBuilder getAgentsOrBuilder( + int index) { + if (agentsBuilder_ == null) { + return agents_.get(index); } else { + return agentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public java.util.List + getAgentsOrBuilderList() { + if (agentsBuilder_ != null) { + return agentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(agents_); + } + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public flyteidl.admin.AgentOuterClass.Agent.Builder addAgentsBuilder() { + return getAgentsFieldBuilder().addBuilder( + flyteidl.admin.AgentOuterClass.Agent.getDefaultInstance()); + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public flyteidl.admin.AgentOuterClass.Agent.Builder addAgentsBuilder( + int index) { + return getAgentsFieldBuilder().addBuilder( + index, flyteidl.admin.AgentOuterClass.Agent.getDefaultInstance()); + } + /** + * repeated .flyteidl.admin.Agent agents = 1; + */ + public java.util.List + getAgentsBuilderList() { + return getAgentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Agent, flyteidl.admin.AgentOuterClass.Agent.Builder, flyteidl.admin.AgentOuterClass.AgentOrBuilder> + getAgentsFieldBuilder() { + if (agentsBuilder_ == null) { + agentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + flyteidl.admin.AgentOuterClass.Agent, flyteidl.admin.AgentOuterClass.Agent.Builder, flyteidl.admin.AgentOuterClass.AgentOrBuilder>( + agents_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + agents_ = null; + } + return agentsBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -7950,41 +11983,41 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:flyteidl.admin.DeleteTaskResponse) + // @@protoc_insertion_point(builder_scope:flyteidl.admin.ListAgentsResponse) } - // @@protoc_insertion_point(class_scope:flyteidl.admin.DeleteTaskResponse) - private static final flyteidl.admin.Agent.DeleteTaskResponse DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:flyteidl.admin.ListAgentsResponse) + private static final flyteidl.admin.AgentOuterClass.ListAgentsResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new flyteidl.admin.Agent.DeleteTaskResponse(); + DEFAULT_INSTANCE = new flyteidl.admin.AgentOuterClass.ListAgentsResponse(); } - public static flyteidl.admin.Agent.DeleteTaskResponse getDefaultInstance() { + public static flyteidl.admin.AgentOuterClass.ListAgentsResponse getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public DeleteTaskResponse parsePartialFrom( + public ListAgentsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTaskResponse(input, extensionRegistry); + return new ListAgentsResponse(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public flyteidl.admin.Agent.DeleteTaskResponse getDefaultInstanceForType() { + public flyteidl.admin.AgentOuterClass.ListAgentsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -8045,6 +12078,31 @@ public flyteidl.admin.Agent.DeleteTaskResponse getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_flyteidl_admin_DeleteTaskResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_admin_Agent_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_admin_Agent_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_admin_GetAgentRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_admin_GetAgentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_admin_GetAgentResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_admin_GetAgentResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_admin_ListAgentsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_admin_ListAgentsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_flyteidl_admin_ListAgentsResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_flyteidl_admin_ListAgentsResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -8077,21 +12135,30 @@ public flyteidl.admin.Agent.DeleteTaskResponse getDefaultInstanceForType() { "p\022-\n\010template\030\002 \001(\0132\033.flyteidl.core.Task" + "Template\022\025\n\routput_prefix\030\003 \001(\t\022F\n\027task_" + "execution_metadata\030\004 \001(\0132%.flyteidl.admi" + - "n.TaskExecutionMetadata\"+\n\022CreateTaskRes" + - "ponse\022\025\n\rresource_meta\030\001 \001(\014\":\n\016GetTaskR" + - "equest\022\021\n\ttask_type\030\001 \001(\t\022\025\n\rresource_me" + - "ta\030\002 \001(\014\"h\n\017GetTaskResponse\022*\n\010resource\030" + - "\001 \001(\0132\030.flyteidl.admin.Resource\022)\n\tlog_l" + - "inks\030\002 \003(\0132\026.flyteidl.core.TaskLog\"m\n\010Re" + - "source\022$\n\005state\030\001 \001(\0162\025.flyteidl.admin.S" + - "tate\022*\n\007outputs\030\002 \001(\0132\031.flyteidl.core.Li" + - "teralMap\022\017\n\007message\030\003 \001(\t\"=\n\021DeleteTaskR" + - "equest\022\021\n\ttask_type\030\001 \001(\t\022\025\n\rresource_me" + - "ta\030\002 \001(\014\"\024\n\022DeleteTaskResponse*^\n\005State\022" + - "\025\n\021RETRYABLE_FAILURE\020\000\022\025\n\021PERMANENT_FAIL" + - "URE\020\001\022\013\n\007PENDING\020\002\022\013\n\007RUNNING\020\003\022\r\n\tSUCCE" + - "EDED\020\004B=Z;github.com/flyteorg/flyte/flyt" + - "eidl/gen/pb-go/flyteidl/adminb\006proto3" + "n.TaskExecutionMetadata\"b\n\022CreateTaskRes" + + "ponse\022\027\n\rresource_meta\030\001 \001(\014H\000\022,\n\010resour" + + "ce\030\002 \001(\0132\030.flyteidl.admin.ResourceH\000B\005\n\003" + + "res\":\n\016GetTaskRequest\022\021\n\ttask_type\030\001 \001(\t" + + "\022\025\n\rresource_meta\030\002 \001(\014\"h\n\017GetTaskRespon" + + "se\022*\n\010resource\030\001 \001(\0132\030.flyteidl.admin.Re" + + "source\022)\n\tlog_links\030\002 \003(\0132\026.flyteidl.cor" + + "e.TaskLog\"\230\001\n\010Resource\022$\n\005state\030\001 \001(\0162\025." + + "flyteidl.admin.State\022*\n\007outputs\030\002 \001(\0132\031." + + "flyteidl.core.LiteralMap\022\017\n\007message\030\003 \001(" + + "\t\022)\n\tlog_links\030\004 \003(\0132\026.flyteidl.core.Tas" + + "kLog\"=\n\021DeleteTaskRequest\022\021\n\ttask_type\030\001" + + " \001(\t\022\025\n\rresource_meta\030\002 \001(\014\"\024\n\022DeleteTas" + + "kResponse\"3\n\005Agent\022\014\n\004name\030\001 \001(\t\022\034\n\024supp" + + "orted_task_types\030\002 \003(\t\"\037\n\017GetAgentReques" + + "t\022\014\n\004name\030\001 \001(\t\"8\n\020GetAgentResponse\022$\n\005a" + + "gent\030\001 \001(\0132\025.flyteidl.admin.Agent\"\023\n\021Lis" + + "tAgentsRequest\";\n\022ListAgentsResponse\022%\n\006" + + "agents\030\001 \003(\0132\025.flyteidl.admin.Agent*^\n\005S" + + "tate\022\025\n\021RETRYABLE_FAILURE\020\000\022\025\n\021PERMANENT" + + "_FAILURE\020\001\022\013\n\007PENDING\020\002\022\013\n\007RUNNING\020\003\022\r\n\t" + + "SUCCEEDED\020\004B=Z;github.com/flyteorg/flyte" + + "/flyteidl/gen/pb-go/flyteidl/adminb\006prot" + + "o3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -8145,7 +12212,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_flyteidl_admin_CreateTaskResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_CreateTaskResponse_descriptor, - new java.lang.String[] { "ResourceMeta", }); + new java.lang.String[] { "ResourceMeta", "Resource", "Res", }); internal_static_flyteidl_admin_GetTaskRequest_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_flyteidl_admin_GetTaskRequest_fieldAccessorTable = new @@ -8163,7 +12230,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_flyteidl_admin_Resource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_Resource_descriptor, - new java.lang.String[] { "State", "Outputs", "Message", }); + new java.lang.String[] { "State", "Outputs", "Message", "LogLinks", }); internal_static_flyteidl_admin_DeleteTaskRequest_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_flyteidl_admin_DeleteTaskRequest_fieldAccessorTable = new @@ -8176,6 +12243,36 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_flyteidl_admin_DeleteTaskResponse_descriptor, new java.lang.String[] { }); + internal_static_flyteidl_admin_Agent_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_flyteidl_admin_Agent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_admin_Agent_descriptor, + new java.lang.String[] { "Name", "SupportedTaskTypes", }); + internal_static_flyteidl_admin_GetAgentRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_flyteidl_admin_GetAgentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_admin_GetAgentRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_flyteidl_admin_GetAgentResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_flyteidl_admin_GetAgentResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_admin_GetAgentResponse_descriptor, + new java.lang.String[] { "Agent", }); + internal_static_flyteidl_admin_ListAgentsRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_flyteidl_admin_ListAgentsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_admin_ListAgentsRequest_descriptor, + new java.lang.String[] { }); + internal_static_flyteidl_admin_ListAgentsResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_flyteidl_admin_ListAgentsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_flyteidl_admin_ListAgentsResponse_descriptor, + new java.lang.String[] { "Agents", }); flyteidl.core.Literals.getDescriptor(); flyteidl.core.Tasks.getDescriptor(); flyteidl.core.Interface.getDescriptor(); diff --git a/flyteidl/gen/pb-java/flyteidl/service/Agent.java b/flyteidl/gen/pb-java/flyteidl/service/Agent.java index 8d80085901..a4d582fab0 100644 --- a/flyteidl/gen/pb-java/flyteidl/service/Agent.java +++ b/flyteidl/gen/pb-java/flyteidl/service/Agent.java @@ -24,16 +24,23 @@ public static void registerAllExtensions( static { java.lang.String[] descriptorData = { "\n\034flyteidl/service/agent.proto\022\020flyteidl" + - ".service\032\032flyteidl/admin/agent.proto2\217\002\n" + - "\021AsyncAgentService\022U\n\nCreateTask\022!.flyte" + - "idl.admin.CreateTaskRequest\032\".flyteidl.a" + - "dmin.CreateTaskResponse\"\000\022L\n\007GetTask\022\036.f" + - "lyteidl.admin.GetTaskRequest\032\037.flyteidl." + - "admin.GetTaskResponse\"\000\022U\n\nDeleteTask\022!." + - "flyteidl.admin.DeleteTaskRequest\032\".flyte" + - "idl.admin.DeleteTaskResponse\"\000B?Z=github" + - ".com/flyteorg/flyte/flyteidl/gen/pb-go/f" + - "lyteidl/serviceb\006proto3" + ".service\032\034google/api/annotations.proto\032\032" + + "flyteidl/admin/agent.proto2\217\002\n\021AsyncAgen" + + "tService\022U\n\nCreateTask\022!.flyteidl.admin." + + "CreateTaskRequest\032\".flyteidl.admin.Creat" + + "eTaskResponse\"\000\022L\n\007GetTask\022\036.flyteidl.ad" + + "min.GetTaskRequest\032\037.flyteidl.admin.GetT" + + "askResponse\"\000\022U\n\nDeleteTask\022!.flyteidl.a" + + "dmin.DeleteTaskRequest\032\".flyteidl.admin." + + "DeleteTaskResponse\"\0002\360\001\n\024AgentMetadataSe" + + "rvice\022k\n\010GetAgent\022\037.flyteidl.admin.GetAg" + + "entRequest\032 .flyteidl.admin.GetAgentResp" + + "onse\"\034\202\323\344\223\002\026\022\024/api/v1/agent/{name}\022k\n\nLi" + + "stAgents\022!.flyteidl.admin.ListAgentsRequ" + + "est\032\".flyteidl.admin.ListAgentsResponse\"" + + "\026\202\323\344\223\002\020\022\016/api/v1/agentsB?Z=github.com/fl" + + "yteorg/flyte/flyteidl/gen/pb-go/flyteidl" + + "/serviceb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -46,9 +53,16 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - flyteidl.admin.Agent.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + flyteidl.admin.AgentOuterClass.getDescriptor(), }, assigner); - flyteidl.admin.Agent.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + flyteidl.admin.AgentOuterClass.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 7eabf4c916..9570d8dc7b 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -8028,6 +8028,9 @@ export namespace flyteidl { /** CreateTaskResponse resourceMeta */ resourceMeta?: (Uint8Array|null); + + /** CreateTaskResponse resource */ + resource?: (flyteidl.admin.IResource|null); } /** Represents a CreateTaskResponse. */ @@ -8042,6 +8045,12 @@ export namespace flyteidl { /** CreateTaskResponse resourceMeta. */ public resourceMeta: Uint8Array; + /** CreateTaskResponse resource. */ + public resource?: (flyteidl.admin.IResource|null); + + /** CreateTaskResponse res. */ + public res?: ("resourceMeta"|"resource"); + /** * Creates a new CreateTaskResponse instance using the specified properties. * @param [properties] Properties to set @@ -8202,6 +8211,9 @@ export namespace flyteidl { /** Resource message */ message?: (string|null); + + /** Resource logLinks */ + logLinks?: (flyteidl.core.ITaskLog[]|null); } /** Represents a Resource. */ @@ -8222,6 +8234,9 @@ export namespace flyteidl { /** Resource message. */ public message: string; + /** Resource logLinks. */ + public logLinks: flyteidl.core.ITaskLog[]; + /** * Creates a new Resource instance using the specified properties. * @param [properties] Properties to set @@ -8359,6 +8374,266 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of an Agent. */ + interface IAgent { + + /** Agent name */ + name?: (string|null); + + /** Agent supportedTaskTypes */ + supportedTaskTypes?: (string[]|null); + } + + /** Represents an Agent. */ + class Agent implements IAgent { + + /** + * Constructs a new Agent. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IAgent); + + /** Agent name. */ + public name: string; + + /** Agent supportedTaskTypes. */ + public supportedTaskTypes: string[]; + + /** + * Creates a new Agent instance using the specified properties. + * @param [properties] Properties to set + * @returns Agent instance + */ + public static create(properties?: flyteidl.admin.IAgent): flyteidl.admin.Agent; + + /** + * Encodes the specified Agent message. Does not implicitly {@link flyteidl.admin.Agent.verify|verify} messages. + * @param message Agent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IAgent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Agent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Agent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.Agent; + + /** + * Verifies an Agent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of a GetAgentRequest. */ + interface IGetAgentRequest { + + /** GetAgentRequest name */ + name?: (string|null); + } + + /** Represents a GetAgentRequest. */ + class GetAgentRequest implements IGetAgentRequest { + + /** + * Constructs a new GetAgentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IGetAgentRequest); + + /** GetAgentRequest name. */ + public name: string; + + /** + * Creates a new GetAgentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAgentRequest instance + */ + public static create(properties?: flyteidl.admin.IGetAgentRequest): flyteidl.admin.GetAgentRequest; + + /** + * Encodes the specified GetAgentRequest message. Does not implicitly {@link flyteidl.admin.GetAgentRequest.verify|verify} messages. + * @param message GetAgentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IGetAgentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAgentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.GetAgentRequest; + + /** + * Verifies a GetAgentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of a GetAgentResponse. */ + interface IGetAgentResponse { + + /** GetAgentResponse agent */ + agent?: (flyteidl.admin.IAgent|null); + } + + /** Represents a GetAgentResponse. */ + class GetAgentResponse implements IGetAgentResponse { + + /** + * Constructs a new GetAgentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IGetAgentResponse); + + /** GetAgentResponse agent. */ + public agent?: (flyteidl.admin.IAgent|null); + + /** + * Creates a new GetAgentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAgentResponse instance + */ + public static create(properties?: flyteidl.admin.IGetAgentResponse): flyteidl.admin.GetAgentResponse; + + /** + * Encodes the specified GetAgentResponse message. Does not implicitly {@link flyteidl.admin.GetAgentResponse.verify|verify} messages. + * @param message GetAgentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IGetAgentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAgentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAgentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.GetAgentResponse; + + /** + * Verifies a GetAgentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of a ListAgentsRequest. */ + interface IListAgentsRequest { + } + + /** Represents a ListAgentsRequest. */ + class ListAgentsRequest implements IListAgentsRequest { + + /** + * Constructs a new ListAgentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IListAgentsRequest); + + /** + * Creates a new ListAgentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAgentsRequest instance + */ + public static create(properties?: flyteidl.admin.IListAgentsRequest): flyteidl.admin.ListAgentsRequest; + + /** + * Encodes the specified ListAgentsRequest message. Does not implicitly {@link flyteidl.admin.ListAgentsRequest.verify|verify} messages. + * @param message ListAgentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IListAgentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAgentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.ListAgentsRequest; + + /** + * Verifies a ListAgentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of a ListAgentsResponse. */ + interface IListAgentsResponse { + + /** ListAgentsResponse agents */ + agents?: (flyteidl.admin.IAgent[]|null); + } + + /** Represents a ListAgentsResponse. */ + class ListAgentsResponse implements IListAgentsResponse { + + /** + * Constructs a new ListAgentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.admin.IListAgentsResponse); + + /** ListAgentsResponse agents. */ + public agents: flyteidl.admin.IAgent[]; + + /** + * Creates a new ListAgentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAgentsResponse instance + */ + public static create(properties?: flyteidl.admin.IListAgentsResponse): flyteidl.admin.ListAgentsResponse; + + /** + * Encodes the specified ListAgentsResponse message. Does not implicitly {@link flyteidl.admin.ListAgentsResponse.verify|verify} messages. + * @param message ListAgentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.admin.IListAgentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAgentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.admin.ListAgentsResponse; + + /** + * Verifies a ListAgentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a ClusterAssignment. */ interface IClusterAssignment { @@ -19736,6 +20011,72 @@ export namespace flyteidl { type DeleteTaskCallback = (error: (Error|null), response?: flyteidl.admin.DeleteTaskResponse) => void; } + /** Represents an AgentMetadataService */ + class AgentMetadataService extends $protobuf.rpc.Service { + + /** + * Constructs a new AgentMetadataService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new AgentMetadataService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AgentMetadataService; + + /** + * Calls GetAgent. + * @param request GetAgentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GetAgentResponse + */ + public getAgent(request: flyteidl.admin.IGetAgentRequest, callback: flyteidl.service.AgentMetadataService.GetAgentCallback): void; + + /** + * Calls GetAgent. + * @param request GetAgentRequest message or plain object + * @returns Promise + */ + public getAgent(request: flyteidl.admin.IGetAgentRequest): Promise; + + /** + * Calls ListAgents. + * @param request ListAgentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAgentsResponse + */ + public listAgents(request: flyteidl.admin.IListAgentsRequest, callback: flyteidl.service.AgentMetadataService.ListAgentsCallback): void; + + /** + * Calls ListAgents. + * @param request ListAgentsRequest message or plain object + * @returns Promise + */ + public listAgents(request: flyteidl.admin.IListAgentsRequest): Promise; + } + + namespace AgentMetadataService { + + /** + * Callback as used by {@link flyteidl.service.AgentMetadataService#getAgent}. + * @param error Error, if any + * @param [response] GetAgentResponse + */ + type GetAgentCallback = (error: (Error|null), response?: flyteidl.admin.GetAgentResponse) => void; + + /** + * Callback as used by {@link flyteidl.service.AgentMetadataService#listAgents}. + * @param error Error, if any + * @param [response] ListAgentsResponse + */ + type ListAgentsCallback = (error: (Error|null), response?: flyteidl.admin.ListAgentsResponse) => void; + } + /** Properties of a OAuth2MetadataRequest. */ interface IOAuth2MetadataRequest { } diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 303991d68e..ff88e85cd1 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -19663,6 +19663,7 @@ * @memberof flyteidl.admin * @interface ICreateTaskResponse * @property {Uint8Array|null} [resourceMeta] CreateTaskResponse resourceMeta + * @property {flyteidl.admin.IResource|null} [resource] CreateTaskResponse resource */ /** @@ -19688,6 +19689,28 @@ */ CreateTaskResponse.prototype.resourceMeta = $util.newBuffer([]); + /** + * CreateTaskResponse resource. + * @member {flyteidl.admin.IResource|null|undefined} resource + * @memberof flyteidl.admin.CreateTaskResponse + * @instance + */ + CreateTaskResponse.prototype.resource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CreateTaskResponse res. + * @member {"resourceMeta"|"resource"|undefined} res + * @memberof flyteidl.admin.CreateTaskResponse + * @instance + */ + Object.defineProperty(CreateTaskResponse.prototype, "res", { + get: $util.oneOfGetter($oneOfFields = ["resourceMeta", "resource"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CreateTaskResponse instance using the specified properties. * @function create @@ -19714,6 +19737,8 @@ writer = $Writer.create(); if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.resourceMeta); + if (message.resource != null && message.hasOwnProperty("resource")) + $root.flyteidl.admin.Resource.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -19738,6 +19763,9 @@ case 1: message.resourceMeta = reader.bytes(); break; + case 2: + message.resource = $root.flyteidl.admin.Resource.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -19757,9 +19785,22 @@ CreateTaskResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) + var properties = {}; + if (message.resourceMeta != null && message.hasOwnProperty("resourceMeta")) { + properties.res = 1; if (!(message.resourceMeta && typeof message.resourceMeta.length === "number" || $util.isString(message.resourceMeta))) return "resourceMeta: buffer expected"; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + if (properties.res === 1) + return "res: multiple values"; + properties.res = 1; + { + var error = $root.flyteidl.admin.Resource.verify(message.resource); + if (error) + return "resource." + error; + } + } return null; }; @@ -20041,6 +20082,7 @@ * @property {flyteidl.admin.State|null} [state] Resource state * @property {flyteidl.core.ILiteralMap|null} [outputs] Resource outputs * @property {string|null} [message] Resource message + * @property {Array.|null} [logLinks] Resource logLinks */ /** @@ -20052,6 +20094,7 @@ * @param {flyteidl.admin.IResource=} [properties] Properties to set */ function Resource(properties) { + this.logLinks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20082,6 +20125,14 @@ */ Resource.prototype.message = ""; + /** + * Resource logLinks. + * @member {Array.} logLinks + * @memberof flyteidl.admin.Resource + * @instance + */ + Resource.prototype.logLinks = $util.emptyArray; + /** * Creates a new Resource instance using the specified properties. * @function create @@ -20112,6 +20163,9 @@ $root.flyteidl.core.LiteralMap.encode(message.outputs, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.message != null && message.hasOwnProperty("message")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); + if (message.logLinks != null && message.logLinks.length) + for (var i = 0; i < message.logLinks.length; ++i) + $root.flyteidl.core.TaskLog.encode(message.logLinks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -20142,6 +20196,11 @@ case 3: message.message = reader.string(); break; + case 4: + if (!(message.logLinks && message.logLinks.length)) + message.logLinks = []; + message.logLinks.push($root.flyteidl.core.TaskLog.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -20180,6 +20239,15 @@ if (message.message != null && message.hasOwnProperty("message")) if (!$util.isString(message.message)) return "message: string expected"; + if (message.logLinks != null && message.hasOwnProperty("logLinks")) { + if (!Array.isArray(message.logLinks)) + return "logLinks: array expected"; + for (var i = 0; i < message.logLinks.length; ++i) { + var error = $root.flyteidl.core.TaskLog.verify(message.logLinks[i]); + if (error) + return "logLinks." + error; + } + } return null; }; @@ -20406,6 +20474,576 @@ return DeleteTaskResponse; })(); + admin.Agent = (function() { + + /** + * Properties of an Agent. + * @memberof flyteidl.admin + * @interface IAgent + * @property {string|null} [name] Agent name + * @property {Array.|null} [supportedTaskTypes] Agent supportedTaskTypes + */ + + /** + * Constructs a new Agent. + * @memberof flyteidl.admin + * @classdesc Represents an Agent. + * @implements IAgent + * @constructor + * @param {flyteidl.admin.IAgent=} [properties] Properties to set + */ + function Agent(properties) { + this.supportedTaskTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Agent name. + * @member {string} name + * @memberof flyteidl.admin.Agent + * @instance + */ + Agent.prototype.name = ""; + + /** + * Agent supportedTaskTypes. + * @member {Array.} supportedTaskTypes + * @memberof flyteidl.admin.Agent + * @instance + */ + Agent.prototype.supportedTaskTypes = $util.emptyArray; + + /** + * Creates a new Agent instance using the specified properties. + * @function create + * @memberof flyteidl.admin.Agent + * @static + * @param {flyteidl.admin.IAgent=} [properties] Properties to set + * @returns {flyteidl.admin.Agent} Agent instance + */ + Agent.create = function create(properties) { + return new Agent(properties); + }; + + /** + * Encodes the specified Agent message. Does not implicitly {@link flyteidl.admin.Agent.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.Agent + * @static + * @param {flyteidl.admin.IAgent} message Agent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Agent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.supportedTaskTypes != null && message.supportedTaskTypes.length) + for (var i = 0; i < message.supportedTaskTypes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.supportedTaskTypes[i]); + return writer; + }; + + /** + * Decodes an Agent message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.Agent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.Agent} Agent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Agent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.Agent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.supportedTaskTypes && message.supportedTaskTypes.length)) + message.supportedTaskTypes = []; + message.supportedTaskTypes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an Agent message. + * @function verify + * @memberof flyteidl.admin.Agent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Agent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.supportedTaskTypes != null && message.hasOwnProperty("supportedTaskTypes")) { + if (!Array.isArray(message.supportedTaskTypes)) + return "supportedTaskTypes: array expected"; + for (var i = 0; i < message.supportedTaskTypes.length; ++i) + if (!$util.isString(message.supportedTaskTypes[i])) + return "supportedTaskTypes: string[] expected"; + } + return null; + }; + + return Agent; + })(); + + admin.GetAgentRequest = (function() { + + /** + * Properties of a GetAgentRequest. + * @memberof flyteidl.admin + * @interface IGetAgentRequest + * @property {string|null} [name] GetAgentRequest name + */ + + /** + * Constructs a new GetAgentRequest. + * @memberof flyteidl.admin + * @classdesc Represents a GetAgentRequest. + * @implements IGetAgentRequest + * @constructor + * @param {flyteidl.admin.IGetAgentRequest=} [properties] Properties to set + */ + function GetAgentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAgentRequest name. + * @member {string} name + * @memberof flyteidl.admin.GetAgentRequest + * @instance + */ + GetAgentRequest.prototype.name = ""; + + /** + * Creates a new GetAgentRequest instance using the specified properties. + * @function create + * @memberof flyteidl.admin.GetAgentRequest + * @static + * @param {flyteidl.admin.IGetAgentRequest=} [properties] Properties to set + * @returns {flyteidl.admin.GetAgentRequest} GetAgentRequest instance + */ + GetAgentRequest.create = function create(properties) { + return new GetAgentRequest(properties); + }; + + /** + * Encodes the specified GetAgentRequest message. Does not implicitly {@link flyteidl.admin.GetAgentRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.GetAgentRequest + * @static + * @param {flyteidl.admin.IGetAgentRequest} message GetAgentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAgentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Decodes a GetAgentRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.GetAgentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.GetAgentRequest} GetAgentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAgentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.GetAgentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a GetAgentRequest message. + * @function verify + * @memberof flyteidl.admin.GetAgentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAgentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + return GetAgentRequest; + })(); + + admin.GetAgentResponse = (function() { + + /** + * Properties of a GetAgentResponse. + * @memberof flyteidl.admin + * @interface IGetAgentResponse + * @property {flyteidl.admin.IAgent|null} [agent] GetAgentResponse agent + */ + + /** + * Constructs a new GetAgentResponse. + * @memberof flyteidl.admin + * @classdesc Represents a GetAgentResponse. + * @implements IGetAgentResponse + * @constructor + * @param {flyteidl.admin.IGetAgentResponse=} [properties] Properties to set + */ + function GetAgentResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAgentResponse agent. + * @member {flyteidl.admin.IAgent|null|undefined} agent + * @memberof flyteidl.admin.GetAgentResponse + * @instance + */ + GetAgentResponse.prototype.agent = null; + + /** + * Creates a new GetAgentResponse instance using the specified properties. + * @function create + * @memberof flyteidl.admin.GetAgentResponse + * @static + * @param {flyteidl.admin.IGetAgentResponse=} [properties] Properties to set + * @returns {flyteidl.admin.GetAgentResponse} GetAgentResponse instance + */ + GetAgentResponse.create = function create(properties) { + return new GetAgentResponse(properties); + }; + + /** + * Encodes the specified GetAgentResponse message. Does not implicitly {@link flyteidl.admin.GetAgentResponse.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.GetAgentResponse + * @static + * @param {flyteidl.admin.IGetAgentResponse} message GetAgentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAgentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agent != null && message.hasOwnProperty("agent")) + $root.flyteidl.admin.Agent.encode(message.agent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Decodes a GetAgentResponse message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.GetAgentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.GetAgentResponse} GetAgentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAgentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.GetAgentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.agent = $root.flyteidl.admin.Agent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a GetAgentResponse message. + * @function verify + * @memberof flyteidl.admin.GetAgentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAgentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agent != null && message.hasOwnProperty("agent")) { + var error = $root.flyteidl.admin.Agent.verify(message.agent); + if (error) + return "agent." + error; + } + return null; + }; + + return GetAgentResponse; + })(); + + admin.ListAgentsRequest = (function() { + + /** + * Properties of a ListAgentsRequest. + * @memberof flyteidl.admin + * @interface IListAgentsRequest + */ + + /** + * Constructs a new ListAgentsRequest. + * @memberof flyteidl.admin + * @classdesc Represents a ListAgentsRequest. + * @implements IListAgentsRequest + * @constructor + * @param {flyteidl.admin.IListAgentsRequest=} [properties] Properties to set + */ + function ListAgentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ListAgentsRequest instance using the specified properties. + * @function create + * @memberof flyteidl.admin.ListAgentsRequest + * @static + * @param {flyteidl.admin.IListAgentsRequest=} [properties] Properties to set + * @returns {flyteidl.admin.ListAgentsRequest} ListAgentsRequest instance + */ + ListAgentsRequest.create = function create(properties) { + return new ListAgentsRequest(properties); + }; + + /** + * Encodes the specified ListAgentsRequest message. Does not implicitly {@link flyteidl.admin.ListAgentsRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.ListAgentsRequest + * @static + * @param {flyteidl.admin.IListAgentsRequest} message ListAgentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAgentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Decodes a ListAgentsRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.ListAgentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.ListAgentsRequest} ListAgentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAgentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.ListAgentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a ListAgentsRequest message. + * @function verify + * @memberof flyteidl.admin.ListAgentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAgentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + return ListAgentsRequest; + })(); + + admin.ListAgentsResponse = (function() { + + /** + * Properties of a ListAgentsResponse. + * @memberof flyteidl.admin + * @interface IListAgentsResponse + * @property {Array.|null} [agents] ListAgentsResponse agents + */ + + /** + * Constructs a new ListAgentsResponse. + * @memberof flyteidl.admin + * @classdesc Represents a ListAgentsResponse. + * @implements IListAgentsResponse + * @constructor + * @param {flyteidl.admin.IListAgentsResponse=} [properties] Properties to set + */ + function ListAgentsResponse(properties) { + this.agents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAgentsResponse agents. + * @member {Array.} agents + * @memberof flyteidl.admin.ListAgentsResponse + * @instance + */ + ListAgentsResponse.prototype.agents = $util.emptyArray; + + /** + * Creates a new ListAgentsResponse instance using the specified properties. + * @function create + * @memberof flyteidl.admin.ListAgentsResponse + * @static + * @param {flyteidl.admin.IListAgentsResponse=} [properties] Properties to set + * @returns {flyteidl.admin.ListAgentsResponse} ListAgentsResponse instance + */ + ListAgentsResponse.create = function create(properties) { + return new ListAgentsResponse(properties); + }; + + /** + * Encodes the specified ListAgentsResponse message. Does not implicitly {@link flyteidl.admin.ListAgentsResponse.verify|verify} messages. + * @function encode + * @memberof flyteidl.admin.ListAgentsResponse + * @static + * @param {flyteidl.admin.IListAgentsResponse} message ListAgentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAgentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agents != null && message.agents.length) + for (var i = 0; i < message.agents.length; ++i) + $root.flyteidl.admin.Agent.encode(message.agents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Decodes a ListAgentsResponse message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.admin.ListAgentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.admin.ListAgentsResponse} ListAgentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAgentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.admin.ListAgentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.agents && message.agents.length)) + message.agents = []; + message.agents.push($root.flyteidl.admin.Agent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a ListAgentsResponse message. + * @function verify + * @memberof flyteidl.admin.ListAgentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAgentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agents != null && message.hasOwnProperty("agents")) { + if (!Array.isArray(message.agents)) + return "agents: array expected"; + for (var i = 0; i < message.agents.length; ++i) { + var error = $root.flyteidl.admin.Agent.verify(message.agents[i]); + if (error) + return "agents." + error; + } + } + return null; + }; + + return ListAgentsResponse; + })(); + admin.ClusterAssignment = (function() { /** @@ -46174,6 +46812,107 @@ return AsyncAgentService; })(); + service.AgentMetadataService = (function() { + + /** + * Constructs a new AgentMetadataService service. + * @memberof flyteidl.service + * @classdesc Represents an AgentMetadataService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function AgentMetadataService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AgentMetadataService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AgentMetadataService; + + /** + * Creates new AgentMetadataService service using the specified rpc implementation. + * @function create + * @memberof flyteidl.service.AgentMetadataService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {AgentMetadataService} RPC service. Useful where requests and/or responses are streamed. + */ + AgentMetadataService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link flyteidl.service.AgentMetadataService#getAgent}. + * @memberof flyteidl.service.AgentMetadataService + * @typedef GetAgentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {flyteidl.admin.GetAgentResponse} [response] GetAgentResponse + */ + + /** + * Calls GetAgent. + * @function getAgent + * @memberof flyteidl.service.AgentMetadataService + * @instance + * @param {flyteidl.admin.IGetAgentRequest} request GetAgentRequest message or plain object + * @param {flyteidl.service.AgentMetadataService.GetAgentCallback} callback Node-style callback called with the error, if any, and GetAgentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AgentMetadataService.prototype.getAgent = function getAgent(request, callback) { + return this.rpcCall(getAgent, $root.flyteidl.admin.GetAgentRequest, $root.flyteidl.admin.GetAgentResponse, request, callback); + }, "name", { value: "GetAgent" }); + + /** + * Calls GetAgent. + * @function getAgent + * @memberof flyteidl.service.AgentMetadataService + * @instance + * @param {flyteidl.admin.IGetAgentRequest} request GetAgentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link flyteidl.service.AgentMetadataService#listAgents}. + * @memberof flyteidl.service.AgentMetadataService + * @typedef ListAgentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {flyteidl.admin.ListAgentsResponse} [response] ListAgentsResponse + */ + + /** + * Calls ListAgents. + * @function listAgents + * @memberof flyteidl.service.AgentMetadataService + * @instance + * @param {flyteidl.admin.IListAgentsRequest} request ListAgentsRequest message or plain object + * @param {flyteidl.service.AgentMetadataService.ListAgentsCallback} callback Node-style callback called with the error, if any, and ListAgentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AgentMetadataService.prototype.listAgents = function listAgents(request, callback) { + return this.rpcCall(listAgents, $root.flyteidl.admin.ListAgentsRequest, $root.flyteidl.admin.ListAgentsResponse, request, callback); + }, "name", { value: "ListAgents" }); + + /** + * Calls ListAgents. + * @function listAgents + * @memberof flyteidl.service.AgentMetadataService + * @instance + * @param {flyteidl.admin.IListAgentsRequest} request ListAgentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AgentMetadataService; + })(); + service.OAuth2MetadataRequest = (function() { /** diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py index c16839946c..5d515cb0c4 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.py @@ -18,7 +18,7 @@ from flyteidl.core import execution_pb2 as flyteidl_dot_core_dot_execution__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/admin/agent.proto\x12\x0e\x66lyteidl.admin\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x1d\x66lyteidl/core/interface.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1d\x66lyteidl/core/execution.proto\"\x98\x05\n\x15TaskExecutionMetadata\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x31.flyteidl.admin.TaskExecutionMetadata.LabelsEntryR\x06labels\x12X\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x36.flyteidl.admin.TaskExecutionMetadata.AnnotationsEntryR\x0b\x61nnotations\x12.\n\x13k8s_service_account\x18\x05 \x01(\tR\x11k8sServiceAccount\x12t\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32?.flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntryR\x14\x65nvironmentVariables\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aG\n\x19\x45nvironmentVariablesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x83\x02\n\x11\x43reateTaskRequest\x12\x31\n\x06inputs\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x37\n\x08template\x18\x02 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x03 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x04 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\"9\n\x12\x43reateTaskResponse\x12#\n\rresource_meta\x18\x01 \x01(\x0cR\x0cresourceMeta\"R\n\x0eGetTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"|\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\x12\x33\n\tlog_links\x18\x02 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\"\x86\x01\n\x08Resource\x12+\n\x05state\x18\x01 \x01(\x0e\x32\x15.flyteidl.admin.StateR\x05state\x12\x33\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x07outputs\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\"U\n\x11\x44\x65leteTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"\x14\n\x12\x44\x65leteTaskResponse*^\n\x05State\x12\x15\n\x11RETRYABLE_FAILURE\x10\x00\x12\x15\n\x11PERMANENT_FAILURE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x42\xb6\x01\n\x12\x63om.flyteidl.adminB\nAgentProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/admin/agent.proto\x12\x0e\x66lyteidl.admin\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x19\x66lyteidl/core/tasks.proto\x1a\x1d\x66lyteidl/core/interface.proto\x1a\x1e\x66lyteidl/core/identifier.proto\x1a\x1d\x66lyteidl/core/execution.proto\"\x98\x05\n\x15TaskExecutionMetadata\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12I\n\x06labels\x18\x03 \x03(\x0b\x32\x31.flyteidl.admin.TaskExecutionMetadata.LabelsEntryR\x06labels\x12X\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x36.flyteidl.admin.TaskExecutionMetadata.AnnotationsEntryR\x0b\x61nnotations\x12.\n\x13k8s_service_account\x18\x05 \x01(\tR\x11k8sServiceAccount\x12t\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32?.flyteidl.admin.TaskExecutionMetadata.EnvironmentVariablesEntryR\x14\x65nvironmentVariables\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1aG\n\x19\x45nvironmentVariablesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x83\x02\n\x11\x43reateTaskRequest\x12\x31\n\x06inputs\x18\x01 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x06inputs\x12\x37\n\x08template\x18\x02 \x01(\x0b\x32\x1b.flyteidl.core.TaskTemplateR\x08template\x12#\n\routput_prefix\x18\x03 \x01(\tR\x0coutputPrefix\x12]\n\x17task_execution_metadata\x18\x04 \x01(\x0b\x32%.flyteidl.admin.TaskExecutionMetadataR\x15taskExecutionMetadata\"z\n\x12\x43reateTaskResponse\x12%\n\rresource_meta\x18\x01 \x01(\x0cH\x00R\x0cresourceMeta\x12\x36\n\x08resource\x18\x02 \x01(\x0b\x32\x18.flyteidl.admin.ResourceH\x00R\x08resourceB\x05\n\x03res\"R\n\x0eGetTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"|\n\x0fGetTaskResponse\x12\x34\n\x08resource\x18\x01 \x01(\x0b\x32\x18.flyteidl.admin.ResourceR\x08resource\x12\x33\n\tlog_links\x18\x02 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\"\xbb\x01\n\x08Resource\x12+\n\x05state\x18\x01 \x01(\x0e\x32\x15.flyteidl.admin.StateR\x05state\x12\x33\n\x07outputs\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapR\x07outputs\x12\x18\n\x07message\x18\x03 \x01(\tR\x07message\x12\x33\n\tlog_links\x18\x04 \x03(\x0b\x32\x16.flyteidl.core.TaskLogR\x08logLinks\"U\n\x11\x44\x65leteTaskRequest\x12\x1b\n\ttask_type\x18\x01 \x01(\tR\x08taskType\x12#\n\rresource_meta\x18\x02 \x01(\x0cR\x0cresourceMeta\"\x14\n\x12\x44\x65leteTaskResponse\"M\n\x05\x41gent\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x30\n\x14supported_task_types\x18\x02 \x03(\tR\x12supportedTaskTypes\"%\n\x0fGetAgentRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"?\n\x10GetAgentResponse\x12+\n\x05\x61gent\x18\x01 \x01(\x0b\x32\x15.flyteidl.admin.AgentR\x05\x61gent\"\x13\n\x11ListAgentsRequest\"C\n\x12ListAgentsResponse\x12-\n\x06\x61gents\x18\x01 \x03(\x0b\x32\x15.flyteidl.admin.AgentR\x06\x61gents*^\n\x05State\x12\x15\n\x11RETRYABLE_FAILURE\x10\x00\x12\x15\n\x11PERMANENT_FAILURE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x42\xb6\x01\n\x12\x63om.flyteidl.adminB\nAgentProtoP\x01Z;github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin\xa2\x02\x03\x46\x41X\xaa\x02\x0e\x46lyteidl.Admin\xca\x02\x0e\x46lyteidl\\Admin\xe2\x02\x1a\x46lyteidl\\Admin\\GPBMetadata\xea\x02\x0f\x46lyteidl::Adminb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -33,8 +33,8 @@ _TASKEXECUTIONMETADATA_ANNOTATIONSENTRY._serialized_options = b'8\001' _TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY._options = None _TASKEXECUTIONMETADATA_ENVIRONMENTVARIABLESENTRY._serialized_options = b'8\001' - _globals['_STATE']._serialized_start=1641 - _globals['_STATE']._serialized_end=1735 + _globals['_STATE']._serialized_start=2032 + _globals['_STATE']._serialized_end=2126 _globals['_TASKEXECUTIONMETADATA']._serialized_start=198 _globals['_TASKEXECUTIONMETADATA']._serialized_end=862 _globals['_TASKEXECUTIONMETADATA_LABELSENTRY']._serialized_start=668 @@ -46,15 +46,25 @@ _globals['_CREATETASKREQUEST']._serialized_start=865 _globals['_CREATETASKREQUEST']._serialized_end=1124 _globals['_CREATETASKRESPONSE']._serialized_start=1126 - _globals['_CREATETASKRESPONSE']._serialized_end=1183 - _globals['_GETTASKREQUEST']._serialized_start=1185 - _globals['_GETTASKREQUEST']._serialized_end=1267 - _globals['_GETTASKRESPONSE']._serialized_start=1269 - _globals['_GETTASKRESPONSE']._serialized_end=1393 - _globals['_RESOURCE']._serialized_start=1396 - _globals['_RESOURCE']._serialized_end=1530 - _globals['_DELETETASKREQUEST']._serialized_start=1532 - _globals['_DELETETASKREQUEST']._serialized_end=1617 - _globals['_DELETETASKRESPONSE']._serialized_start=1619 - _globals['_DELETETASKRESPONSE']._serialized_end=1639 + _globals['_CREATETASKRESPONSE']._serialized_end=1248 + _globals['_GETTASKREQUEST']._serialized_start=1250 + _globals['_GETTASKREQUEST']._serialized_end=1332 + _globals['_GETTASKRESPONSE']._serialized_start=1334 + _globals['_GETTASKRESPONSE']._serialized_end=1458 + _globals['_RESOURCE']._serialized_start=1461 + _globals['_RESOURCE']._serialized_end=1648 + _globals['_DELETETASKREQUEST']._serialized_start=1650 + _globals['_DELETETASKREQUEST']._serialized_end=1735 + _globals['_DELETETASKRESPONSE']._serialized_start=1737 + _globals['_DELETETASKRESPONSE']._serialized_end=1757 + _globals['_AGENT']._serialized_start=1759 + _globals['_AGENT']._serialized_end=1836 + _globals['_GETAGENTREQUEST']._serialized_start=1838 + _globals['_GETAGENTREQUEST']._serialized_end=1875 + _globals['_GETAGENTRESPONSE']._serialized_start=1877 + _globals['_GETAGENTRESPONSE']._serialized_end=1940 + _globals['_LISTAGENTSREQUEST']._serialized_start=1942 + _globals['_LISTAGENTSREQUEST']._serialized_end=1961 + _globals['_LISTAGENTSRESPONSE']._serialized_start=1963 + _globals['_LISTAGENTSRESPONSE']._serialized_end=2030 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi index 0fd64d8e10..3b80e41b58 100644 --- a/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/admin/agent_pb2.pyi @@ -74,10 +74,12 @@ class CreateTaskRequest(_message.Message): def __init__(self, inputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ..., template: _Optional[_Union[_tasks_pb2.TaskTemplate, _Mapping]] = ..., output_prefix: _Optional[str] = ..., task_execution_metadata: _Optional[_Union[TaskExecutionMetadata, _Mapping]] = ...) -> None: ... class CreateTaskResponse(_message.Message): - __slots__ = ["resource_meta"] + __slots__ = ["resource_meta", "resource"] RESOURCE_META_FIELD_NUMBER: _ClassVar[int] + RESOURCE_FIELD_NUMBER: _ClassVar[int] resource_meta: bytes - def __init__(self, resource_meta: _Optional[bytes] = ...) -> None: ... + resource: Resource + def __init__(self, resource_meta: _Optional[bytes] = ..., resource: _Optional[_Union[Resource, _Mapping]] = ...) -> None: ... class GetTaskRequest(_message.Message): __slots__ = ["task_type", "resource_meta"] @@ -96,14 +98,16 @@ class GetTaskResponse(_message.Message): def __init__(self, resource: _Optional[_Union[Resource, _Mapping]] = ..., log_links: _Optional[_Iterable[_Union[_execution_pb2.TaskLog, _Mapping]]] = ...) -> None: ... class Resource(_message.Message): - __slots__ = ["state", "outputs", "message"] + __slots__ = ["state", "outputs", "message", "log_links"] STATE_FIELD_NUMBER: _ClassVar[int] OUTPUTS_FIELD_NUMBER: _ClassVar[int] MESSAGE_FIELD_NUMBER: _ClassVar[int] + LOG_LINKS_FIELD_NUMBER: _ClassVar[int] state: State outputs: _literals_pb2.LiteralMap message: str - def __init__(self, state: _Optional[_Union[State, str]] = ..., outputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ..., message: _Optional[str] = ...) -> None: ... + log_links: _containers.RepeatedCompositeFieldContainer[_execution_pb2.TaskLog] + def __init__(self, state: _Optional[_Union[State, str]] = ..., outputs: _Optional[_Union[_literals_pb2.LiteralMap, _Mapping]] = ..., message: _Optional[str] = ..., log_links: _Optional[_Iterable[_Union[_execution_pb2.TaskLog, _Mapping]]] = ...) -> None: ... class DeleteTaskRequest(_message.Message): __slots__ = ["task_type", "resource_meta"] @@ -116,3 +120,33 @@ class DeleteTaskRequest(_message.Message): class DeleteTaskResponse(_message.Message): __slots__ = [] def __init__(self) -> None: ... + +class Agent(_message.Message): + __slots__ = ["name", "supported_task_types"] + NAME_FIELD_NUMBER: _ClassVar[int] + SUPPORTED_TASK_TYPES_FIELD_NUMBER: _ClassVar[int] + name: str + supported_task_types: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, name: _Optional[str] = ..., supported_task_types: _Optional[_Iterable[str]] = ...) -> None: ... + +class GetAgentRequest(_message.Message): + __slots__ = ["name"] + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class GetAgentResponse(_message.Message): + __slots__ = ["agent"] + AGENT_FIELD_NUMBER: _ClassVar[int] + agent: Agent + def __init__(self, agent: _Optional[_Union[Agent, _Mapping]] = ...) -> None: ... + +class ListAgentsRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class ListAgentsResponse(_message.Message): + __slots__ = ["agents"] + AGENTS_FIELD_NUMBER: _ClassVar[int] + agents: _containers.RepeatedCompositeFieldContainer[Agent] + def __init__(self, agents: _Optional[_Iterable[_Union[Agent, _Mapping]]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py index 8227bdc438..f1234012be 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.py @@ -11,10 +11,11 @@ _sym_db = _symbol_database.Default() +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from flyteidl.admin import agent_pb2 as flyteidl_dot_admin_dot_agent__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/agent.proto\x12\x10\x66lyteidl.service\x1a\x1a\x66lyteidl/admin/agent.proto2\x8f\x02\n\x11\x41syncAgentService\x12U\n\nCreateTask\x12!.flyteidl.admin.CreateTaskRequest\x1a\".flyteidl.admin.CreateTaskResponse\"\x00\x12L\n\x07GetTask\x12\x1e.flyteidl.admin.GetTaskRequest\x1a\x1f.flyteidl.admin.GetTaskResponse\"\x00\x12U\n\nDeleteTask\x12!.flyteidl.admin.DeleteTaskRequest\x1a\".flyteidl.admin.DeleteTaskResponse\"\x00\x42\xc2\x01\n\x14\x63om.flyteidl.serviceB\nAgentProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/agent.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a\x1a\x66lyteidl/admin/agent.proto2\x8f\x02\n\x11\x41syncAgentService\x12U\n\nCreateTask\x12!.flyteidl.admin.CreateTaskRequest\x1a\".flyteidl.admin.CreateTaskResponse\"\x00\x12L\n\x07GetTask\x12\x1e.flyteidl.admin.GetTaskRequest\x1a\x1f.flyteidl.admin.GetTaskResponse\"\x00\x12U\n\nDeleteTask\x12!.flyteidl.admin.DeleteTaskRequest\x1a\".flyteidl.admin.DeleteTaskResponse\"\x00\x32\xf0\x01\n\x14\x41gentMetadataService\x12k\n\x08GetAgent\x12\x1f.flyteidl.admin.GetAgentRequest\x1a .flyteidl.admin.GetAgentResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/api/v1/agent/{name}\x12k\n\nListAgents\x12!.flyteidl.admin.ListAgentsRequest\x1a\".flyteidl.admin.ListAgentsResponse\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/api/v1/agentsB\xc2\x01\n\x14\x63om.flyteidl.serviceB\nAgentProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,6 +24,12 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\024com.flyteidl.serviceB\nAgentProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\242\002\003FSX\252\002\020Flyteidl.Service\312\002\020Flyteidl\\Service\342\002\034Flyteidl\\Service\\GPBMetadata\352\002\021Flyteidl::Service' - _globals['_ASYNCAGENTSERVICE']._serialized_start=79 - _globals['_ASYNCAGENTSERVICE']._serialized_end=350 + _AGENTMETADATASERVICE.methods_by_name['GetAgent']._options = None + _AGENTMETADATASERVICE.methods_by_name['GetAgent']._serialized_options = b'\202\323\344\223\002\026\022\024/api/v1/agent/{name}' + _AGENTMETADATASERVICE.methods_by_name['ListAgents']._options = None + _AGENTMETADATASERVICE.methods_by_name['ListAgents']._serialized_options = b'\202\323\344\223\002\020\022\016/api/v1/agents' + _globals['_ASYNCAGENTSERVICE']._serialized_start=109 + _globals['_ASYNCAGENTSERVICE']._serialized_end=380 + _globals['_AGENTMETADATASERVICE']._serialized_start=383 + _globals['_AGENTMETADATASERVICE']._serialized_end=623 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.pyi index 8c85e57d2d..1d89a831af 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2.pyi @@ -1,3 +1,4 @@ +from google.api import annotations_pb2 as _annotations_pb2 from flyteidl.admin import agent_pb2 as _agent_pb2 from google.protobuf import descriptor as _descriptor from typing import ClassVar as _ClassVar diff --git a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py index 3ef2af39c4..94f75b1682 100644 --- a/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py +++ b/flyteidl/gen/pb_python/flyteidl/service/agent_pb2_grpc.py @@ -6,7 +6,7 @@ class AsyncAgentServiceStub(object): - """AgentService defines an RPC Service that allows propeller to send the request to the agent server. + """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. """ def __init__(self, channel): @@ -33,7 +33,7 @@ def __init__(self, channel): class AsyncAgentServiceServicer(object): - """AgentService defines an RPC Service that allows propeller to send the request to the agent server. + """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. """ def CreateTask(self, request, context): @@ -83,7 +83,7 @@ def add_AsyncAgentServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. class AsyncAgentService(object): - """AgentService defines an RPC Service that allows propeller to send the request to the agent server. + """AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. """ @staticmethod @@ -136,3 +136,105 @@ def DeleteTask(request, flyteidl_dot_admin_dot_agent__pb2.DeleteTaskResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class AgentMetadataServiceStub(object): + """AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. + This service allows propeller or users to get the metadata of agents. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetAgent = channel.unary_unary( + '/flyteidl.service.AgentMetadataService/GetAgent', + request_serializer=flyteidl_dot_admin_dot_agent__pb2.GetAgentRequest.SerializeToString, + response_deserializer=flyteidl_dot_admin_dot_agent__pb2.GetAgentResponse.FromString, + ) + self.ListAgents = channel.unary_unary( + '/flyteidl.service.AgentMetadataService/ListAgents', + request_serializer=flyteidl_dot_admin_dot_agent__pb2.ListAgentsRequest.SerializeToString, + response_deserializer=flyteidl_dot_admin_dot_agent__pb2.ListAgentsResponse.FromString, + ) + + +class AgentMetadataServiceServicer(object): + """AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. + This service allows propeller or users to get the metadata of agents. + """ + + def GetAgent(self, request, context): + """Fetch a :ref:`ref_flyteidl.admin.Agent` definition. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListAgents(self, request, context): + """Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AgentMetadataServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetAgent': grpc.unary_unary_rpc_method_handler( + servicer.GetAgent, + request_deserializer=flyteidl_dot_admin_dot_agent__pb2.GetAgentRequest.FromString, + response_serializer=flyteidl_dot_admin_dot_agent__pb2.GetAgentResponse.SerializeToString, + ), + 'ListAgents': grpc.unary_unary_rpc_method_handler( + servicer.ListAgents, + request_deserializer=flyteidl_dot_admin_dot_agent__pb2.ListAgentsRequest.FromString, + response_serializer=flyteidl_dot_admin_dot_agent__pb2.ListAgentsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'flyteidl.service.AgentMetadataService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class AgentMetadataService(object): + """AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. + This service allows propeller or users to get the metadata of agents. + """ + + @staticmethod + def GetAgent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl.service.AgentMetadataService/GetAgent', + flyteidl_dot_admin_dot_agent__pb2.GetAgentRequest.SerializeToString, + flyteidl_dot_admin_dot_agent__pb2.GetAgentResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListAgents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl.service.AgentMetadataService/ListAgents', + flyteidl_dot_admin_dot_agent__pb2.ListAgentsRequest.SerializeToString, + flyteidl_dot_admin_dot_agent__pb2.ListAgentsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/flyteidl/gen/pb_rust/flyteidl.admin.rs b/flyteidl/gen/pb_rust/flyteidl.admin.rs index 66e07b56b1..692a1ee5e7 100644 --- a/flyteidl/gen/pb_rust/flyteidl.admin.rs +++ b/flyteidl/gen/pb_rust/flyteidl.admin.rs @@ -46,8 +46,22 @@ pub struct CreateTaskRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateTaskResponse { /// Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). - #[prost(bytes="vec", tag="1")] - pub resource_meta: ::prost::alloc::vec::Vec, + /// Resource is for synchronous task execution. + #[prost(oneof="create_task_response::Res", tags="1, 2")] + pub res: ::core::option::Option, +} +/// Nested message and enum types in `CreateTaskResponse`. +pub mod create_task_response { + /// Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). + /// Resource is for synchronous task execution. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Res { + #[prost(bytes, tag="1")] + ResourceMeta(::prost::alloc::vec::Vec), + #[prost(message, tag="2")] + Resource(super::Resource), + } } /// A message used to fetch a job resource from flyte agent server. #[allow(clippy::derive_partial_eq_without_eq)] @@ -66,7 +80,7 @@ pub struct GetTaskRequest { pub struct GetTaskResponse { #[prost(message, optional, tag="1")] pub resource: ::core::option::Option, - /// log information for the task execution. + /// log information for the task execution #[prost(message, repeated, tag="2")] pub log_links: ::prost::alloc::vec::Vec, } @@ -84,6 +98,9 @@ pub struct Resource { /// A descriptive message for the current state. e.g. waiting for cluster. #[prost(string, tag="3")] pub message: ::prost::alloc::string::String, + /// log information for the task execution. + #[prost(message, repeated, tag="4")] + pub log_links: ::prost::alloc::vec::Vec, } /// A message used to delete a task. #[allow(clippy::derive_partial_eq_without_eq)] @@ -101,6 +118,44 @@ pub struct DeleteTaskRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteTaskResponse { } +/// A message containing the agent metadata. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Agent { + /// Name is the developer-assigned name of the agent. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, + /// SupportedTaskTypes are the types of the tasks that the agent can handle. + #[prost(string, repeated, tag="2")] + pub supported_task_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// A request to get an agent. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAgentRequest { + /// The name of the agent. + #[prost(string, tag="1")] + pub name: ::prost::alloc::string::String, +} +/// A response containing an agent. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAgentResponse { + #[prost(message, optional, tag="1")] + pub agent: ::core::option::Option, +} +/// A request to list all agents. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAgentsRequest { +} +/// A response containing a list of agents. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAgentsResponse { + #[prost(message, repeated, tag="1")] + pub agents: ::prost::alloc::vec::Vec, +} /// The state of the execution is used to control its visibility in the UI/CLI. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] diff --git a/flyteidl/protos/flyteidl/admin/agent.proto b/flyteidl/protos/flyteidl/admin/agent.proto index a3d1a5a4dd..778fcc99d0 100644 --- a/flyteidl/protos/flyteidl/admin/agent.proto +++ b/flyteidl/protos/flyteidl/admin/agent.proto @@ -51,7 +51,11 @@ message CreateTaskRequest { // Represents a create response structure. message CreateTaskResponse { // Metadata is created by the agent. It could be a string (jobId) or a dict (more complex metadata). - bytes resource_meta = 1; + // Resource is for synchronous task execution. + oneof res { + bytes resource_meta = 1; + Resource resource = 2; + } } // A message used to fetch a job resource from flyte agent server. @@ -65,7 +69,8 @@ message GetTaskRequest { // Response to get an individual task resource. message GetTaskResponse { Resource resource = 1; - // log information for the task execution. + + // log information for the task execution repeated core.TaskLog log_links = 2; } @@ -78,6 +83,8 @@ message Resource { core.LiteralMap outputs = 2; // A descriptive message for the current state. e.g. waiting for cluster. string message = 3; + // log information for the task execution. + repeated core.TaskLog log_links = 4; } // A message used to delete a task. @@ -89,5 +96,32 @@ message DeleteTaskRequest { } // Response to delete a task. -message DeleteTaskResponse { +message DeleteTaskResponse {} + +// A message containing the agent metadata. +message Agent { + // Name is the developer-assigned name of the agent. + string name = 1; + + // SupportedTaskTypes are the types of the tasks that the agent can handle. + repeated string supported_task_types = 2; +} + +// A request to get an agent. +message GetAgentRequest { + // The name of the agent. + string name = 1; +} + +// A response containing an agent. +message GetAgentResponse { + Agent agent = 1; +} + +// A request to list all agents. +message ListAgentsRequest {} + +// A response containing a list of agents. +message ListAgentsResponse { + repeated Agent agents = 1; } diff --git a/flyteidl/protos/flyteidl/service/agent.proto b/flyteidl/protos/flyteidl/service/agent.proto index 6d89bb532e..eba19e496c 100644 --- a/flyteidl/protos/flyteidl/service/agent.proto +++ b/flyteidl/protos/flyteidl/service/agent.proto @@ -2,9 +2,11 @@ syntax = "proto3"; package flyteidl.service; option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service"; + +import "google/api/annotations.proto"; import "flyteidl/admin/agent.proto"; -// AgentService defines an RPC Service that allows propeller to send the request to the agent server. +// AsyncAgentService defines an RPC Service that allows propeller to send the request to the agent server. service AsyncAgentService { // Send a task create request to the agent server. rpc CreateTask (flyteidl.admin.CreateTaskRequest) returns (flyteidl.admin.CreateTaskResponse){}; @@ -13,3 +15,21 @@ service AsyncAgentService { // Delete the task resource. rpc DeleteTask (flyteidl.admin.DeleteTaskRequest) returns (flyteidl.admin.DeleteTaskResponse){}; } + +// AgentMetadataService defines an RPC service that is also served over HTTP via grpc-gateway. +// This service allows propeller or users to get the metadata of agents. +service AgentMetadataService { + // Fetch a :ref:`ref_flyteidl.admin.Agent` definition. + rpc GetAgent (flyteidl.admin.GetAgentRequest) returns (flyteidl.admin.GetAgentResponse){ + option (google.api.http) = { + get: "/api/v1/agent/{name}" + }; + }; + + // Fetch a list of :ref:`ref_flyteidl.admin.Agent` definitions. + rpc ListAgents (flyteidl.admin.ListAgentsRequest) returns (flyteidl.admin.ListAgentsResponse){ + option (google.api.http) = { + get: "/api/v1/agents" + }; + }; +} diff --git a/flyteplugins/go/tasks/logs/config.go b/flyteplugins/go/tasks/logs/config.go index ca5a6012a8..b802844a4a 100644 --- a/flyteplugins/go/tasks/logs/config.go +++ b/flyteplugins/go/tasks/logs/config.go @@ -28,6 +28,9 @@ type LogConfig struct { StackdriverLogResourceName string `json:"stackdriver-logresourcename" pflag:",Name of the logresource in stackdriver"` StackDriverTemplateURI tasklog.TemplateURI `json:"stackdriver-template-uri" pflag:",Template Uri to use when building stackdriver log links"` + IsFlyinEnabled bool `json:"flyin-enabled" pflag:",Enable Log-links to flyin logs"` + FlyinTemplateURI tasklog.TemplateURI `json:"flyin-template-uri" pflag:",Template Uri to use when building flyin log links"` + Templates []tasklog.TemplateLogPlugin `json:"templates" pflag:"-,"` } diff --git a/flyteplugins/go/tasks/logs/logconfig_flags.go b/flyteplugins/go/tasks/logs/logconfig_flags.go index 00c08a8a58..de8ba022dc 100755 --- a/flyteplugins/go/tasks/logs/logconfig_flags.go +++ b/flyteplugins/go/tasks/logs/logconfig_flags.go @@ -61,5 +61,7 @@ func (cfg LogConfig) GetPFlagSet(prefix string) *pflag.FlagSet { cmdFlags.String(fmt.Sprintf("%v%v", prefix, "gcp-project"), DefaultConfig.GCPProjectName, "Name of the project in GCP") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "stackdriver-logresourcename"), DefaultConfig.StackdriverLogResourceName, "Name of the logresource in stackdriver") cmdFlags.String(fmt.Sprintf("%v%v", prefix, "stackdriver-template-uri"), DefaultConfig.StackDriverTemplateURI, "Template Uri to use when building stackdriver log links") + cmdFlags.Bool(fmt.Sprintf("%v%v", prefix, "flyin-enabled"), DefaultConfig.IsFlyinEnabled, "Enable Log-links to flyin logs") + cmdFlags.String(fmt.Sprintf("%v%v", prefix, "flyin-template-uri"), DefaultConfig.FlyinTemplateURI, "Template Uri to use when building flyin log links") return cmdFlags } diff --git a/flyteplugins/go/tasks/logs/logconfig_flags_test.go b/flyteplugins/go/tasks/logs/logconfig_flags_test.go index 8bb775df1f..dfbee43c69 100755 --- a/flyteplugins/go/tasks/logs/logconfig_flags_test.go +++ b/flyteplugins/go/tasks/logs/logconfig_flags_test.go @@ -253,4 +253,32 @@ func TestLogConfig_SetFlags(t *testing.T) { } }) }) + t.Run("Test_flyin-enabled", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("flyin-enabled", testValue) + if vBool, err := cmdFlags.GetBool("flyin-enabled"); err == nil { + testDecodeJson_LogConfig(t, fmt.Sprintf("%v", vBool), &actual.IsFlyinEnabled) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) + t.Run("Test_flyin-template-uri", func(t *testing.T) { + + t.Run("Override", func(t *testing.T) { + testValue := "1" + + cmdFlags.Set("flyin-template-uri", testValue) + if vString, err := cmdFlags.GetString("flyin-template-uri"); err == nil { + testDecodeJson_LogConfig(t, fmt.Sprintf("%v", vString), &actual.FlyinTemplateURI) + + } else { + assert.FailNow(t, err.Error()) + } + }) + }) } diff --git a/flyteplugins/go/tasks/logs/logging_utils.go b/flyteplugins/go/tasks/logs/logging_utils.go index 4978109458..20f3522e27 100644 --- a/flyteplugins/go/tasks/logs/logging_utils.go +++ b/flyteplugins/go/tasks/logs/logging_utils.go @@ -14,7 +14,7 @@ import ( ) // Internal -func GetLogsForContainerInPod(ctx context.Context, logPlugin tasklog.Plugin, taskExecID pluginsCore.TaskExecutionID, pod *v1.Pod, index uint32, nameSuffix string, extraLogTemplateVarsByScheme *tasklog.TemplateVarsByScheme) ([]*core.TaskLog, error) { +func GetLogsForContainerInPod(ctx context.Context, logPlugin tasklog.Plugin, taskExecID pluginsCore.TaskExecutionID, pod *v1.Pod, index uint32, nameSuffix string, extraLogTemplateVarsByScheme *tasklog.TemplateVarsByScheme, taskTemplate *core.TaskTemplate) ([]*core.TaskLog, error) { if logPlugin == nil { return nil, nil } @@ -51,6 +51,7 @@ func GetLogsForContainerInPod(ctx context.Context, logPlugin tasklog.Plugin, tas PodUnixFinishTime: finishTime, TaskExecutionID: taskExecID, ExtraTemplateVarsByScheme: extraLogTemplateVarsByScheme, + TaskTemplate: taskTemplate, }, ) @@ -108,6 +109,14 @@ func InitializeLogPlugins(cfg *LogConfig) (tasklog.Plugin, error) { } } + if cfg.IsFlyinEnabled { + if len(cfg.FlyinTemplateURI) > 0 { + plugins = append(plugins, tasklog.TemplateLogPlugin{DisplayName: "Flyin Logs", Scheme: tasklog.TemplateSchemeFlyin, TemplateURIs: []tasklog.TemplateURI{cfg.FlyinTemplateURI}, MessageFormat: core.TaskLog_JSON}) + } else { + plugins = append(plugins, tasklog.TemplateLogPlugin{DisplayName: "Flyin Logs", Scheme: tasklog.TemplateSchemeFlyin, TemplateURIs: []tasklog.TemplateURI{fmt.Sprintf("https://flyin.%s/logs/{{ .namespace }}/{{ .podName }}/{{ .containerName }}/{{ .containerId }}", cfg.GCPProjectName)}, MessageFormat: core.TaskLog_JSON}) + } + } + plugins = append(plugins, cfg.Templates...) return templateLogPluginCollection{plugins: plugins}, nil } diff --git a/flyteplugins/go/tasks/logs/logging_utils_test.go b/flyteplugins/go/tasks/logs/logging_utils_test.go index 91048eff16..46eb682201 100644 --- a/flyteplugins/go/tasks/logs/logging_utils_test.go +++ b/flyteplugins/go/tasks/logs/logging_utils_test.go @@ -44,7 +44,7 @@ func dummyTaskExecID() pluginCore.TaskExecutionID { func TestGetLogsForContainerInPod_NoPlugins(t *testing.T) { logPlugin, err := InitializeLogPlugins(&LogConfig{}) assert.NoError(t, err) - l, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), nil, 0, " Suffix", nil) + l, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), nil, 0, " Suffix", nil, nil) assert.NoError(t, err) assert.Nil(t, l) } @@ -56,7 +56,7 @@ func TestGetLogsForContainerInPod_NoLogs(t *testing.T) { CloudwatchLogGroup: "/kubernetes/flyte-production", }) assert.NoError(t, err) - p, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), nil, 0, " Suffix", nil) + p, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), nil, 0, " Suffix", nil, nil) assert.NoError(t, err) assert.Nil(t, p) } @@ -87,7 +87,7 @@ func TestGetLogsForContainerInPod_BadIndex(t *testing.T) { } pod.Name = podName - p, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 1, " Suffix", nil) + p, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 1, " Suffix", nil, nil) assert.NoError(t, err) assert.Nil(t, p) } @@ -112,7 +112,7 @@ func TestGetLogsForContainerInPod_MissingStatus(t *testing.T) { } pod.Name = podName - p, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 1, " Suffix", nil) + p, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 1, " Suffix", nil, nil) assert.NoError(t, err) assert.Nil(t, p) } @@ -142,7 +142,7 @@ func TestGetLogsForContainerInPod_Cloudwatch(t *testing.T) { } pod.Name = podName - logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " Suffix", nil) + logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " Suffix", nil, nil) assert.Nil(t, err) assert.Len(t, logs, 1) } @@ -172,7 +172,7 @@ func TestGetLogsForContainerInPod_K8s(t *testing.T) { } pod.Name = podName - logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " Suffix", nil) + logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " Suffix", nil, nil) assert.Nil(t, err) assert.Len(t, logs, 1) } @@ -205,7 +205,7 @@ func TestGetLogsForContainerInPod_All(t *testing.T) { } pod.Name = podName - logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " Suffix", nil) + logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " Suffix", nil, nil) assert.Nil(t, err) assert.Len(t, logs, 2) } @@ -236,7 +236,7 @@ func TestGetLogsForContainerInPod_Stackdriver(t *testing.T) { } pod.Name = podName - logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " Suffix", nil) + logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " Suffix", nil, nil) assert.Nil(t, err) assert.Len(t, logs, 1) } @@ -252,7 +252,7 @@ func TestGetLogsForContainerInPod_LegacyTemplate(t *testing.T) { IsStackDriverEnabled: true, StackDriverTemplateURI: "https://sd-my-log-server/{{ .namespace }}/{{ .podName }}/{{ .containerName }}/{{ .containerId }}", - }, []*core.TaskLog{ + }, nil, []*core.TaskLog{ { Uri: "https://k8s-my-log-server/my-namespace/my-pod/ContainerName/ContainerID", MessageFormat: core.TaskLog_JSON, @@ -275,7 +275,7 @@ func TestGetLogsForContainerInPod_LegacyTemplate(t *testing.T) { assertTestSucceeded(t, &LogConfig{ IsStackDriverEnabled: true, StackDriverTemplateURI: "https://sd-my-log-server/{{ .namespace }}/{{ .podName }}/{{ .containerName }}/{{ .containerId }}", - }, []*core.TaskLog{ + }, nil, []*core.TaskLog{ { Uri: "https://sd-my-log-server/my-namespace/my-pod/ContainerName/ContainerID", MessageFormat: core.TaskLog_JSON, @@ -285,7 +285,7 @@ func TestGetLogsForContainerInPod_LegacyTemplate(t *testing.T) { }) } -func assertTestSucceeded(tb testing.TB, config *LogConfig, expectedTaskLogs []*core.TaskLog) { +func assertTestSucceeded(tb testing.TB, config *LogConfig, taskTemplate *core.TaskTemplate, expectedTaskLogs []*core.TaskLog) { logPlugin, err := InitializeLogPlugins(config) assert.NoError(tb, err) @@ -310,7 +310,7 @@ func assertTestSucceeded(tb testing.TB, config *LogConfig, expectedTaskLogs []*c }, } - logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " my-Suffix", nil) + logs, err := GetLogsForContainerInPod(context.TODO(), logPlugin, dummyTaskExecID(), pod, 0, " my-Suffix", nil, taskTemplate) assert.Nil(tb, err) assert.Len(tb, logs, len(expectedTaskLogs)) if diff := deep.Equal(logs, expectedTaskLogs); len(diff) > 0 { @@ -337,7 +337,7 @@ func TestGetLogsForContainerInPod_Templates(t *testing.T) { Scheme: tasklog.TemplateSchemeTaskExecution, }, }, - }, []*core.TaskLog{ + }, nil, []*core.TaskLog{ { Uri: "https://my-log-server/my-namespace/my-pod/ContainerName/ContainerID", MessageFormat: core.TaskLog_JSON, @@ -350,3 +350,31 @@ func TestGetLogsForContainerInPod_Templates(t *testing.T) { }, }) } + +func TestGetLogsForContainerInPod_Flyin(t *testing.T) { + assertTestSucceeded(t, + &LogConfig{ + IsKubernetesEnabled: true, + KubernetesTemplateURI: "https://k8s.com", + IsFlyinEnabled: true, + FlyinTemplateURI: "https://flyin.mydomain.com:{{ .port }}/{{ .namespace }}/{{ .podName }}/{{ .containerName }}/{{ .containerId }}", + }, + &core.TaskTemplate{ + Config: map[string]string{ + "link_type": "vscode", + "port": "65535", + }, + }, + []*core.TaskLog{ + { + Uri: "https://k8s.com", + MessageFormat: core.TaskLog_JSON, + Name: "Kubernetes Logs my-Suffix", + }, + { + Uri: "https://flyin.mydomain.com:65535/my-namespace/my-pod/ContainerName/ContainerID", + MessageFormat: core.TaskLog_JSON, + Name: "Flyin Logs my-Suffix", + }, + }) +} diff --git a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go index d5e04f7347..a23f985fc6 100644 --- a/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go +++ b/flyteplugins/go/tasks/pluginmachinery/internal/webapi/core.go @@ -73,6 +73,7 @@ func (c CorePlugin) Handle(ctx context.Context, tCtx core.TaskExecutionContext) var nextState *State var phaseInfo core.PhaseInfo + switch incomingState.Phase { case PhaseNotStarted: if len(c.p.GetConfig().ResourceQuotas) > 0 { @@ -123,6 +124,7 @@ func (c CorePlugin) Finalize(ctx context.Context, tCtx core.TaskExecutionContext logger.Infof(ctx, "Attempting to finalize resource [%v].", tCtx.TaskExecutionMetadata().GetTaskExecutionID().GetGeneratedName()) + return c.tokenAllocator.releaseToken(ctx, c.p, tCtx, c.metrics) } @@ -143,6 +145,7 @@ func validateRangeFloat64(fieldName string, min, max, provided float64) error { return nil } + func validateConfig(cfg webapi.PluginConfig) error { errs := stdErrs.ErrorCollection{} errs.Append(validateRangeInt("cache size", minCacheSize, maxCacheSize, cfg.Caching.Size)) diff --git a/flyteplugins/go/tasks/pluginmachinery/tasklog/plugin.go b/flyteplugins/go/tasks/pluginmachinery/tasklog/plugin.go index c43da02e58..da2357a6d9 100644 --- a/flyteplugins/go/tasks/pluginmachinery/tasklog/plugin.go +++ b/flyteplugins/go/tasks/pluginmachinery/tasklog/plugin.go @@ -14,6 +14,7 @@ type TemplateScheme int const ( TemplateSchemePod TemplateScheme = iota TemplateSchemeTaskExecution + TemplateSchemeFlyin ) // TemplateURI is a URI that accepts templates. See: go/tasks/pluginmachinery/tasklog/template.go for available templates. @@ -30,6 +31,7 @@ type TemplateVarsByScheme struct { Common TemplateVars Pod TemplateVars TaskExecution TemplateVars + Flyin TemplateVars } // Input contains all available information about task's execution that a log plugin can use to construct task's @@ -48,6 +50,7 @@ type Input struct { PodUID string TaskExecutionID pluginsCore.TaskExecutionID ExtraTemplateVarsByScheme *TemplateVarsByScheme + TaskTemplate *core.TaskTemplate } // Output contains all task logs a plugin generates for a given Input. diff --git a/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go b/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go index 750b1972df..ea5c5f373c 100644 --- a/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go +++ b/flyteplugins/go/tasks/pluginmachinery/tasklog/template.go @@ -35,6 +35,7 @@ type templateRegexes struct { ExecutionProject *regexp.Regexp ExecutionDomain *regexp.Regexp GeneratedName *regexp.Regexp + Port *regexp.Regexp } func initDefaultRegexes() templateRegexes { @@ -60,6 +61,7 @@ func initDefaultRegexes() templateRegexes { MustCreateRegex("executionProject"), MustCreateRegex("executionDomain"), MustCreateRegex("generatedName"), + MustCreateRegex("port"), } } @@ -85,6 +87,16 @@ func (input Input) templateVarsForScheme(scheme TemplateScheme) TemplateVars { } switch scheme { + case TemplateSchemeFlyin: + port := input.TaskTemplate.GetConfig()["port"] + if port == "" { + port = "8080" + } + vars = append( + vars, + TemplateVar{defaultRegexes.Port, port}, + ) + fallthrough case TemplateSchemePod: // Container IDs are prefixed with docker://, cri-o://, etc. which is stripped by fluentd before pushing to a log // stream. Therefore, we must also strip the prefix. @@ -181,7 +193,22 @@ func (input Input) templateVarsForScheme(scheme TemplateScheme) TemplateVars { func (p TemplateLogPlugin) GetTaskLogs(input Input) (Output, error) { templateVars := input.templateVarsForScheme(p.Scheme) taskLogs := make([]*core.TaskLog, 0, len(p.TemplateURIs)) + + // Grab metadata from task template and check if key "link_type" is set to "vscode". + // If so, add a vscode link to the task logs. + isFlyin := false + if input.TaskTemplate != nil && input.TaskTemplate.GetConfig() != nil { + config := input.TaskTemplate.GetConfig() + if config != nil && config["link_type"] == "vscode" { + isFlyin = true + } + } for _, templateURI := range p.TemplateURIs { + // Skip Flyin logs if plugin is enabled but no metadata is defined in input's task template. + // This is to prevent Flyin logs from being generated for tasks that don't have a Flyin metadata section. + if p.DisplayName == "Flyin Logs" && !isFlyin { + continue + } taskLogs = append(taskLogs, &core.TaskLog{ Uri: replaceAll(templateURI, templateVars), Name: p.DisplayName + input.LogName, diff --git a/flyteplugins/go/tasks/pluginmachinery/tasklog/template_test.go b/flyteplugins/go/tasks/pluginmachinery/tasklog/template_test.go index f279707a3b..ad6eef25a3 100644 --- a/flyteplugins/go/tasks/pluginmachinery/tasklog/template_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/tasklog/template_test.go @@ -74,6 +74,24 @@ func Test_Input_templateVarsForScheme(t *testing.T) { LogName: "main_logs", TaskExecutionID: dummyTaskExecID(), } + flyinBase := Input{ + HostName: "my-host", + PodName: "my-pod", + PodUID: "my-pod-uid", + Namespace: "my-namespace", + ContainerName: "my-container", + ContainerID: "docker://containerID", + LogName: "main_logs", + PodRFC3339StartTime: "1970-01-01T01:02:03+01:00", + PodRFC3339FinishTime: "1970-01-01T04:25:45+01:00", + PodUnixStartTime: 123, + PodUnixFinishTime: 12345, + TaskTemplate: &core.TaskTemplate{ + Config: map[string]string{ + "port": "1234", + }, + }, + } tests := []struct { name string @@ -202,6 +220,50 @@ func Test_Input_templateVarsForScheme(t *testing.T) { {testRegexes.Baz, "baz"}, }, }, + { + "flyin happy path", + TemplateSchemeFlyin, + flyinBase, + nil, + nil, + TemplateVars{ + {defaultRegexes.Port, "1234"}, + }, + nil, + }, + { + "flyin and pod happy path", + TemplateSchemeFlyin, + flyinBase, + nil, + TemplateVars{ + {defaultRegexes.LogName, "main_logs"}, + {defaultRegexes.Port, "1234"}, + {defaultRegexes.PodName, "my-pod"}, + {defaultRegexes.PodUID, "my-pod-uid"}, + {defaultRegexes.Namespace, "my-namespace"}, + {defaultRegexes.ContainerName, "my-container"}, + {defaultRegexes.ContainerID, "containerID"}, + {defaultRegexes.Hostname, "my-host"}, + {defaultRegexes.PodRFC3339StartTime, "1970-01-01T01:02:03+01:00"}, + {defaultRegexes.PodRFC3339FinishTime, "1970-01-01T04:25:45+01:00"}, + {defaultRegexes.PodUnixStartTime, "123"}, + {defaultRegexes.PodUnixFinishTime, "12345"}, + }, + nil, + nil, + }, + { + "pod with port not affected", + TemplateSchemePod, + podBase, + nil, + nil, + nil, + TemplateVars{ + {defaultRegexes.Port, "1234"}, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -474,6 +536,76 @@ func TestTemplateLogPlugin(t *testing.T) { }, }, }, + { + "flyin", + TemplateLogPlugin{ + Scheme: TemplateSchemeFlyin, + TemplateURIs: []TemplateURI{"vscode://flyin:{{ .port }}/{{ .podName }}"}, + MessageFormat: core.TaskLog_JSON, + }, + args{ + input: Input{ + PodName: "my-pod-name", + TaskTemplate: &core.TaskTemplate{ + Config: map[string]string{ + "link_type": "vscode", + "port": "1234", + }, + }, + }, + }, + Output{ + TaskLogs: []*core.TaskLog{ + { + Uri: "vscode://flyin:1234/my-pod-name", + MessageFormat: core.TaskLog_JSON, + }, + }, + }, + }, + { + "flyin - default port", + TemplateLogPlugin{ + Scheme: TemplateSchemeFlyin, + TemplateURIs: []TemplateURI{"vscode://flyin:{{ .port }}/{{ .podName }}"}, + MessageFormat: core.TaskLog_JSON, + }, + args{ + input: Input{ + PodName: "my-pod-name", + TaskTemplate: &core.TaskTemplate{ + Config: map[string]string{ + "link_type": "vscode", + }, + }, + }, + }, + Output{ + TaskLogs: []*core.TaskLog{ + { + Uri: "vscode://flyin:8080/my-pod-name", + MessageFormat: core.TaskLog_JSON, + }, + }, + }, + }, + { + "flyin - no link_type in task template", + TemplateLogPlugin{ + Scheme: TemplateSchemeFlyin, + TemplateURIs: []TemplateURI{"vscode://flyin:{{ .port }}/{{ .podName }}"}, + MessageFormat: core.TaskLog_JSON, + DisplayName: "Flyin Logs", + }, + args{ + input: Input{ + PodName: "my-pod-name", + }, + }, + Output{ + TaskLogs: []*core.TaskLog{}, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/flyteplugins/go/tasks/pluginmachinery/tasklog/templatescheme_enumer.go b/flyteplugins/go/tasks/pluginmachinery/tasklog/templatescheme_enumer.go index 70f15faf01..c1f4d668c0 100644 --- a/flyteplugins/go/tasks/pluginmachinery/tasklog/templatescheme_enumer.go +++ b/flyteplugins/go/tasks/pluginmachinery/tasklog/templatescheme_enumer.go @@ -7,9 +7,9 @@ import ( "fmt" ) -const _TemplateSchemeName = "PodTaskExecution" +const _TemplateSchemeName = "PodTaskExecutionFlyin" -var _TemplateSchemeIndex = [...]uint8{0, 3, 16} +var _TemplateSchemeIndex = [...]uint8{0, 3, 16, 21} func (i TemplateScheme) String() string { if i < 0 || i >= TemplateScheme(len(_TemplateSchemeIndex)-1) { @@ -18,11 +18,12 @@ func (i TemplateScheme) String() string { return _TemplateSchemeName[_TemplateSchemeIndex[i]:_TemplateSchemeIndex[i+1]] } -var _TemplateSchemeValues = []TemplateScheme{0, 1} +var _TemplateSchemeValues = []TemplateScheme{0, 1, 2} var _TemplateSchemeNameToValueMap = map[string]TemplateScheme{ - _TemplateSchemeName[0:3]: 0, - _TemplateSchemeName[3:16]: 1, + _TemplateSchemeName[0:3]: 0, + _TemplateSchemeName[3:16]: 1, + _TemplateSchemeName[16:21]: 2, } // TemplateSchemeString retrieves an enum value from the enum constants string name. diff --git a/flyteplugins/go/tasks/pluginmachinery/webapi/mocks/plugin.go b/flyteplugins/go/tasks/pluginmachinery/webapi/mocks/plugin.go new file mode 100644 index 0000000000..1e255ca1fa --- /dev/null +++ b/flyteplugins/go/tasks/pluginmachinery/webapi/mocks/plugin.go @@ -0,0 +1,45 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + webapi "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/webapi" + mock "github.com/stretchr/testify/mock" +) + +// Plugin is an autogenerated mock type for the Plugin type +type Plugin struct { + mock.Mock +} + +type Plugin_GetConfig struct { + *mock.Call +} + +func (_m Plugin_GetConfig) Return(_a0 webapi.PluginConfig) *Plugin_GetConfig { + return &Plugin_GetConfig{Call: _m.Call.Return(_a0)} +} + +func (_m *Plugin) OnGetConfig() *Plugin_GetConfig { + c_call := _m.On("GetConfig") + return &Plugin_GetConfig{Call: c_call} +} + +func (_m *Plugin) OnGetConfigMatch(matchers ...interface{}) *Plugin_GetConfig { + c_call := _m.On("GetConfig", matchers...) + return &Plugin_GetConfig{Call: c_call} +} + +// GetConfig provides a mock function with given fields: +func (_m *Plugin) GetConfig() webapi.PluginConfig { + ret := _m.Called() + + var r0 webapi.PluginConfig + if rf, ok := ret.Get(0).(func() webapi.PluginConfig); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(webapi.PluginConfig) + } + + return r0 +} diff --git a/flyteplugins/go/tasks/pluginmachinery/webapi/mocks/sync_plugin.go b/flyteplugins/go/tasks/pluginmachinery/webapi/mocks/sync_plugin.go deleted file mode 100644 index cfe5d38090..0000000000 --- a/flyteplugins/go/tasks/pluginmachinery/webapi/mocks/sync_plugin.go +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by mockery v1.0.1. DO NOT EDIT. - -package mocks - -import ( - context "context" - - core "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core" - mock "github.com/stretchr/testify/mock" - - webapi "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/webapi" -) - -// SyncPlugin is an autogenerated mock type for the SyncPlugin type -type SyncPlugin struct { - mock.Mock -} - -type SyncPlugin_Do struct { - *mock.Call -} - -func (_m SyncPlugin_Do) Return(phase core.PhaseInfo, err error) *SyncPlugin_Do { - return &SyncPlugin_Do{Call: _m.Call.Return(phase, err)} -} - -func (_m *SyncPlugin) OnDo(ctx context.Context, tCtx webapi.TaskExecutionContext) *SyncPlugin_Do { - c_call := _m.On("Do", ctx, tCtx) - return &SyncPlugin_Do{Call: c_call} -} - -func (_m *SyncPlugin) OnDoMatch(matchers ...interface{}) *SyncPlugin_Do { - c_call := _m.On("Do", matchers...) - return &SyncPlugin_Do{Call: c_call} -} - -// Do provides a mock function with given fields: ctx, tCtx -func (_m *SyncPlugin) Do(ctx context.Context, tCtx webapi.TaskExecutionContext) (core.PhaseInfo, error) { - ret := _m.Called(ctx, tCtx) - - var r0 core.PhaseInfo - if rf, ok := ret.Get(0).(func(context.Context, webapi.TaskExecutionContext) core.PhaseInfo); ok { - r0 = rf(ctx, tCtx) - } else { - r0 = ret.Get(0).(core.PhaseInfo) - } - - var r1 error - if rf, ok := ret.Get(1).(func(context.Context, webapi.TaskExecutionContext) error); ok { - r1 = rf(ctx, tCtx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -type SyncPlugin_GetConfig struct { - *mock.Call -} - -func (_m SyncPlugin_GetConfig) Return(_a0 webapi.PluginConfig) *SyncPlugin_GetConfig { - return &SyncPlugin_GetConfig{Call: _m.Call.Return(_a0)} -} - -func (_m *SyncPlugin) OnGetConfig() *SyncPlugin_GetConfig { - c_call := _m.On("GetConfig") - return &SyncPlugin_GetConfig{Call: c_call} -} - -func (_m *SyncPlugin) OnGetConfigMatch(matchers ...interface{}) *SyncPlugin_GetConfig { - c_call := _m.On("GetConfig", matchers...) - return &SyncPlugin_GetConfig{Call: c_call} -} - -// GetConfig provides a mock function with given fields: -func (_m *SyncPlugin) GetConfig() webapi.PluginConfig { - ret := _m.Called() - - var r0 webapi.PluginConfig - if rf, ok := ret.Get(0).(func() webapi.PluginConfig); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(webapi.PluginConfig) - } - - return r0 -} diff --git a/flyteplugins/go/tasks/plugins/array/awsbatch/executor.go b/flyteplugins/go/tasks/plugins/array/awsbatch/executor.go index 6c7a858be8..1e98736129 100644 --- a/flyteplugins/go/tasks/plugins/array/awsbatch/executor.go +++ b/flyteplugins/go/tasks/plugins/array/awsbatch/executor.go @@ -78,7 +78,7 @@ func (e Executor) Handle(ctx context.Context, tCtx core.TaskExecutionContext) (c case arrayCore.PhaseAssembleFinalOutput: pluginState.State, err = array.AssembleFinalOutputs(ctx, e.outputAssembler, tCtx, arrayCore.PhaseSuccess, version+1, pluginState.State) - + case arrayCore.PhaseAbortSubTasks: fallthrough diff --git a/flyteplugins/go/tasks/plugins/array/k8s/management.go b/flyteplugins/go/tasks/plugins/array/k8s/management.go index 510f202e1a..d6abaaf74b 100644 --- a/flyteplugins/go/tasks/plugins/array/k8s/management.go +++ b/flyteplugins/go/tasks/plugins/array/k8s/management.go @@ -382,10 +382,10 @@ func TerminateSubTasks(ctx context.Context, tCtx core.TaskExecutionContext, kube messageCollector.Collect(childIdx, err.Error()) } else { externalResources = append(externalResources, &core.ExternalResource{ - ExternalID: stCtx.TaskExecutionMetadata().GetTaskExecutionID().GetGeneratedName(), - Index: uint32(originalIdx), - RetryAttempt: uint32(retryAttempt), - Phase: core.PhaseAborted, + ExternalID: stCtx.TaskExecutionMetadata().GetTaskExecutionID().GetGeneratedName(), + Index: uint32(originalIdx), + RetryAttempt: uint32(retryAttempt), + Phase: core.PhaseAborted, }) } } diff --git a/flyteplugins/go/tasks/plugins/k8s/pod/plugin.go b/flyteplugins/go/tasks/plugins/k8s/pod/plugin.go index b266a6f5e8..eae0ac98b7 100644 --- a/flyteplugins/go/tasks/plugins/k8s/pod/plugin.go +++ b/flyteplugins/go/tasks/plugins/k8s/pod/plugin.go @@ -153,6 +153,11 @@ func (plugin) GetTaskPhaseWithLogs(ctx context.Context, pluginContext k8s.Plugin return pluginsCore.PhaseInfoUndefined, err } + taskTemplate, err := pluginContext.TaskReader().Read(ctx) + if err != nil { + return pluginsCore.PhaseInfoUndefined, err + } + pod := r.(*v1.Pod) transitionOccurredAt := flytek8s.GetLastTransitionOccurredAt(pod).Time @@ -168,7 +173,7 @@ func (plugin) GetTaskPhaseWithLogs(ctx context.Context, pluginContext k8s.Plugin taskExecID := pluginContext.TaskExecutionMetadata().GetTaskExecutionID() if pod.Status.Phase != v1.PodPending && pod.Status.Phase != v1.PodUnknown { - taskLogs, err := logs.GetLogsForContainerInPod(ctx, logPlugin, taskExecID, pod, 0, logSuffix, extraLogTemplateVarsByScheme) + taskLogs, err := logs.GetLogsForContainerInPod(ctx, logPlugin, taskExecID, pod, 0, logSuffix, extraLogTemplateVarsByScheme, taskTemplate) if err != nil { return pluginsCore.PhaseInfoUndefined, err } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/config.go b/flyteplugins/go/tasks/plugins/webapi/agent/config.go index 1045a7cf80..cb0bd3089f 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/config.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/config.go @@ -40,10 +40,12 @@ var ( }, }, DefaultAgent: Agent{ - Endpoint: "dns:///flyteagent.flyte.svc.cluster.local:80", + Endpoint: "", Insecure: true, DefaultTimeout: config.Duration{Duration: 10 * time.Second}, }, + // AsyncPlugin should be registered to at least one task type. + // Reference: https://github.com/flyteorg/flyte/blob/master/flyteplugins/go/tasks/pluginmachinery/registry.go#L27 SupportedTaskTypes: []string{"task_type_1", "task_type_2"}, } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go index 0aecffdfc7..827af0d907 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go @@ -37,18 +37,24 @@ type MockPlugin struct { Plugin } -type MockClient struct { +type MockAsyncTask struct { } -func (m *MockClient) CreateTask(_ context.Context, createTaskRequest *admin.CreateTaskRequest, _ ...grpc.CallOption) (*admin.CreateTaskResponse, error) { +type MockSyncTask struct { +} + +func (m *MockAsyncTask) CreateTask(_ context.Context, createTaskRequest *admin.CreateTaskRequest, _ ...grpc.CallOption) (*admin.CreateTaskResponse, error) { expectedArgs := []string{"pyflyte-fast-execute", "--output-prefix", "fake://bucket/prefix/nhv"} if slices.Equal(createTaskRequest.Template.GetContainer().Args, expectedArgs) { return nil, fmt.Errorf("args not as expected") } - return &admin.CreateTaskResponse{ResourceMeta: []byte{1, 2, 3, 4}}, nil + return &admin.CreateTaskResponse{ + Res: &admin.CreateTaskResponse_ResourceMeta{ + ResourceMeta: []byte{1, 2, 3, 4}, + }}, nil } -func (m *MockClient) GetTask(_ context.Context, req *admin.GetTaskRequest, _ ...grpc.CallOption) (*admin.GetTaskResponse, error) { +func (m *MockAsyncTask) GetTask(_ context.Context, req *admin.GetTaskRequest, _ ...grpc.CallOption) (*admin.GetTaskResponse, error) { if req.GetTaskType() == "bigquery_query_job_task" { return &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED, Outputs: &flyteIdlCore.LiteralMap{ Literals: map[string]*flyteIdlCore.Literal{ @@ -59,15 +65,50 @@ func (m *MockClient) GetTask(_ context.Context, req *admin.GetTaskRequest, _ ... return &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED}}, nil } -func (m *MockClient) DeleteTask(_ context.Context, _ *admin.DeleteTaskRequest, _ ...grpc.CallOption) (*admin.DeleteTaskResponse, error) { +func (m *MockAsyncTask) DeleteTask(_ context.Context, _ *admin.DeleteTaskRequest, _ ...grpc.CallOption) (*admin.DeleteTaskResponse, error) { + return &admin.DeleteTaskResponse{}, nil +} + +func (m *MockSyncTask) CreateTask(_ context.Context, createTaskRequest *admin.CreateTaskRequest, _ ...grpc.CallOption) (*admin.CreateTaskResponse, error) { + return &admin.CreateTaskResponse{ + Res: &admin.CreateTaskResponse_Resource{ + Resource: &admin.Resource{ + State: admin.State_SUCCEEDED, + Outputs: &flyteIdlCore.LiteralMap{ + Literals: map[string]*flyteIdlCore.Literal{}, + }, + Message: "Sync task finished", + LogLinks: []*flyteIdlCore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, + }, + }, + }, nil + +} + +func (m *MockSyncTask) GetTask(_ context.Context, req *admin.GetTaskRequest, _ ...grpc.CallOption) (*admin.GetTaskResponse, error) { + if req.GetTaskType() == "fake_task" { + return &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED, Outputs: &flyteIdlCore.LiteralMap{ + Literals: map[string]*flyteIdlCore.Literal{ + "arr": coreutils.MustMakeLiteral([]interface{}{[]interface{}{"a", "b"}, []interface{}{1, 2}}), + }, + }}}, nil + } + return &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED}}, nil +} + +func (m *MockSyncTask) DeleteTask(_ context.Context, _ *admin.DeleteTaskRequest, _ ...grpc.CallOption) (*admin.DeleteTaskResponse, error) { return &admin.DeleteTaskResponse{}, nil } -func mockGetClientFunc(_ context.Context, _ *Agent, _ map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error) { - return &MockClient{}, nil +func mockAsyncTaskClientFunc(_ context.Context, _ *Agent, _ map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error) { + return &MockAsyncTask{}, nil } -func mockGetBadClientFunc(_ context.Context, _ *Agent, _ map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error) { +func mockSyncTaskClientFunc(_ context.Context, _ *Agent, _ map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error) { + return &MockSyncTask{}, nil +} + +func mockGetBadAsyncClientFunc(_ context.Context, _ *Agent, _ map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error) { return nil, fmt.Errorf("error") } @@ -130,7 +171,7 @@ func TestEndToEnd(t *testing.T) { Plugin{ metricScope: iCtx.MetricsScope(), cfg: GetConfig(), - getClient: mockGetBadClientFunc, + getClient: mockGetBadAsyncClientFunc, }, }, nil } @@ -161,7 +202,7 @@ func TestEndToEnd(t *testing.T) { tr.OnRead(context.Background()).Return(nil, fmt.Errorf("read fail")) tCtx.OnTaskReader().Return(tr) - agentPlugin := newAgentPlugin() + agentPlugin := newMockAgentPlugin() pluginEntry := pluginmachinery.CreateRemotePlugin(agentPlugin) plugin, err := pluginEntry.LoadPlugin(context.TODO(), newFakeSetupContext("test3")) assert.NoError(t, err) @@ -234,6 +275,11 @@ func getTaskContext(t *testing.T) *pluginCoreMocks.TaskExecutionContext { }) tMeta := &pluginCoreMocks.TaskExecutionMetadata{} tMeta.OnGetTaskExecutionID().Return(tID) + tMeta.OnGetNamespace().Return("test-namespace") + tMeta.OnGetLabels().Return(map[string]string{"foo": "bar"}) + tMeta.OnGetAnnotations().Return(map[string]string{"foo": "bar"}) + tMeta.OnGetK8sServiceAccount().Return("k8s-account") + tMeta.OnGetEnvironmentVariables().Return(map[string]string{"foo": "bar"}) resourceManager := &pluginCoreMocks.ResourceManager{} resourceManager.OnAllocateResourceMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(pluginCore.AllocationStatusGranted, nil) resourceManager.OnReleaseResourceMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) @@ -259,13 +305,29 @@ func getTaskContext(t *testing.T) *pluginCoreMocks.TaskExecutionContext { func newMockAgentPlugin() webapi.PluginEntry { return webapi.PluginEntry{ ID: "agent-service", - SupportedTaskTypes: []core.TaskType{"bigquery_query_job_task", "spark_job"}, + SupportedTaskTypes: []core.TaskType{"bigquery_query_job_task", "spark_job", "api_task"}, + PluginLoader: func(ctx context.Context, iCtx webapi.PluginSetupContext) (webapi.AsyncPlugin, error) { + return &MockPlugin{ + Plugin{ + metricScope: iCtx.MetricsScope(), + cfg: GetConfig(), + getClient: mockAsyncTaskClientFunc, + }, + }, nil + }, + } +} + +func newMockSyncAgentPlugin() webapi.PluginEntry { + return webapi.PluginEntry{ + ID: "agent-service", + SupportedTaskTypes: []core.TaskType{"bigquery_query_job_task", "spark_job", "api_task"}, PluginLoader: func(ctx context.Context, iCtx webapi.PluginSetupContext) (webapi.AsyncPlugin, error) { return &MockPlugin{ Plugin{ metricScope: iCtx.MetricsScope(), cfg: GetConfig(), - getClient: mockGetClientFunc, + getClient: mockSyncTaskClientFunc, }, }, nil }, diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AgentMetadataServiceClient.go b/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AgentMetadataServiceClient.go new file mode 100644 index 0000000000..d7f40932b7 --- /dev/null +++ b/flyteplugins/go/tasks/plugins/webapi/agent/mocks/AgentMetadataServiceClient.go @@ -0,0 +1,114 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + admin "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + + grpc "google.golang.org/grpc" + + mock "github.com/stretchr/testify/mock" +) + +// AgentMetadataServiceClient is an autogenerated mock type for the AgentMetadataServiceClient type +type AgentMetadataServiceClient struct { + mock.Mock +} + +type AgentMetadataServiceClient_GetAgent struct { + *mock.Call +} + +func (_m AgentMetadataServiceClient_GetAgent) Return(_a0 *admin.GetAgentResponse, _a1 error) *AgentMetadataServiceClient_GetAgent { + return &AgentMetadataServiceClient_GetAgent{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AgentMetadataServiceClient) OnGetAgent(ctx context.Context, in *admin.GetAgentRequest, opts ...grpc.CallOption) *AgentMetadataServiceClient_GetAgent { + c_call := _m.On("GetAgent", ctx, in, opts) + return &AgentMetadataServiceClient_GetAgent{Call: c_call} +} + +func (_m *AgentMetadataServiceClient) OnGetAgentMatch(matchers ...interface{}) *AgentMetadataServiceClient_GetAgent { + c_call := _m.On("GetAgent", matchers...) + return &AgentMetadataServiceClient_GetAgent{Call: c_call} +} + +// GetAgent provides a mock function with given fields: ctx, in, opts +func (_m *AgentMetadataServiceClient) GetAgent(ctx context.Context, in *admin.GetAgentRequest, opts ...grpc.CallOption) (*admin.GetAgentResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *admin.GetAgentResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.GetAgentRequest, ...grpc.CallOption) *admin.GetAgentResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.GetAgentResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.GetAgentRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type AgentMetadataServiceClient_ListAgents struct { + *mock.Call +} + +func (_m AgentMetadataServiceClient_ListAgents) Return(_a0 *admin.ListAgentsResponse, _a1 error) *AgentMetadataServiceClient_ListAgents { + return &AgentMetadataServiceClient_ListAgents{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *AgentMetadataServiceClient) OnListAgents(ctx context.Context, in *admin.ListAgentsRequest, opts ...grpc.CallOption) *AgentMetadataServiceClient_ListAgents { + c_call := _m.On("ListAgents", ctx, in, opts) + return &AgentMetadataServiceClient_ListAgents{Call: c_call} +} + +func (_m *AgentMetadataServiceClient) OnListAgentsMatch(matchers ...interface{}) *AgentMetadataServiceClient_ListAgents { + c_call := _m.On("ListAgents", matchers...) + return &AgentMetadataServiceClient_ListAgents{Call: c_call} +} + +// ListAgents provides a mock function with given fields: ctx, in, opts +func (_m *AgentMetadataServiceClient) ListAgents(ctx context.Context, in *admin.ListAgentsRequest, opts ...grpc.CallOption) (*admin.ListAgentsResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *admin.ListAgentsResponse + if rf, ok := ret.Get(0).(func(context.Context, *admin.ListAgentsRequest, ...grpc.CallOption) *admin.ListAgentsResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*admin.ListAgentsResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *admin.ListAgentsRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go index 2b3d8dbba9..73a98782bc 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin.go @@ -7,10 +7,13 @@ import ( "fmt" "time" + "golang.org/x/exp/maps" "google.golang.org/grpc" + "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" flyteIdl "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -28,12 +31,14 @@ import ( ) type GetClientFunc func(ctx context.Context, agent *Agent, connectionCache map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error) +type GetAgentMetadataClientFunc func(ctx context.Context, agent *Agent, connCache map[*Agent]*grpc.ClientConn) (service.AgentMetadataServiceClient, error) type Plugin struct { metricScope promutils.Scope cfg *Config getClient GetClientFunc connectionCache map[*Agent]*grpc.ClientConn + agentRegistry map[string]*Agent // map[taskType] => Agent } type ResourceWrapper struct { @@ -89,10 +94,8 @@ func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextR } outputPrefix := taskCtx.OutputWriter().GetOutputPrefixPath().String() - agent, err := getFinalAgent(taskTemplate.Type, p.cfg) - if err != nil { - return nil, nil, fmt.Errorf("failed to find agent agent with error: %v", err) - } + agent := getFinalAgent(taskTemplate.Type, p.cfg, p.agentRegistry) + client, err := p.getClient(ctx, agent, p.connectionCache) if err != nil { return nil, nil, fmt.Errorf("failed to connect to agent with error: %v", err) @@ -112,21 +115,36 @@ func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextR taskTemplate.GetContainer().Args = argTemplate } + // If the agent returned a resource, we assume this is a synchronous task. + // The state should be a terminal state, for example, SUCCEEDED, PERMANENT_FAILURE, or RETRYABLE_FAILURE. + if res.GetResource() != nil { + logger.Infof(ctx, "Agent is executing a synchronous task.") + return nil, + ResourceWrapper{ + State: res.GetResource().State, + Outputs: res.GetResource().Outputs, + Message: res.GetResource().Message, + LogLinks: res.GetResource().LogLinks, + }, nil + } + + logger.Infof(ctx, "Agent is executing an asynchronous task.") return ResourceMetaWrapper{ OutputPrefix: outputPrefix, AgentResourceMeta: res.GetResourceMeta(), Token: "", TaskType: taskTemplate.Type, - }, ResourceWrapper{State: admin.State_RUNNING}, nil + }, nil, nil } func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest webapi.Resource, err error) { metadata := taskCtx.ResourceMeta().(ResourceMetaWrapper) - agent, err := getFinalAgent(metadata.TaskType, p.cfg) + agent := getFinalAgent(metadata.TaskType, p.cfg, p.agentRegistry) if err != nil { return nil, fmt.Errorf("failed to find agent with error: %v", err) } + client, err := p.getClient(ctx, agent, p.connectionCache) if err != nil { return nil, fmt.Errorf("failed to connect to agent with error: %v", err) @@ -154,10 +172,8 @@ func (p Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error } metadata := taskCtx.ResourceMeta().(ResourceMetaWrapper) - agent, err := getFinalAgent(metadata.TaskType, p.cfg) - if err != nil { - return fmt.Errorf("failed to find agent agent with error: %v", err) - } + agent := getFinalAgent(metadata.TaskType, p.cfg, p.agentRegistry) + client, err := p.getClient(ctx, agent, p.connectionCache) if err != nil { return fmt.Errorf("failed to connect to agent with error: %v", err) @@ -207,7 +223,7 @@ func writeOutput(ctx context.Context, taskCtx webapi.StatusContext, resource Res var opReader io.OutputReader if resource.Outputs != nil { - logger.Debugf(ctx, "Agent returned an output") + logger.Debugf(ctx, "Agent returned an output.") opReader = ioutils.NewInMemoryOutputReader(resource.Outputs, nil, nil) } else { logger.Debugf(ctx, "Agent didn't return any output, assuming file based outputs.") @@ -216,23 +232,19 @@ func writeOutput(ctx context.Context, taskCtx webapi.StatusContext, resource Res return taskCtx.OutputWriter().Put(ctx, opReader) } -func getFinalAgent(taskType string, cfg *Config) (*Agent, error) { - if id, exists := cfg.AgentForTaskTypes[taskType]; exists { - if agent, exists := cfg.Agents[id]; exists { - return agent, nil - } - return nil, fmt.Errorf("no agent definition found for ID %s that matches task type %s", id, taskType) +func getFinalAgent(taskType string, cfg *Config, agentRegistry map[string]*Agent) *Agent { + if agent, exists := agentRegistry[taskType]; exists { + return agent } - return &cfg.DefaultAgent, nil + return &cfg.DefaultAgent } -func getClientFunc(ctx context.Context, agent *Agent, connectionCache map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error) { +func getGrpcConnection(ctx context.Context, agent *Agent, connectionCache map[*Agent]*grpc.ClientConn) (*grpc.ClientConn, error) { conn, ok := connectionCache[agent] if ok { - return service.NewAsyncAgentServiceClient(conn), nil + return conn, nil } - var opts []grpc.DialOption if agent.Insecure { @@ -271,9 +283,28 @@ func getClientFunc(ctx context.Context, agent *Agent, connectionCache map[*Agent } }() }() + + return conn, nil +} + +func getClientFunc(ctx context.Context, agent *Agent, connectionCache map[*Agent]*grpc.ClientConn) (service.AsyncAgentServiceClient, error) { + conn, err := getGrpcConnection(ctx, agent, connectionCache) + if err != nil { + return nil, err + } + return service.NewAsyncAgentServiceClient(conn), nil } +func getAgentMetadataClientFunc(ctx context.Context, agent *Agent, connectionCache map[*Agent]*grpc.ClientConn) (service.AgentMetadataServiceClient, error) { + conn, err := getGrpcConnection(ctx, agent, connectionCache) + if err != nil { + return nil, err + } + + return service.NewAgentMetadataServiceClient(conn), nil +} + func buildTaskExecutionMetadata(taskExecutionMetadata core.TaskExecutionMetadata) admin.TaskExecutionMetadata { taskExecutionID := taskExecutionMetadata.GetTaskExecutionID().GetID() return admin.TaskExecutionMetadata{ @@ -299,11 +330,71 @@ func getFinalContext(ctx context.Context, operation string, agent *Agent) (conte if timeout == 0 { return ctx, func() {} } + return context.WithTimeout(ctx, timeout) } +func initializeAgentRegistry(cfg *Config, connectionCache map[*Agent]*grpc.ClientConn, getAgentMetadataClientFunc GetAgentMetadataClientFunc) (map[string]*Agent, error) { + agentRegistry := make(map[string]*Agent) + var agentDeployments []*Agent + + // Ensure that the old configuration is backward compatible + for taskType, agentID := range cfg.AgentForTaskTypes { + agentRegistry[taskType] = cfg.Agents[agentID] + } + + if len(cfg.DefaultAgent.Endpoint) != 0 { + agentDeployments = append(agentDeployments, &cfg.DefaultAgent) + } + agentDeployments = append(agentDeployments, maps.Values(cfg.Agents)...) + for _, agentDeployment := range agentDeployments { + client, err := getAgentMetadataClientFunc(context.Background(), agentDeployment, connectionCache) + if err != nil { + return nil, fmt.Errorf("failed to connect to agent [%v] with error: [%v]", agentDeployment, err) + } + + finalCtx, cancel := getFinalContext(context.Background(), "ListAgents", agentDeployment) + defer cancel() + + res, err := client.ListAgents(finalCtx, &admin.ListAgentsRequest{}) + if err != nil { + grpcStatus, ok := status.FromError(err) + if grpcStatus.Code() == codes.Unimplemented { + // we should not panic here, as we want to continue to support old agent settings + logger.Infof(context.Background(), "list agent method not implemented for agent: [%v]", agentDeployment) + continue + } + + if !ok { + return nil, fmt.Errorf("failed to list agent with a non-gRPC error : [%v]", err) + } + + return nil, fmt.Errorf("failed to list agent with error: [%v]", err) + } + + agents := res.GetAgents() + for _, agent := range agents { + supportedTaskTypes := agent.SupportedTaskTypes + for _, supportedTaskType := range supportedTaskTypes { + agentRegistry[supportedTaskType] = agentDeployment + } + } + } + + return agentRegistry, nil +} + func newAgentPlugin() webapi.PluginEntry { - supportedTaskTypes := GetConfig().SupportedTaskTypes + cfg := GetConfig() + connectionCache := make(map[*Agent]*grpc.ClientConn) + agentRegistry, err := initializeAgentRegistry(cfg, connectionCache, getAgentMetadataClientFunc) + if err != nil { + // We should wait for all agents to be up and running before starting the server + panic(err) + } + + supportedTaskTypes := append(maps.Keys(agentRegistry), cfg.SupportedTaskTypes...) + logger.Infof(context.Background(), "Agent supports task types: %v", supportedTaskTypes) return webapi.PluginEntry{ ID: "agent-service", @@ -311,9 +402,10 @@ func newAgentPlugin() webapi.PluginEntry { PluginLoader: func(ctx context.Context, iCtx webapi.PluginSetupContext) (webapi.AsyncPlugin, error) { return &Plugin{ metricScope: iCtx.MetricsScope(), - cfg: GetConfig(), + cfg: cfg, getClient: getClientFunc, - connectionCache: make(map[*Agent]*grpc.ClientConn), + connectionCache: connectionCache, + agentRegistry: agentRegistry, }, nil }, } diff --git a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go index b1fdd61e79..b9fd7e1b35 100644 --- a/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go +++ b/flyteplugins/go/tasks/plugins/webapi/agent/plugin_test.go @@ -2,21 +2,61 @@ package agent import ( "context" - flyteidlcore "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "sort" "testing" "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "golang.org/x/exp/maps" "google.golang.org/grpc" + "github.com/flyteorg/flyte/flyteidl/clients/go/coreutils" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + flyteIdlCore "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery" pluginsCore "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core" pluginCoreMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core/mocks" + ioMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/io/mocks" webapiPlugin "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/webapi/mocks" + agentMocks "github.com/flyteorg/flyte/flyteplugins/go/tasks/plugins/webapi/agent/mocks" + "github.com/flyteorg/flyte/flyteplugins/tests" "github.com/flyteorg/flyte/flytestdlib/config" "github.com/flyteorg/flyte/flytestdlib/promutils" + "github.com/flyteorg/flyte/flytestdlib/storage" ) +func TestSyncTask(t *testing.T) { + tCtx := getTaskContext(t) + taskReader := new(pluginCoreMocks.TaskReader) + + template := flyteIdlCore.TaskTemplate{ + Type: "api_task", + } + + taskReader.On("Read", mock.Anything).Return(&template, nil) + + tCtx.OnTaskReader().Return(taskReader) + + agentPlugin := newMockSyncAgentPlugin() + pluginEntry := pluginmachinery.CreateRemotePlugin(agentPlugin) + plugin, err := pluginEntry.LoadPlugin(context.TODO(), newFakeSetupContext("create_task_sync_test")) + assert.NoError(t, err) + + inputs, err := coreutils.MakeLiteralMap(map[string]interface{}{"x": 1}) + assert.NoError(t, err) + basePrefix := storage.DataReference("fake://bucket/prefix/") + inputReader := &ioMocks.InputReader{} + inputReader.OnGetInputPrefixPath().Return(basePrefix) + inputReader.OnGetInputPath().Return(basePrefix + "/inputs.pb") + inputReader.OnGetMatch(mock.Anything).Return(inputs, nil) + tCtx.OnInputReader().Return(inputReader) + + phase := tests.RunPluginEndToEndTest(t, plugin, &template, inputs, nil, nil, nil) + assert.Equal(t, true, phase.Phase().IsSuccess()) +} + func TestPlugin(t *testing.T) { fakeSetupContext := pluginCoreMocks.SetupContext{} fakeSetupContext.OnMetricsScope().Return(promutils.NewScope("test")) @@ -45,19 +85,26 @@ func TestPlugin(t *testing.T) { }) t.Run("test newAgentPlugin", func(t *testing.T) { - p := newAgentPlugin() + p := newMockAgentPlugin() assert.NotNil(t, p) assert.Equal(t, "agent-service", p.ID) assert.NotNil(t, p.PluginLoader) }) t.Run("test getFinalAgent", func(t *testing.T) { - agent, _ := getFinalAgent("spark", &cfg) - assert.Equal(t, cfg.Agents["spark_agent"].Endpoint, agent.Endpoint) - agent, _ = getFinalAgent("foo", &cfg) - assert.Equal(t, cfg.DefaultAgent.Endpoint, agent.Endpoint) - _, err := getFinalAgent("bar", &cfg) - assert.NotNil(t, err) + agentRegistry := map[string]*Agent{"spark": {Endpoint: "localhost:80"}} + agent := getFinalAgent("spark", &cfg, agentRegistry) + assert.Equal(t, agent.Endpoint, "localhost:80") + agent = getFinalAgent("foo", &cfg, agentRegistry) + assert.Equal(t, agent.Endpoint, cfg.DefaultAgent.Endpoint) + agent = getFinalAgent("bar", &cfg, agentRegistry) + assert.Equal(t, agent.Endpoint, cfg.DefaultAgent.Endpoint) + }) + + t.Run("test getAgentMetadataClientFunc", func(t *testing.T) { + client, err := getAgentMetadataClientFunc(context.Background(), &Agent{Endpoint: "localhost:80"}, map[*Agent]*grpc.ClientConn{}) + assert.NoError(t, err) + assert.NotNil(t, client) }) t.Run("test getClientFunc", func(t *testing.T) { @@ -108,7 +155,7 @@ func TestPlugin(t *testing.T) { State: admin.State_PENDING, Outputs: nil, Message: "Waiting for cluster", - LogLinks: []*flyteidlcore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, + LogLinks: []*flyteIdlCore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, }) phase, err := plugin.Status(context.Background(), taskContext) @@ -123,7 +170,7 @@ func TestPlugin(t *testing.T) { State: admin.State_RUNNING, Outputs: nil, Message: "Job is running", - LogLinks: []*flyteidlcore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, + LogLinks: []*flyteIdlCore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, }) phase, err := plugin.Status(context.Background(), taskContext) @@ -137,7 +184,7 @@ func TestPlugin(t *testing.T) { State: admin.State_PERMANENT_FAILURE, Outputs: nil, Message: "", - LogLinks: []*flyteidlcore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, + LogLinks: []*flyteIdlCore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, }) phase, err := plugin.Status(context.Background(), taskContext) @@ -151,7 +198,7 @@ func TestPlugin(t *testing.T) { State: admin.State_RETRYABLE_FAILURE, Outputs: nil, Message: "", - LogLinks: []*flyteidlcore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, + LogLinks: []*flyteIdlCore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, }) phase, err := plugin.Status(context.Background(), taskContext) @@ -165,7 +212,7 @@ func TestPlugin(t *testing.T) { State: 5, Outputs: nil, Message: "", - LogLinks: []*flyteidlcore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, + LogLinks: []*flyteIdlCore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}}, }) phase, err := plugin.Status(context.Background(), taskContext) @@ -173,3 +220,34 @@ func TestPlugin(t *testing.T) { assert.Equal(t, pluginsCore.PhaseUndefined, phase.Phase()) }) } + +func TestInitializeAgentRegistry(t *testing.T) { + mockClient := new(agentMocks.AgentMetadataServiceClient) + mockRequest := &admin.ListAgentsRequest{} + mockResponse := &admin.ListAgentsResponse{ + Agents: []*admin.Agent{ + { + Name: "test-agent", + SupportedTaskTypes: []string{"task1", "task2", "task3"}, + }, + }, + } + + mockClient.On("ListAgents", mock.Anything, mockRequest).Return(mockResponse, nil) + getAgentMetadataClientFunc := func(ctx context.Context, agent *Agent, connCache map[*Agent]*grpc.ClientConn) (service.AgentMetadataServiceClient, error) { + return mockClient, nil + } + + cfg := defaultConfig + cfg.Agents = map[string]*Agent{"custom_agent": {Endpoint: "localhost:80"}} + cfg.AgentForTaskTypes = map[string]string{"task1": "agent-deployment-1", "task2": "agent-deployment-2"} + connectionCache := make(map[*Agent]*grpc.ClientConn) + agentRegistry, err := initializeAgentRegistry(&cfg, connectionCache, getAgentMetadataClientFunc) + assert.NoError(t, err) + + // In golang, the order of keys in a map is random. So, we sort the keys before asserting. + agentRegistryKeys := maps.Keys(agentRegistry) + sort.Strings(agentRegistryKeys) + + assert.Equal(t, agentRegistryKeys, []string{"task1", "task2", "task3"}) +} diff --git a/flytepropeller/pkg/controller/executors/failure_node_lookup_test.go b/flytepropeller/pkg/controller/executors/failure_node_lookup_test.go index b2dfa32231..e9d6857ec4 100644 --- a/flytepropeller/pkg/controller/executors/failure_node_lookup_test.go +++ b/flytepropeller/pkg/controller/executors/failure_node_lookup_test.go @@ -4,9 +4,10 @@ import ( "context" "testing" + "github.com/stretchr/testify/assert" + "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks" - "github.com/stretchr/testify/assert" ) type nl struct { diff --git a/flytepropeller/pkg/controller/nodes/array/handler.go b/flytepropeller/pkg/controller/nodes/array/handler.go index f1e2ef64fc..7dcdef4749 100644 --- a/flytepropeller/pkg/controller/nodes/array/handler.go +++ b/flytepropeller/pkg/controller/nodes/array/handler.go @@ -205,10 +205,16 @@ func (a *arrayNodeHandler) Handle(ctx context.Context, nCtx interfaces.NodeExecu } // initialize ArrayNode state - maxAttempts := int(config.GetConfig().NodeConfig.DefaultMaxAttempts) - subNodeSpec := *arrayNode.GetSubNodeSpec() - if subNodeSpec.GetRetryStrategy() != nil && subNodeSpec.GetRetryStrategy().MinAttempts != nil { - maxAttempts = *subNodeSpec.GetRetryStrategy().MinAttempts + maxSystemFailuresValue := int(config.GetConfig().NodeConfig.MaxNodeRetriesOnSystemFailures) + maxAttemptsValue := int(config.GetConfig().NodeConfig.DefaultMaxAttempts) + if nCtx.Node().GetRetryStrategy() != nil && nCtx.Node().GetRetryStrategy().MinAttempts != nil && *nCtx.Node().GetRetryStrategy().MinAttempts != 1 { + maxAttemptsValue = *nCtx.Node().GetRetryStrategy().MinAttempts + } + + if config.GetConfig().NodeConfig.IgnoreRetryCause { + maxSystemFailuresValue = maxAttemptsValue + } else { + maxAttemptsValue += maxSystemFailuresValue } for _, item := range []struct { @@ -219,8 +225,8 @@ func (a *arrayNodeHandler) Handle(ctx context.Context, nCtx interfaces.NodeExecu // defined as an `iota` so it is impossible to programmatically get largest value {arrayReference: &arrayNodeState.SubNodePhases, maxValue: int(v1alpha1.NodePhaseRecovered)}, {arrayReference: &arrayNodeState.SubNodeTaskPhases, maxValue: len(core.Phases) - 1}, - {arrayReference: &arrayNodeState.SubNodeRetryAttempts, maxValue: maxAttempts}, - {arrayReference: &arrayNodeState.SubNodeSystemFailures, maxValue: maxAttempts}, + {arrayReference: &arrayNodeState.SubNodeRetryAttempts, maxValue: maxAttemptsValue}, + {arrayReference: &arrayNodeState.SubNodeSystemFailures, maxValue: maxSystemFailuresValue}, } { *item.arrayReference, err = bitarray.NewCompactArray(uint(size), bitarray.Item(item.maxValue)) diff --git a/flytepropeller/pkg/controller/nodes/array/handler_test.go b/flytepropeller/pkg/controller/nodes/array/handler_test.go index b2e85c0979..fbb5ae875c 100644 --- a/flytepropeller/pkg/controller/nodes/array/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/array/handler_test.go @@ -654,6 +654,126 @@ func TestHandleArrayNodePhaseExecuting(t *testing.T) { } } +func TestHandleArrayNodePhaseExecutingSubNodeFailures(t *testing.T) { + ctx := context.Background() + + inputValues := map[string][]int64{ + "foo": []int64{1}, + "bar": []int64{2}, + } + literalMap := convertMapToArrayLiterals(inputValues) + + tests := []struct { + name string + defaultMaxAttempts int32 + maxSystemFailures int64 + ignoreRetryCause bool + transition handler.Transition + expectedAttempts int + }{ + { + name: "UserFailure", + defaultMaxAttempts: 3, + maxSystemFailures: 10, + ignoreRetryCause: false, + transition: handler.DoTransition(handler.TransitionTypeEphemeral, + handler.PhaseInfoRetryableFailure(idlcore.ExecutionError_USER, "", "", &handler.ExecutionInfo{})), + expectedAttempts: 3, + }, + { + name: "SystemFailure", + defaultMaxAttempts: 3, + maxSystemFailures: 10, + ignoreRetryCause: false, + transition: handler.DoTransition(handler.TransitionTypeEphemeral, + handler.PhaseInfoRetryableFailure(idlcore.ExecutionError_SYSTEM, "", "", &handler.ExecutionInfo{})), + expectedAttempts: 11, + }, + { + name: "UserFailureIgnoreRetryCause", + defaultMaxAttempts: 3, + maxSystemFailures: 10, + ignoreRetryCause: true, + transition: handler.DoTransition(handler.TransitionTypeEphemeral, + handler.PhaseInfoRetryableFailure(idlcore.ExecutionError_USER, "", "", &handler.ExecutionInfo{})), + expectedAttempts: 3, + }, + { + name: "SystemFailureIgnoreRetryCause", + defaultMaxAttempts: 3, + maxSystemFailures: 10, + ignoreRetryCause: true, + transition: handler.DoTransition(handler.TransitionTypeEphemeral, + handler.PhaseInfoRetryableFailure(idlcore.ExecutionError_SYSTEM, "", "", &handler.ExecutionInfo{})), + expectedAttempts: 3, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + config.GetConfig().NodeConfig.DefaultMaxAttempts = test.defaultMaxAttempts + config.GetConfig().NodeConfig.MaxNodeRetriesOnSystemFailures = test.maxSystemFailures + config.GetConfig().NodeConfig.IgnoreRetryCause = test.ignoreRetryCause + + // create NodeExecutionContext + scope := promutils.NewTestScope() + dataStore, err := storage.NewDataStore(&storage.Config{ + Type: storage.TypeMemory, + }, scope) + assert.NoError(t, err) + eventRecorder := newBufferedEventRecorder() + arrayNodeState := &handler.ArrayNodeState{ + Phase: v1alpha1.ArrayNodePhaseNone, + } + nCtx := createNodeExecutionContext(dataStore, eventRecorder, nil, literalMap, &arrayNodeSpec, arrayNodeState) + + // initialize ArrayNodeHandler + nodeHandler := &mocks.NodeHandler{} + nodeHandler.OnAbortMatch(mock.Anything, mock.Anything, mock.Anything).Return(nil) + nodeHandler.OnFinalizeMatch(mock.Anything, mock.Anything).Return(nil) + nodeHandler.OnFinalizeRequired().Return(false) + nodeHandler.OnHandleMatch(mock.Anything, mock.Anything).Return(test.transition, nil) + + arrayNodeHandler, err := createArrayNodeHandler(ctx, t, nodeHandler, dataStore, scope) + assert.NoError(t, err) + + // evaluate node to transition to Executing + _, err = arrayNodeHandler.Handle(ctx, nCtx) + assert.NoError(t, err) + assert.Equal(t, v1alpha1.ArrayNodePhaseExecuting, arrayNodeState.Phase) + + for i := 0; i < len(arrayNodeState.SubNodePhases.GetItems()); i++ { + arrayNodeState.SubNodePhases.SetItem(i, bitarray.Item(v1alpha1.NodePhaseRunning)) + } + + for i := 0; i < len(arrayNodeState.SubNodeTaskPhases.GetItems()); i++ { + arrayNodeState.SubNodeTaskPhases.SetItem(i, bitarray.Item(core.PhaseRunning)) + } + + // evaluate node until failure + attempts := 1 + for { + nCtx := createNodeExecutionContext(dataStore, eventRecorder, nil, literalMap, &arrayNodeSpec, arrayNodeState) + _, err = arrayNodeHandler.Handle(ctx, nCtx) + assert.NoError(t, err) + + if arrayNodeState.Phase == v1alpha1.ArrayNodePhaseFailing { + break + } + + // failing a task requires two calls to Handle, the first to return a + // RetryableFailure and the second to abort. therefore, we only increment the + // number of attempts once in this loop. + if arrayNodeState.SubNodePhases.GetItem(0) == bitarray.Item(v1alpha1.NodePhaseRetryableFailure) { + attempts++ + } + } + + assert.Equal(t, test.expectedAttempts, attempts) + }) + } +} + func TestHandleArrayNodePhaseSucceeding(t *testing.T) { ctx := context.Background() scope := promutils.NewTestScope()