diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 6ea00c2110c..1bd3167a6c5 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -8,6 +8,7 @@ on: paths: - '.github/workflows/e2e-test.yml' - '.github/resources/**' + - 'api/**' - 'go.mod' - 'go.sum' - 'backend/**' diff --git a/.github/workflows/kfp-kubernetes-execution-tests.yml b/.github/workflows/kfp-kubernetes-execution-tests.yml index 3d81336d25b..4a5b122e57d 100644 --- a/.github/workflows/kfp-kubernetes-execution-tests.yml +++ b/.github/workflows/kfp-kubernetes-execution-tests.yml @@ -75,7 +75,7 @@ jobs: - name: Install protobuf id: install-protobuf if: ${{ steps.install-wheel.outcome == 'success' }} - run: pip3 install protobuf==4.25.3 + run: pip3 install protobuf==6.31.1 - name: Generate API proto files id: generate-api-proto-files diff --git a/.github/workflows/kfp-kubernetes-library-test.yml b/.github/workflows/kfp-kubernetes-library-test.yml index a98cc9146cb..01eceecd1d0 100644 --- a/.github/workflows/kfp-kubernetes-library-test.yml +++ b/.github/workflows/kfp-kubernetes-library-test.yml @@ -21,6 +21,7 @@ jobs: { 'version': '3.9' }, { 'version': '3.13' } ] + protobuf-version: ['5.26.0', '6.31.1'] steps: - name: Checkout code uses: actions/checkout@v4 @@ -42,7 +43,9 @@ jobs: run: pip3 install wheel==0.42.0 - name: Install protobuf - run: pip3 install protobuf==4.25.3 + run: pip3 install protobuf==${PROTOBUF_VERSION} + env: + PROTOBUF_VERSION: ${{ matrix.protobuf-version }} - name: Install kfp-sdk from source run: | diff --git a/.github/workflows/kfp-samples.yml b/.github/workflows/kfp-samples.yml index 428a5010ec0..b9a1ec57713 100644 --- a/.github/workflows/kfp-samples.yml +++ b/.github/workflows/kfp-samples.yml @@ -8,6 +8,7 @@ on: - '.github/resources/**' - '.github/workflows/kfp-samples.yml' - '.github/workflows/kubeflow-pipelines-integration-v2.yml' + - 'api/**' - 'backend/**' - 'samples/**' - 'samples/core/dataflow/**' @@ -53,7 +54,7 @@ jobs: run: pip3 install wheel==0.42.0 - name: Install protobuf - run: pip3 install protobuf==4.25.3 + run: pip3 install protobuf==6.31.1 - name: Generate API proto files working-directory: ./api diff --git a/.github/workflows/kfp-sdk-tests.yml b/.github/workflows/kfp-sdk-tests.yml index e5c50b6c33d..31394f73db0 100644 --- a/.github/workflows/kfp-sdk-tests.yml +++ b/.github/workflows/kfp-sdk-tests.yml @@ -5,6 +5,7 @@ on: branches: [master] pull_request: paths: + - 'api/**' - 'sdk/**' - 'test/presubmit-tests-sdk.sh' - '.github/workflows/kfp-sdk-tests.yml' @@ -17,6 +18,7 @@ jobs: strategy: matrix: python-version: ['3.9', '3.13'] + protobuf-version: ['5.26.0', '6.31.1'] steps: - name: Checkout code @@ -41,6 +43,9 @@ jobs: run: | python3 -m pip install -I api/v2alpha1/python - - name: Run SDK Tests + - name: Run presubmit tests + env: + PROTOBUF_VERSION: ${{ matrix.protobuf-version }} run: | + echo "Testing with protobuf==$PROTOBUF_VERSION" ./test/presubmit-tests-sdk.sh diff --git a/.github/workflows/sdk-component-yaml.yml b/.github/workflows/sdk-component-yaml.yml index 8afcf49d940..62c0a4e1fe1 100644 --- a/.github/workflows/sdk-component-yaml.yml +++ b/.github/workflows/sdk-component-yaml.yml @@ -38,7 +38,7 @@ jobs: run: pip3 install wheel==0.42.0 - name: Install protobuf - run: pip3 install protobuf==4.25.3 + run: pip3 install protobuf==6.31.1 - name: Generate API proto files working-directory: ./api diff --git a/.github/workflows/sdk-execution.yml b/.github/workflows/sdk-execution.yml index a9026de6257..21e34ba399a 100644 --- a/.github/workflows/sdk-execution.yml +++ b/.github/workflows/sdk-execution.yml @@ -88,7 +88,7 @@ jobs: - name: Install protobuf id: install-protobuf if: ${{ steps.install-wheel.outcome == 'success' }} - run: pip3 install protobuf==4.25.3 + run: pip3 install protobuf==6.31.1 - name: Generate API proto files id: generate-api-proto-files diff --git a/api/Makefile b/api/Makefile index aaa8ec8c4fe..ea9bc5f95e0 100644 --- a/api/Makefile +++ b/api/Makefile @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Contact one of chensun, HumairAK, zijianjoy if this remote image needs an update. -PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.1 +# Contact one of chensun, HumairAK if this remote image needs an update. +PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.2 .PHONY: all all: golang python @@ -36,14 +36,22 @@ clean-go: rm -rf v2alpha1/go rm -f v2alpha1/google/rpc/status.proto -# Build and locally install Python package. +# Build Python package using pre-built image .PHONY: python -python: v2alpha1/pipeline_spec.proto v2alpha1/google/rpc/status.proto - python3 v2alpha1/python/generate_proto.py && cd v2alpha1/python && python3 setup.py bdist_wheel +python: python fetch-protos + docker run --interactive --rm \ + --user $$(id -u):$$(id -g) \ + -e HOME=/tmp \ + -v "$$(pwd)/..":"/go/src/github.com/kubeflow/pipelines":z \ + $(PREBUILT_REMOTE_IMAGE) \ + sh -c 'cd /go/src/github.com/kubeflow/pipelines/api/v2alpha1/python && \ + python3 -m pip install --user --break-system-packages -r requirements.txt && \ + python3 generate_proto.py && \ + python3 setup.py sdist bdist_wheel --dist-dir ./dist' # Build and locally install Python package using editable mode for development. .PHONY: python-dev -python-dev: v2alpha1/pipeline_spec.proto v2alpha1/google/rpc/status.proto +python-dev: v2alpha1/pipeline_spec.proto fetch-protos python3 v2alpha1/python/generate_proto.py && cd v2alpha1/python && pip install -e . # Delete all generated Python packages @@ -55,9 +63,9 @@ clean-python: rm -f v2alpha1/python/kfp/pipeline_spec/pipeline_spec_pb2.py rm -f v2alpha1/google/rpc/status.proto -########################## +########################################### # The following are IMPLEMENTATION DETAILS. -########################## +########################################### # Generates proto packages locally, this should only be called: # * during development @@ -65,7 +73,7 @@ clean-python: .PHONY: generate generate: go_pipelinespec go_cachekey -go_pipelinespec: v2alpha1/pipeline_spec.proto v2alpha1/google/rpc/status.proto +go_pipelinespec: v2alpha1/pipeline_spec.proto fetch-protos mkdir -p v2alpha1/go/pipelinespec cd v2alpha1 && protoc -I=. \ --go_out=go/pipelinespec \ @@ -79,12 +87,32 @@ go_cachekey: v2alpha1/pipeline_spec.proto v2alpha1/cache_key.proto --go_opt=paths=source_relative \ cache_key.proto -# Fetch dependency proto -v2alpha1/google/rpc/status.proto: - mkdir -p v2alpha1/google/rpc - wget -O v2alpha1/google/rpc/status.proto https://raw.githubusercontent.com/googleapis/googleapis/047d3a8ac7f75383855df0166144f891d7af08d9/google/rpc/status.proto +######################################### +# The following are dependencies +# Required for compiling the proto files +######################################### + +GOOGLEAPIS_COMMIT ?= fecd7d35f46753b45bf4519f6342495a181740c9 +PROTOBUF_TAG ?= v26.0 +PROTO_DST_DIR := v2alpha1/google +TMP_PROTOBUF_DIR := /tmp/protobuf-src + +.PHONY: fetch-protos fetch-googleapis fetch-protobuf protoc-gen-go clean-protobuf-tmp + +fetch-protos: fetch-googleapis fetch-protobuf + +fetch-googleapis: + @echo "Downloading google/rpc/status.proto from googleapis@$(GOOGLEAPIS_COMMIT)..." + mkdir -p $(PROTO_DST_DIR)/rpc + wget -qO $(PROTO_DST_DIR)/rpc/status.proto https://raw.githubusercontent.com/googleapis/googleapis/$(GOOGLEAPIS_COMMIT)/google/rpc/status.proto + +fetch-protobuf: clean-protobuf-tmp + @git clone --depth 1 --branch $(PROTOBUF_TAG) https://github.com/protocolbuffers/protobuf.git $(TMP_PROTOBUF_DIR) + @mkdir -p $(PROTO_DST_DIR)/protobuf + @cp $(TMP_PROTOBUF_DIR)/src/google/protobuf/*.proto $(PROTO_DST_DIR)/protobuf/ + +clean-protobuf-tmp: + @rm -rf $(TMP_PROTOBUF_DIR) -# protoc-gen-go is already installed in api-generator image -.PHONY: protoc-gen-go protoc-gen-go: go install google.golang.org/protobuf/cmd/protoc-gen-go diff --git a/api/v2alpha1/go/cachekey/cache_key.pb.go b/api/v2alpha1/go/cachekey/cache_key.pb.go index 73f6320ff8e..fb71569c38a 100644 --- a/api/v2alpha1/go/cachekey/cache_key.pb.go +++ b/api/v2alpha1/go/cachekey/cache_key.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: cache_key.proto package cachekey @@ -27,6 +27,7 @@ import ( structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -37,26 +38,23 @@ const ( ) type CacheKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InputArtifactNames map[string]*ArtifactNameList `protobuf:"bytes,1,rep,name=inputArtifactNames,proto3" json:"inputArtifactNames,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + InputArtifactNames map[string]*ArtifactNameList `protobuf:"bytes,1,rep,name=inputArtifactNames,proto3" json:"inputArtifactNames,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Deprecated: Marked as deprecated in cache_key.proto. - InputParameters map[string]*pipelinespec.Value `protobuf:"bytes,2,rep,name=inputParameters,proto3" json:"inputParameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - OutputArtifactsSpec map[string]*pipelinespec.RuntimeArtifact `protobuf:"bytes,3,rep,name=outputArtifactsSpec,proto3" json:"outputArtifactsSpec,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - OutputParametersSpec map[string]string `protobuf:"bytes,4,rep,name=outputParametersSpec,proto3" json:"outputParametersSpec,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + InputParameters map[string]*pipelinespec.Value `protobuf:"bytes,2,rep,name=inputParameters,proto3" json:"inputParameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + OutputArtifactsSpec map[string]*pipelinespec.RuntimeArtifact `protobuf:"bytes,3,rep,name=outputArtifactsSpec,proto3" json:"outputArtifactsSpec,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + OutputParametersSpec map[string]string `protobuf:"bytes,4,rep,name=outputParametersSpec,proto3" json:"outputParametersSpec,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` ContainerSpec *ContainerSpec `protobuf:"bytes,5,opt,name=containerSpec,proto3" json:"containerSpec,omitempty"` - InputParameterValues map[string]*structpb.Value `protobuf:"bytes,6,rep,name=input_parameter_values,json=inputParameterValues,proto3" json:"input_parameter_values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + InputParameterValues map[string]*structpb.Value `protobuf:"bytes,6,rep,name=input_parameter_values,json=inputParameterValues,proto3" json:"input_parameter_values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CacheKey) Reset() { *x = CacheKey{} - if protoimpl.UnsafeEnabled { - mi := &file_cache_key_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cache_key_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CacheKey) String() string { @@ -67,7 +65,7 @@ func (*CacheKey) ProtoMessage() {} func (x *CacheKey) ProtoReflect() protoreflect.Message { mi := &file_cache_key_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -126,21 +124,18 @@ func (x *CacheKey) GetInputParameterValues() map[string]*structpb.Value { } type ContainerSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` + CmdArgs []string `protobuf:"bytes,2,rep,name=cmdArgs,proto3" json:"cmdArgs,omitempty"` unknownFields protoimpl.UnknownFields - - Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` - CmdArgs []string `protobuf:"bytes,2,rep,name=cmdArgs,proto3" json:"cmdArgs,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ContainerSpec) Reset() { *x = ContainerSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_cache_key_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cache_key_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ContainerSpec) String() string { @@ -151,7 +146,7 @@ func (*ContainerSpec) ProtoMessage() {} func (x *ContainerSpec) ProtoReflect() protoreflect.Message { mi := &file_cache_key_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,20 +176,17 @@ func (x *ContainerSpec) GetCmdArgs() []string { } type ArtifactNameList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ArtifactNames []string `protobuf:"bytes,1,rep,name=artifactNames,proto3" json:"artifactNames,omitempty"` unknownFields protoimpl.UnknownFields - - ArtifactNames []string `protobuf:"bytes,1,rep,name=artifactNames,proto3" json:"artifactNames,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ArtifactNameList) Reset() { *x = ArtifactNameList{} - if protoimpl.UnsafeEnabled { - mi := &file_cache_key_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_cache_key_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArtifactNameList) String() string { @@ -205,7 +197,7 @@ func (*ArtifactNameList) ProtoMessage() {} func (x *ArtifactNameList) ProtoReflect() protoreflect.Message { mi := &file_cache_key_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -229,105 +221,51 @@ func (x *ArtifactNameList) GetArtifactNames() []string { var File_cache_key_proto protoreflect.FileDescriptor -var file_cache_key_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0c, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x8a, 0x08, 0x0a, 0x08, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4b, 0x65, 0x79, 0x12, - 0x5e, 0x0a, 0x12, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x4b, 0x65, 0x79, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x59, 0x0a, 0x0f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4b, 0x65, 0x79, - 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x61, 0x0a, 0x13, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x53, 0x70, 0x65, - 0x63, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4b, 0x65, 0x79, 0x2e, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x53, - 0x70, 0x65, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x64, 0x0a, - 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x53, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x4b, 0x65, 0x79, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x53, 0x70, 0x65, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x53, - 0x70, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x53, 0x70, 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x66, 0x0a, 0x16, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4b, 0x65, 0x79, 0x2e, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x65, - 0x0a, 0x17, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x57, 0x0a, 0x14, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x65, - 0x0a, 0x18, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x73, 0x53, 0x70, 0x65, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x47, 0x0a, 0x19, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x53, 0x70, 0x65, 0x63, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5f, - 0x0a, 0x19, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x3f, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x41, 0x72, 0x67, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6d, 0x64, 0x41, 0x72, 0x67, 0x73, - 0x22, 0x38, 0x0a, 0x10, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x6b, 0x65, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_cache_key_proto_rawDesc = "" + + "\n" + + "\x0fcache_key.proto\x12\fml_pipelines\x1a\x1cgoogle/protobuf/struct.proto\x1a\x13pipeline_spec.proto\"\x8a\b\n" + + "\bCacheKey\x12^\n" + + "\x12inputArtifactNames\x18\x01 \x03(\v2..ml_pipelines.CacheKey.InputArtifactNamesEntryR\x12inputArtifactNames\x12Y\n" + + "\x0finputParameters\x18\x02 \x03(\v2+.ml_pipelines.CacheKey.InputParametersEntryB\x02\x18\x01R\x0finputParameters\x12a\n" + + "\x13outputArtifactsSpec\x18\x03 \x03(\v2/.ml_pipelines.CacheKey.OutputArtifactsSpecEntryR\x13outputArtifactsSpec\x12d\n" + + "\x14outputParametersSpec\x18\x04 \x03(\v20.ml_pipelines.CacheKey.OutputParametersSpecEntryR\x14outputParametersSpec\x12A\n" + + "\rcontainerSpec\x18\x05 \x01(\v2\x1b.ml_pipelines.ContainerSpecR\rcontainerSpec\x12f\n" + + "\x16input_parameter_values\x18\x06 \x03(\v20.ml_pipelines.CacheKey.InputParameterValuesEntryR\x14inputParameterValues\x1ae\n" + + "\x17InputArtifactNamesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x124\n" + + "\x05value\x18\x02 \x01(\v2\x1e.ml_pipelines.ArtifactNameListR\x05value:\x028\x01\x1aW\n" + + "\x14InputParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.ml_pipelines.ValueR\x05value:\x028\x01\x1ae\n" + + "\x18OutputArtifactsSpecEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x123\n" + + "\x05value\x18\x02 \x01(\v2\x1d.ml_pipelines.RuntimeArtifactR\x05value:\x028\x01\x1aG\n" + + "\x19OutputParametersSpecEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a_\n" + + "\x19InputParameterValuesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\"?\n" + + "\rContainerSpec\x12\x14\n" + + "\x05image\x18\x01 \x01(\tR\x05image\x12\x18\n" + + "\acmdArgs\x18\x02 \x03(\tR\acmdArgs\"8\n" + + "\x10ArtifactNameList\x12$\n" + + "\rartifactNames\x18\x01 \x03(\tR\rartifactNamesB8Z6github.com/kubeflow/pipelines/api/v2alpha1/go/cachekeyb\x06proto3" var ( file_cache_key_proto_rawDescOnce sync.Once - file_cache_key_proto_rawDescData = file_cache_key_proto_rawDesc + file_cache_key_proto_rawDescData []byte ) func file_cache_key_proto_rawDescGZIP() []byte { file_cache_key_proto_rawDescOnce.Do(func() { - file_cache_key_proto_rawDescData = protoimpl.X.CompressGZIP(file_cache_key_proto_rawDescData) + file_cache_key_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_cache_key_proto_rawDesc), len(file_cache_key_proto_rawDesc))) }) return file_cache_key_proto_rawDescData } var file_cache_key_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_cache_key_proto_goTypes = []interface{}{ +var file_cache_key_proto_goTypes = []any{ (*CacheKey)(nil), // 0: ml_pipelines.CacheKey (*ContainerSpec)(nil), // 1: ml_pipelines.ContainerSpec (*ArtifactNameList)(nil), // 2: ml_pipelines.ArtifactNameList @@ -363,49 +301,11 @@ func file_cache_key_proto_init() { if File_cache_key_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_cache_key_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CacheKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cache_key_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContainerSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cache_key_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArtifactNameList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cache_key_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_cache_key_proto_rawDesc), len(file_cache_key_proto_rawDesc)), NumEnums: 0, NumMessages: 8, NumExtensions: 0, @@ -416,7 +316,6 @@ func file_cache_key_proto_init() { MessageInfos: file_cache_key_proto_msgTypes, }.Build() File_cache_key_proto = out.File - file_cache_key_proto_rawDesc = nil file_cache_key_proto_goTypes = nil file_cache_key_proto_depIdxs = nil } diff --git a/api/v2alpha1/go/pipelinespec/pipeline_spec.pb.go b/api/v2alpha1/go/pipelinespec/pipeline_spec.pb.go index 39f3ecd0000..206181cbe95 100644 --- a/api/v2alpha1/go/pipelinespec/pipeline_spec.pb.go +++ b/api/v2alpha1/go/pipelinespec/pipeline_spec.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: pipeline_spec.proto package pipelinespec @@ -14,6 +14,7 @@ import ( structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -321,28 +322,25 @@ func (PipelineStateEnum_PipelineTaskState) EnumDescriptor() ([]byte, []int) { // The spec of a pipeline job. type PipelineJob struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the job. + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the job. // User friendly display name DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // Definition of the pipeline that is being executed. PipelineSpec *structpb.Struct `protobuf:"bytes,7,opt,name=pipeline_spec,json=pipelineSpec,proto3" json:"pipeline_spec,omitempty"` // The labels with user-defined metadata to organize PipelineJob. - Labels map[string]string `protobuf:"bytes,11,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Labels map[string]string `protobuf:"bytes,11,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Runtime config of the pipeline. RuntimeConfig *PipelineJob_RuntimeConfig `protobuf:"bytes,12,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineJob) Reset() { *x = PipelineJob{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob) String() string { @@ -353,7 +351,7 @@ func (*PipelineJob) ProtoMessage() {} func (x *PipelineJob) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,10 +403,7 @@ func (x *PipelineJob) GetRuntimeConfig() *PipelineJob_RuntimeConfig { // The spec of a pipeline. type PipelineSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The metadata of the pipeline. PipelineInfo *PipelineInfo `protobuf:"bytes,1,opt,name=pipeline_info,json=pipelineInfo,proto3" json:"pipeline_info,omitempty"` // The deployment config of the pipeline. @@ -419,21 +414,21 @@ type PipelineSpec struct { // The version of the schema. SchemaVersion string `protobuf:"bytes,5,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"` // The map of name to definition of all components used in this pipeline. - Components map[string]*ComponentSpec `protobuf:"bytes,8,rep,name=components,proto3" json:"components,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Components map[string]*ComponentSpec `protobuf:"bytes,8,rep,name=components,proto3" json:"components,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The definition of the main pipeline. Execution of the pipeline is // completed upon the completion of this component. Root *ComponentSpec `protobuf:"bytes,9,opt,name=root,proto3" json:"root,omitempty"` // Optional field. The default root output directory of the pipeline. DefaultPipelineRoot string `protobuf:"bytes,10,opt,name=default_pipeline_root,json=defaultPipelineRoot,proto3" json:"default_pipeline_root,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineSpec) Reset() { *x = PipelineSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineSpec) String() string { @@ -444,7 +439,7 @@ func (*PipelineSpec) ProtoMessage() {} func (x *PipelineSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -510,32 +505,29 @@ func (x *PipelineSpec) GetDefaultPipelineRoot() string { // Definition of a component. type ComponentSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Definition of the input parameters and artifacts of the component. InputDefinitions *ComponentInputsSpec `protobuf:"bytes,1,opt,name=input_definitions,json=inputDefinitions,proto3" json:"input_definitions,omitempty"` // Definition of the output parameters and artifacts of the component. OutputDefinitions *ComponentOutputsSpec `protobuf:"bytes,2,opt,name=output_definitions,json=outputDefinitions,proto3" json:"output_definitions,omitempty"` // Either a DAG or a single execution. // - // Types that are assignable to Implementation: + // Types that are valid to be assigned to Implementation: // // *ComponentSpec_Dag // *ComponentSpec_ExecutorLabel Implementation isComponentSpec_Implementation `protobuf_oneof:"implementation"` // Supports platform-specific component features. SinglePlatformSpecs []*SinglePlatformSpec `protobuf:"bytes,5,rep,name=single_platform_specs,json=singlePlatformSpecs,proto3" json:"single_platform_specs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComponentSpec) Reset() { *x = ComponentSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentSpec) String() string { @@ -546,7 +538,7 @@ func (*ComponentSpec) ProtoMessage() {} func (x *ComponentSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -575,23 +567,27 @@ func (x *ComponentSpec) GetOutputDefinitions() *ComponentOutputsSpec { return nil } -func (m *ComponentSpec) GetImplementation() isComponentSpec_Implementation { - if m != nil { - return m.Implementation +func (x *ComponentSpec) GetImplementation() isComponentSpec_Implementation { + if x != nil { + return x.Implementation } return nil } func (x *ComponentSpec) GetDag() *DagSpec { - if x, ok := x.GetImplementation().(*ComponentSpec_Dag); ok { - return x.Dag + if x != nil { + if x, ok := x.Implementation.(*ComponentSpec_Dag); ok { + return x.Dag + } } return nil } func (x *ComponentSpec) GetExecutorLabel() string { - if x, ok := x.GetImplementation().(*ComponentSpec_ExecutorLabel); ok { - return x.ExecutorLabel + if x != nil { + if x, ok := x.Implementation.(*ComponentSpec_ExecutorLabel); ok { + return x.ExecutorLabel + } } return "" } @@ -621,23 +617,20 @@ func (*ComponentSpec_ExecutorLabel) isComponentSpec_Implementation() {} // A DAG contains multiple tasks. type DagSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The tasks inside the dag. - Tasks map[string]*PipelineTaskSpec `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Tasks map[string]*PipelineTaskSpec `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Defines how the outputs of the dag are linked to the sub tasks. - Outputs *DagOutputsSpec `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"` + Outputs *DagOutputsSpec `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DagSpec) Reset() { *x = DagSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DagSpec) String() string { @@ -648,7 +641,7 @@ func (*DagSpec) ProtoMessage() {} func (x *DagSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,23 +672,20 @@ func (x *DagSpec) GetOutputs() *DagOutputsSpec { // Definition of the output artifacts and parameters of the DAG component. type DagOutputsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Name to the output artifact channel of the DAG. - Artifacts map[string]*DagOutputsSpec_DagOutputArtifactSpec `protobuf:"bytes,1,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Artifacts map[string]*DagOutputsSpec_DagOutputArtifactSpec `protobuf:"bytes,1,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The name to the output parameter. - Parameters map[string]*DagOutputsSpec_DagOutputParameterSpec `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*DagOutputsSpec_DagOutputParameterSpec `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DagOutputsSpec) Reset() { *x = DagOutputsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DagOutputsSpec) String() string { @@ -706,7 +696,7 @@ func (*DagOutputsSpec) ProtoMessage() {} func (x *DagOutputsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -737,23 +727,20 @@ func (x *DagOutputsSpec) GetParameters() map[string]*DagOutputsSpec_DagOutputPar // Definition specification of the component input parameters and artifacts. type ComponentInputsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Name to artifact input. - Artifacts map[string]*ComponentInputsSpec_ArtifactSpec `protobuf:"bytes,1,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Artifacts map[string]*ComponentInputsSpec_ArtifactSpec `protobuf:"bytes,1,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Name to parameter input. - Parameters map[string]*ComponentInputsSpec_ParameterSpec `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*ComponentInputsSpec_ParameterSpec `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComponentInputsSpec) Reset() { *x = ComponentInputsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentInputsSpec) String() string { @@ -764,7 +751,7 @@ func (*ComponentInputsSpec) ProtoMessage() {} func (x *ComponentInputsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -795,23 +782,20 @@ func (x *ComponentInputsSpec) GetParameters() map[string]*ComponentInputsSpec_Pa // Definition specification of the component output parameters and artifacts. type ComponentOutputsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Name to artifact output. - Artifacts map[string]*ComponentOutputsSpec_ArtifactSpec `protobuf:"bytes,1,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Artifacts map[string]*ComponentOutputsSpec_ArtifactSpec `protobuf:"bytes,1,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Name to parameter output. - Parameters map[string]*ComponentOutputsSpec_ParameterSpec `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*ComponentOutputsSpec_ParameterSpec `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComponentOutputsSpec) Reset() { *x = ComponentOutputsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentOutputsSpec) String() string { @@ -822,7 +806,7 @@ func (*ComponentOutputsSpec) ProtoMessage() {} func (x *ComponentOutputsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -853,24 +837,21 @@ func (x *ComponentOutputsSpec) GetParameters() map[string]*ComponentOutputsSpec_ // The spec of task inputs. type TaskInputsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A map of input parameters which are small values, stored by the system and // can be queriable. - Parameters map[string]*TaskInputsSpec_InputParameterSpec `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*TaskInputsSpec_InputParameterSpec `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // A map of input artifacts. - Artifacts map[string]*TaskInputsSpec_InputArtifactSpec `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Artifacts map[string]*TaskInputsSpec_InputArtifactSpec `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskInputsSpec) Reset() { *x = TaskInputsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskInputsSpec) String() string { @@ -881,7 +862,7 @@ func (*TaskInputsSpec) ProtoMessage() {} func (x *TaskInputsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -912,30 +893,27 @@ func (x *TaskInputsSpec) GetArtifacts() map[string]*TaskInputsSpec_InputArtifact // The spec of task outputs. type TaskOutputsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A map of output parameters which are small values, stored by the system and // can be queriable. The output key is used // by [TaskInputsSpec.InputParameterSpec][] of the downstream task to specify // the data dependency. The same key will also be used by // [ExecutorInput.Inputs][] to reference the output parameter. - Parameters map[string]*TaskOutputsSpec_OutputParameterSpec `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*TaskOutputsSpec_OutputParameterSpec `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // A map of output artifacts. Keyed by output key. The output key is used // by [TaskInputsSpec.InputArtifactSpec][] of the downstream task to specify // the data dependency. The same key will also be used by // [ExecutorInput.Inputs][] to reference the output artifact. - Artifacts map[string]*TaskOutputsSpec_OutputArtifactSpec `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Artifacts map[string]*TaskOutputsSpec_OutputArtifactSpec `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskOutputsSpec) Reset() { *x = TaskOutputsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskOutputsSpec) String() string { @@ -946,7 +924,7 @@ func (*TaskOutputsSpec) ProtoMessage() {} func (x *TaskOutputsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -980,18 +958,16 @@ func (x *TaskOutputsSpec) GetArtifacts() map[string]*TaskOutputsSpec_OutputArtif // // Deprecated: Marked as deprecated in pipeline_spec.proto. type PrimitiveType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PrimitiveType) Reset() { *x = PrimitiveType{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrimitiveType) String() string { @@ -1002,7 +978,7 @@ func (*PrimitiveType) ProtoMessage() {} func (x *PrimitiveType) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1020,18 +996,16 @@ func (*PrimitiveType) Descriptor() ([]byte, []int) { // Represent parameter types. The wrapper is needed to give a namespace of // enum value so we don't need add `PARAMETER_TYPE_` prefix of each enum value. type ParameterType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ParameterType) Reset() { *x = ParameterType{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParameterType) String() string { @@ -1042,7 +1016,7 @@ func (*ParameterType) ProtoMessage() {} func (x *ParameterType) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1059,10 +1033,7 @@ func (*ParameterType) Descriptor() ([]byte, []int) { // The spec of a pipeline task. type PipelineTaskSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Basic info of a pipeline task. TaskInfo *PipelineTaskInfo `protobuf:"bytes,1,opt,name=task_info,json=taskInfo,proto3" json:"task_info,omitempty"` // Specification for task inputs which contains parameters and artifacts. @@ -1097,7 +1068,7 @@ type PipelineTaskSpec struct { // parent_task.outputs.parameters = { 'p': '["v1", "v2"]' } // parent_task.outputs.artifacts = { 'a': [a1, a2] } // - // Types that are assignable to Iterator: + // Types that are valid to be assigned to Iterator: // // *PipelineTaskSpec_ArtifactIterator // *PipelineTaskSpec_ParameterIterator @@ -1107,15 +1078,15 @@ type PipelineTaskSpec struct { RetryPolicy *PipelineTaskSpec_RetryPolicy `protobuf:"bytes,11,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` // Iterator related settings. IteratorPolicy *PipelineTaskSpec_IteratorPolicy `protobuf:"bytes,12,opt,name=iterator_policy,json=iteratorPolicy,proto3" json:"iterator_policy,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskSpec) Reset() { *x = PipelineTaskSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskSpec) String() string { @@ -1126,7 +1097,7 @@ func (*PipelineTaskSpec) ProtoMessage() {} func (x *PipelineTaskSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1183,23 +1154,27 @@ func (x *PipelineTaskSpec) GetTriggerPolicy() *PipelineTaskSpec_TriggerPolicy { return nil } -func (m *PipelineTaskSpec) GetIterator() isPipelineTaskSpec_Iterator { - if m != nil { - return m.Iterator +func (x *PipelineTaskSpec) GetIterator() isPipelineTaskSpec_Iterator { + if x != nil { + return x.Iterator } return nil } func (x *PipelineTaskSpec) GetArtifactIterator() *ArtifactIteratorSpec { - if x, ok := x.GetIterator().(*PipelineTaskSpec_ArtifactIterator); ok { - return x.ArtifactIterator + if x != nil { + if x, ok := x.Iterator.(*PipelineTaskSpec_ArtifactIterator); ok { + return x.ArtifactIterator + } } return nil } func (x *PipelineTaskSpec) GetParameterIterator() *ParameterIteratorSpec { - if x, ok := x.GetIterator().(*PipelineTaskSpec_ParameterIterator); ok { - return x.ParameterIterator + if x != nil { + if x, ok := x.Iterator.(*PipelineTaskSpec_ParameterIterator); ok { + return x.ParameterIterator + } } return nil } @@ -1239,24 +1214,21 @@ func (*PipelineTaskSpec_ParameterIterator) isPipelineTaskSpec_Iterator() {} // The spec of an artifact iterator. It supports fan-out a workflow from a list // of artifacts. type ArtifactIteratorSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The items to iterate. Items *ArtifactIteratorSpec_ItemsSpec `protobuf:"bytes,1,opt,name=items,proto3" json:"items,omitempty"` // The name of the input artifact channel which has the artifact item from the // [items][] collection. - ItemInput string `protobuf:"bytes,2,opt,name=item_input,json=itemInput,proto3" json:"item_input,omitempty"` + ItemInput string `protobuf:"bytes,2,opt,name=item_input,json=itemInput,proto3" json:"item_input,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArtifactIteratorSpec) Reset() { *x = ArtifactIteratorSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArtifactIteratorSpec) String() string { @@ -1267,7 +1239,7 @@ func (*ArtifactIteratorSpec) ProtoMessage() {} func (x *ArtifactIteratorSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1299,24 +1271,21 @@ func (x *ArtifactIteratorSpec) GetItemInput() string { // The spec of a parameter iterator. It supports fan-out a workflow from a // string parameter which contains a JSON array. type ParameterIteratorSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The items to iterate. Items *ParameterIteratorSpec_ItemsSpec `protobuf:"bytes,1,opt,name=items,proto3" json:"items,omitempty"` // The name of the input parameter which has the item value from the // [items][] collection. - ItemInput string `protobuf:"bytes,2,opt,name=item_input,json=itemInput,proto3" json:"item_input,omitempty"` + ItemInput string `protobuf:"bytes,2,opt,name=item_input,json=itemInput,proto3" json:"item_input,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ParameterIteratorSpec) Reset() { *x = ParameterIteratorSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParameterIteratorSpec) String() string { @@ -1327,7 +1296,7 @@ func (*ParameterIteratorSpec) ProtoMessage() {} func (x *ParameterIteratorSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1357,22 +1326,19 @@ func (x *ParameterIteratorSpec) GetItemInput() string { } type ComponentRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of a component. Refer to the key of the // [PipelineSpec.components][] map. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComponentRef) Reset() { *x = ComponentRef{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentRef) String() string { @@ -1383,7 +1349,7 @@ func (*ComponentRef) ProtoMessage() {} func (x *ComponentRef) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1407,10 +1373,7 @@ func (x *ComponentRef) GetName() string { // Basic info of a pipeline. type PipelineInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required field. The name of the pipeline. // The name will be used to create or find pipeline context in MLMD. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -1419,16 +1382,16 @@ type PipelineInfo struct { DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // Optional fields. The readable description for the pipeline template. // Should not exceed 1024 characters. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineInfo) Reset() { *x = PipelineInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineInfo) String() string { @@ -1439,7 +1402,7 @@ func (*PipelineInfo) ProtoMessage() {} func (x *PipelineInfo) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1477,11 +1440,8 @@ func (x *PipelineInfo) GetDescription() string { // The definition of a artifact type in MLMD. type ArtifactTypeSchema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: // // *ArtifactTypeSchema_SchemaTitle // *ArtifactTypeSchema_SchemaUri @@ -1490,15 +1450,15 @@ type ArtifactTypeSchema struct { // The schema version of the artifact. If the value is not set, it defaults // to the the latest version in the system. SchemaVersion string `protobuf:"bytes,4,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArtifactTypeSchema) Reset() { *x = ArtifactTypeSchema{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArtifactTypeSchema) String() string { @@ -1509,7 +1469,7 @@ func (*ArtifactTypeSchema) ProtoMessage() {} func (x *ArtifactTypeSchema) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1524,31 +1484,37 @@ func (*ArtifactTypeSchema) Descriptor() ([]byte, []int) { return file_pipeline_spec_proto_rawDescGZIP(), []int{16} } -func (m *ArtifactTypeSchema) GetKind() isArtifactTypeSchema_Kind { - if m != nil { - return m.Kind +func (x *ArtifactTypeSchema) GetKind() isArtifactTypeSchema_Kind { + if x != nil { + return x.Kind } return nil } func (x *ArtifactTypeSchema) GetSchemaTitle() string { - if x, ok := x.GetKind().(*ArtifactTypeSchema_SchemaTitle); ok { - return x.SchemaTitle + if x != nil { + if x, ok := x.Kind.(*ArtifactTypeSchema_SchemaTitle); ok { + return x.SchemaTitle + } } return "" } // Deprecated: Marked as deprecated in pipeline_spec.proto. func (x *ArtifactTypeSchema) GetSchemaUri() string { - if x, ok := x.GetKind().(*ArtifactTypeSchema_SchemaUri); ok { - return x.SchemaUri + if x != nil { + if x, ok := x.Kind.(*ArtifactTypeSchema_SchemaUri); ok { + return x.SchemaUri + } } return "" } func (x *ArtifactTypeSchema) GetInstanceSchema() string { - if x, ok := x.GetKind().(*ArtifactTypeSchema_InstanceSchema); ok { - return x.InstanceSchema + if x != nil { + if x, ok := x.Kind.(*ArtifactTypeSchema_InstanceSchema); ok { + return x.InstanceSchema + } } return "" } @@ -1599,24 +1565,21 @@ func (*ArtifactTypeSchema_InstanceSchema) isArtifactTypeSchema_Kind() {} // The basic info of a task. type PipelineTaskInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The display name of the task. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The name of the task used throughout the pipeline acts as a unique // identifier. - TaskName string `protobuf:"bytes,2,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"` + TaskName string `protobuf:"bytes,2,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskInfo) Reset() { *x = PipelineTaskInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskInfo) String() string { @@ -1627,7 +1590,7 @@ func (*PipelineTaskInfo) ProtoMessage() {} func (x *PipelineTaskInfo) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1661,25 +1624,22 @@ func (x *PipelineTaskInfo) GetTaskName() string { // determined during compilation time, or a runtime parameter which will be // determined during runtime. type ValueOrRuntimeParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Value: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Value: // // *ValueOrRuntimeParameter_ConstantValue // *ValueOrRuntimeParameter_RuntimeParameter // *ValueOrRuntimeParameter_Constant - Value isValueOrRuntimeParameter_Value `protobuf_oneof:"value"` + Value isValueOrRuntimeParameter_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ValueOrRuntimeParameter) Reset() { *x = ValueOrRuntimeParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ValueOrRuntimeParameter) String() string { @@ -1690,7 +1650,7 @@ func (*ValueOrRuntimeParameter) ProtoMessage() {} func (x *ValueOrRuntimeParameter) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1705,31 +1665,37 @@ func (*ValueOrRuntimeParameter) Descriptor() ([]byte, []int) { return file_pipeline_spec_proto_rawDescGZIP(), []int{18} } -func (m *ValueOrRuntimeParameter) GetValue() isValueOrRuntimeParameter_Value { - if m != nil { - return m.Value +func (x *ValueOrRuntimeParameter) GetValue() isValueOrRuntimeParameter_Value { + if x != nil { + return x.Value } return nil } // Deprecated: Marked as deprecated in pipeline_spec.proto. func (x *ValueOrRuntimeParameter) GetConstantValue() *Value { - if x, ok := x.GetValue().(*ValueOrRuntimeParameter_ConstantValue); ok { - return x.ConstantValue + if x != nil { + if x, ok := x.Value.(*ValueOrRuntimeParameter_ConstantValue); ok { + return x.ConstantValue + } } return nil } func (x *ValueOrRuntimeParameter) GetRuntimeParameter() string { - if x, ok := x.GetValue().(*ValueOrRuntimeParameter_RuntimeParameter); ok { - return x.RuntimeParameter + if x != nil { + if x, ok := x.Value.(*ValueOrRuntimeParameter_RuntimeParameter); ok { + return x.RuntimeParameter + } } return "" } func (x *ValueOrRuntimeParameter) GetConstant() *structpb.Value { - if x, ok := x.GetValue().(*ValueOrRuntimeParameter_Constant); ok { - return x.Constant + if x != nil { + if x, ok := x.Value.(*ValueOrRuntimeParameter_Constant); ok { + return x.Constant + } } return nil } @@ -1765,21 +1731,18 @@ func (*ValueOrRuntimeParameter_Constant) isValueOrRuntimeParameter_Value() {} // The definition of the deployment config of the pipeline. It contains the // the platform specific executor configs for KFP OSS. type PipelineDeploymentConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Map from executor label to executor spec. - Executors map[string]*PipelineDeploymentConfig_ExecutorSpec `protobuf:"bytes,1,rep,name=executors,proto3" json:"executors,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Executors map[string]*PipelineDeploymentConfig_ExecutorSpec `protobuf:"bytes,1,rep,name=executors,proto3" json:"executors,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig) Reset() { *x = PipelineDeploymentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig) String() string { @@ -1790,7 +1753,7 @@ func (*PipelineDeploymentConfig) ProtoMessage() {} func (x *PipelineDeploymentConfig) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1814,25 +1777,22 @@ func (x *PipelineDeploymentConfig) GetExecutors() map[string]*PipelineDeployment // Value is the value of the field. type Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Value: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Value: // // *Value_IntValue // *Value_DoubleValue // *Value_StringValue - Value isValue_Value `protobuf_oneof:"value"` + Value isValue_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Value) Reset() { *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Value) String() string { @@ -1843,7 +1803,7 @@ func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1858,30 +1818,36 @@ func (*Value) Descriptor() ([]byte, []int) { return file_pipeline_spec_proto_rawDescGZIP(), []int{20} } -func (m *Value) GetValue() isValue_Value { - if m != nil { - return m.Value +func (x *Value) GetValue() isValue_Value { + if x != nil { + return x.Value } return nil } func (x *Value) GetIntValue() int64 { - if x, ok := x.GetValue().(*Value_IntValue); ok { - return x.IntValue + if x != nil { + if x, ok := x.Value.(*Value_IntValue); ok { + return x.IntValue + } } return 0 } func (x *Value) GetDoubleValue() float64 { - if x, ok := x.GetValue().(*Value_DoubleValue); ok { - return x.DoubleValue + if x != nil { + if x, ok := x.Value.(*Value_DoubleValue); ok { + return x.DoubleValue + } } return 0 } func (x *Value) GetStringValue() string { - if x, ok := x.GetValue().(*Value_StringValue); ok { - return x.StringValue + if x != nil { + if x, ok := x.Value.(*Value_StringValue); ok { + return x.StringValue + } } return "" } @@ -1913,10 +1879,7 @@ func (*Value_StringValue) isValue_Value() {} // The definition of a runtime artifact. type RuntimeArtifact struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of an artifact. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The type of the artifact. @@ -1927,23 +1890,23 @@ type RuntimeArtifact struct { // Deprecated. Use [RuntimeArtifact.metadata][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - Properties map[string]*Value `protobuf:"bytes,4,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Properties map[string]*Value `protobuf:"bytes,4,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The custom properties of the artifact. // Deprecated. Use [RuntimeArtifact.metadata][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - CustomProperties map[string]*Value `protobuf:"bytes,5,rep,name=custom_properties,json=customProperties,proto3" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + CustomProperties map[string]*Value `protobuf:"bytes,5,rep,name=custom_properties,json=customProperties,proto3" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Properties of the Artifact. - Metadata *structpb.Struct `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata *structpb.Struct `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RuntimeArtifact) Reset() { *x = RuntimeArtifact{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeArtifact) String() string { @@ -1954,7 +1917,7 @@ func (*RuntimeArtifact) ProtoMessage() {} func (x *RuntimeArtifact) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2015,21 +1978,18 @@ func (x *RuntimeArtifact) GetMetadata() *structpb.Struct { // Message that represents a list of artifacts. type ArtifactList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of artifacts. - Artifacts []*RuntimeArtifact `protobuf:"bytes,1,rep,name=artifacts,proto3" json:"artifacts,omitempty"` + Artifacts []*RuntimeArtifact `protobuf:"bytes,1,rep,name=artifacts,proto3" json:"artifacts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArtifactList) Reset() { *x = ArtifactList{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArtifactList) String() string { @@ -2040,7 +2000,7 @@ func (*ArtifactList) ProtoMessage() {} func (x *ArtifactList) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2088,23 +2048,20 @@ func (x *ArtifactList) GetArtifacts() []*RuntimeArtifact { // output file and executor output metadata files are set by the container, the // output metadata file will have higher precedence to set output parameters. type ExecutorInput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The runtime input artifacts of the task invocation. Inputs *ExecutorInput_Inputs `protobuf:"bytes,1,opt,name=inputs,proto3" json:"inputs,omitempty"` // The runtime output artifacts of the task invocation. - Outputs *ExecutorInput_Outputs `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"` + Outputs *ExecutorInput_Outputs `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecutorInput) Reset() { *x = ExecutorInput{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutorInput) String() string { @@ -2115,7 +2072,7 @@ func (*ExecutorInput) ProtoMessage() {} func (x *ExecutorInput) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2147,28 +2104,25 @@ func (x *ExecutorInput) GetOutputs() *ExecutorInput_Outputs { // The schema of the output metadata of an execution. It will be used to parse // the output metadata file. type ExecutorOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The values for output parameters. // Deprecated. Use [ExecutorOutput.parameter_values][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - Parameters map[string]*Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The updated metadata for output artifact. - Artifacts map[string]*ArtifactList `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Artifacts map[string]*ArtifactList `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The values for output parameters. - ParameterValues map[string]*structpb.Value `protobuf:"bytes,3,rep,name=parameter_values,json=parameterValues,proto3" json:"parameter_values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ParameterValues map[string]*structpb.Value `protobuf:"bytes,3,rep,name=parameter_values,json=parameterValues,proto3" json:"parameter_values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecutorOutput) Reset() { *x = ExecutorOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutorOutput) String() string { @@ -2179,7 +2133,7 @@ func (*ExecutorOutput) ProtoMessage() {} func (x *ExecutorOutput) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2219,10 +2173,7 @@ func (x *ExecutorOutput) GetParameterValues() map[string]*structpb.Value { // The final status of a task. The structure will be passed to input parameter // of kind `task_final_status`. type PipelineTaskFinalStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The final state of the task. // The value is the string version of [PipelineStateEnum.PipelineTaskState][] State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` @@ -2241,15 +2192,15 @@ type PipelineTaskFinalStatus struct { PipelineJobResourceName string `protobuf:"bytes,5,opt,name=pipeline_job_resource_name,json=pipelineJobResourceName,proto3" json:"pipeline_job_resource_name,omitempty"` // The pipeline task that produces this status. PipelineTaskName string `protobuf:"bytes,6,opt,name=pipeline_task_name,json=pipelineTaskName,proto3" json:"pipeline_task_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskFinalStatus) Reset() { *x = PipelineTaskFinalStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskFinalStatus) String() string { @@ -2260,7 +2211,7 @@ func (*PipelineTaskFinalStatus) ProtoMessage() {} func (x *PipelineTaskFinalStatus) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2320,18 +2271,16 @@ func (x *PipelineTaskFinalStatus) GetPipelineTaskName() string { } type PipelineStateEnum struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineStateEnum) Reset() { *x = PipelineStateEnum{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineStateEnum) String() string { @@ -2342,7 +2291,7 @@ func (*PipelineStateEnum) ProtoMessage() {} func (x *PipelineStateEnum) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2359,21 +2308,18 @@ func (*PipelineStateEnum) Descriptor() ([]byte, []int) { // Spec for all platforms; second document in IR type PlatformSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Platform key to full platform config - Platforms map[string]*SinglePlatformSpec `protobuf:"bytes,1,rep,name=platforms,proto3" json:"platforms,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Platforms map[string]*SinglePlatformSpec `protobuf:"bytes,1,rep,name=platforms,proto3" json:"platforms,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PlatformSpec) Reset() { *x = PlatformSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlatformSpec) String() string { @@ -2384,7 +2330,7 @@ func (*PlatformSpec) ProtoMessage() {} func (x *PlatformSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2407,10 +2353,7 @@ func (x *PlatformSpec) GetPlatforms() map[string]*SinglePlatformSpec { } type SinglePlatformSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Mirrors PipelineSpec.deployment_spec structure DeploymentSpec *PlatformDeploymentConfig `protobuf:"bytes,1,opt,name=deployment_spec,json=deploymentSpec,proto3" json:"deployment_spec,omitempty"` // Name of the platform. For example, "google_cloud" @@ -2419,15 +2362,15 @@ type SinglePlatformSpec struct { // protos/libraries. Config *structpb.Struct `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` PipelineConfig *PipelineConfig `protobuf:"bytes,4,opt,name=pipelineConfig,proto3" json:"pipelineConfig,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SinglePlatformSpec) Reset() { *x = SinglePlatformSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SinglePlatformSpec) String() string { @@ -2438,7 +2381,7 @@ func (*SinglePlatformSpec) ProtoMessage() {} func (x *SinglePlatformSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2482,22 +2425,19 @@ func (x *SinglePlatformSpec) GetPipelineConfig() *PipelineConfig { } type PlatformDeploymentConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Map of executor label to executor-level config // Mirrors PipelineSpec.deployment_spec.executors structure - Executors map[string]*structpb.Struct `protobuf:"bytes,1,rep,name=executors,proto3" json:"executors,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Executors map[string]*structpb.Struct `protobuf:"bytes,1,rep,name=executors,proto3" json:"executors,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PlatformDeploymentConfig) Reset() { *x = PlatformDeploymentConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PlatformDeploymentConfig) String() string { @@ -2508,7 +2448,7 @@ func (*PlatformDeploymentConfig) ProtoMessage() {} func (x *PlatformDeploymentConfig) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2531,25 +2471,22 @@ func (x *PlatformDeploymentConfig) GetExecutors() map[string]*structpb.Struct { } type WorkspaceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Size of the workspace // Example: "250Gi" // See https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/ for valid quantity formats Size string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` // Kubernetes specific configuration for the workspace - Kubernetes *KubernetesWorkspaceConfig `protobuf:"bytes,2,opt,name=kubernetes,proto3,oneof" json:"kubernetes,omitempty"` + Kubernetes *KubernetesWorkspaceConfig `protobuf:"bytes,2,opt,name=kubernetes,proto3,oneof" json:"kubernetes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *WorkspaceConfig) Reset() { *x = WorkspaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WorkspaceConfig) String() string { @@ -2560,7 +2497,7 @@ func (*WorkspaceConfig) ProtoMessage() {} func (x *WorkspaceConfig) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2590,25 +2527,22 @@ func (x *WorkspaceConfig) GetKubernetes() *KubernetesWorkspaceConfig { } type KubernetesWorkspaceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Patch of a PersistentVolumeClaim (PVC) spec to override defaults set on the API server for the workspace PVC // Example: { // "storageClassName": "super-fast-storage", // "accessModes": ["ReadWriteMany"] // } - PvcSpecPatch *structpb.Struct `protobuf:"bytes,1,opt,name=pvc_spec_patch,json=pvcSpecPatch,proto3,oneof" json:"pvc_spec_patch,omitempty"` + PvcSpecPatch *structpb.Struct `protobuf:"bytes,1,opt,name=pvc_spec_patch,json=pvcSpecPatch,proto3,oneof" json:"pvc_spec_patch,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *KubernetesWorkspaceConfig) Reset() { *x = KubernetesWorkspaceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesWorkspaceConfig) String() string { @@ -2619,7 +2553,7 @@ func (*KubernetesWorkspaceConfig) ProtoMessage() {} func (x *KubernetesWorkspaceConfig) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2643,10 +2577,7 @@ func (x *KubernetesWorkspaceConfig) GetPvcSpecPatch() *structpb.Struct { // Spec for pipeline-level config options. See PipelineConfig DSL class. type PipelineConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Name of the semaphore key to control pipeline concurrency SemaphoreKey string `protobuf:"bytes,1,opt,name=semaphore_key,json=semaphoreKey,proto3" json:"semaphore_key,omitempty"` // Name of the mutex to ensure mutual exclusion @@ -2656,16 +2587,16 @@ type PipelineConfig struct { ResourceTtl int32 `protobuf:"varint,3,opt,name=resource_ttl,json=resourceTtl,proto3" json:"resource_ttl,omitempty"` // Configuration for a shared storage workspace that persists for the duration of the pipeline run. // The workspace can be configured with size and Kubernetes-specific settings to override default PVC configurations. - Workspace *WorkspaceConfig `protobuf:"bytes,4,opt,name=workspace,proto3,oneof" json:"workspace,omitempty"` + Workspace *WorkspaceConfig `protobuf:"bytes,4,opt,name=workspace,proto3,oneof" json:"workspace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineConfig) Reset() { *x = PipelineConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineConfig) String() string { @@ -2676,7 +2607,7 @@ func (*PipelineConfig) ProtoMessage() {} func (x *PipelineConfig) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2721,14 +2652,11 @@ func (x *PipelineConfig) GetWorkspace() *WorkspaceConfig { // The runtime config of a PipelineJob. type PipelineJob_RuntimeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated. Use [RuntimeConfig.parameter_values][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - Parameters map[string]*Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // A path in a Cloud Storage bucket which will be treated as the root // output directory of the pipeline. It is used by the system to // generate the paths of output artifacts. @@ -2737,16 +2665,16 @@ type PipelineJob_RuntimeConfig struct { // The runtime parameters of the PipelineJob. The parameters will be // passed into [PipelineJob.pipeline_spec][] to replace the placeholders // at runtime. - ParameterValues map[string]*structpb.Value `protobuf:"bytes,3,rep,name=parameter_values,json=parameterValues,proto3" json:"parameter_values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ParameterValues map[string]*structpb.Value `protobuf:"bytes,3,rep,name=parameter_values,json=parameterValues,proto3" json:"parameter_values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineJob_RuntimeConfig) Reset() { *x = PipelineJob_RuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineJob_RuntimeConfig) String() string { @@ -2757,7 +2685,7 @@ func (*PipelineJob_RuntimeConfig) ProtoMessage() {} func (x *PipelineJob_RuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2796,25 +2724,22 @@ func (x *PipelineJob_RuntimeConfig) GetParameterValues() map[string]*structpb.Va // The definition of the runtime parameter. type PipelineSpec_RuntimeParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required field. The type of the runtime parameter. Type PrimitiveType_PrimitiveTypeEnum `protobuf:"varint,1,opt,name=type,proto3,enum=ml_pipelines.PrimitiveType_PrimitiveTypeEnum" json:"type,omitempty"` // Optional field. Default value of the runtime parameter. If not set and // the runtime parameter value is not provided during runtime, an error will // be raised. - DefaultValue *Value `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + DefaultValue *Value `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineSpec_RuntimeParameter) Reset() { *x = PipelineSpec_RuntimeParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineSpec_RuntimeParameter) String() string { @@ -2825,7 +2750,7 @@ func (*PipelineSpec_RuntimeParameter) ProtoMessage() {} func (x *PipelineSpec_RuntimeParameter) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2856,24 +2781,21 @@ func (x *PipelineSpec_RuntimeParameter) GetDefaultValue() *Value { // Selects a defined output artifact from a sub task of the DAG. type DagOutputsSpec_ArtifactSelectorSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of the sub task which produces the output that matches with // the `output_artifact_key`. ProducerSubtask string `protobuf:"bytes,1,opt,name=producer_subtask,json=producerSubtask,proto3" json:"producer_subtask,omitempty"` // The key of [ComponentOutputsSpec.artifacts][] map of the producer task. OutputArtifactKey string `protobuf:"bytes,2,opt,name=output_artifact_key,json=outputArtifactKey,proto3" json:"output_artifact_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DagOutputsSpec_ArtifactSelectorSpec) Reset() { *x = DagOutputsSpec_ArtifactSelectorSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DagOutputsSpec_ArtifactSelectorSpec) String() string { @@ -2884,7 +2806,7 @@ func (*DagOutputsSpec_ArtifactSelectorSpec) ProtoMessage() {} func (x *DagOutputsSpec_ArtifactSelectorSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2916,22 +2838,19 @@ func (x *DagOutputsSpec_ArtifactSelectorSpec) GetOutputArtifactKey() string { // Selects a list of output artifacts that will be aggregated to the single // output artifact channel of the DAG. type DagOutputsSpec_DagOutputArtifactSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The selected artifacts will be aggregated as output as a single // output channel of the DAG. ArtifactSelectors []*DagOutputsSpec_ArtifactSelectorSpec `protobuf:"bytes,1,rep,name=artifact_selectors,json=artifactSelectors,proto3" json:"artifact_selectors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DagOutputsSpec_DagOutputArtifactSpec) Reset() { *x = DagOutputsSpec_DagOutputArtifactSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DagOutputsSpec_DagOutputArtifactSpec) String() string { @@ -2942,7 +2861,7 @@ func (*DagOutputsSpec_DagOutputArtifactSpec) ProtoMessage() {} func (x *DagOutputsSpec_DagOutputArtifactSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2966,24 +2885,21 @@ func (x *DagOutputsSpec_DagOutputArtifactSpec) GetArtifactSelectors() []*DagOutp // Selects a defined output parameter from a sub task of the DAG. type DagOutputsSpec_ParameterSelectorSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of the sub task which produces the output that matches with // the `output_parameter_key`. ProducerSubtask string `protobuf:"bytes,1,opt,name=producer_subtask,json=producerSubtask,proto3" json:"producer_subtask,omitempty"` // The key of [ComponentOutputsSpec.parameters][] map of the producer task. OutputParameterKey string `protobuf:"bytes,2,opt,name=output_parameter_key,json=outputParameterKey,proto3" json:"output_parameter_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DagOutputsSpec_ParameterSelectorSpec) Reset() { *x = DagOutputsSpec_ParameterSelectorSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DagOutputsSpec_ParameterSelectorSpec) String() string { @@ -2994,7 +2910,7 @@ func (*DagOutputsSpec_ParameterSelectorSpec) ProtoMessage() {} func (x *DagOutputsSpec_ParameterSelectorSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3025,20 +2941,17 @@ func (x *DagOutputsSpec_ParameterSelectorSpec) GetOutputParameterKey() string { // Aggregate output parameters from sub tasks into a list object. type DagOutputsSpec_ParameterSelectorsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` ParameterSelectors []*DagOutputsSpec_ParameterSelectorSpec `protobuf:"bytes,1,rep,name=parameter_selectors,json=parameterSelectors,proto3" json:"parameter_selectors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DagOutputsSpec_ParameterSelectorsSpec) Reset() { *x = DagOutputsSpec_ParameterSelectorsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DagOutputsSpec_ParameterSelectorsSpec) String() string { @@ -3049,7 +2962,7 @@ func (*DagOutputsSpec_ParameterSelectorsSpec) ProtoMessage() {} func (x *DagOutputsSpec_ParameterSelectorsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3073,20 +2986,17 @@ func (x *DagOutputsSpec_ParameterSelectorsSpec) GetParameterSelectors() []*DagOu // Aggregates output parameters from sub tasks into a map object. type DagOutputsSpec_MapParameterSelectorsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MappedParameters map[string]*DagOutputsSpec_ParameterSelectorSpec `protobuf:"bytes,2,rep,name=mapped_parameters,json=mappedParameters,proto3" json:"mapped_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + state protoimpl.MessageState `protogen:"open.v1"` + MappedParameters map[string]*DagOutputsSpec_ParameterSelectorSpec `protobuf:"bytes,2,rep,name=mapped_parameters,json=mappedParameters,proto3" json:"mapped_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DagOutputsSpec_MapParameterSelectorsSpec) Reset() { *x = DagOutputsSpec_MapParameterSelectorsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DagOutputsSpec_MapParameterSelectorsSpec) String() string { @@ -3097,7 +3007,7 @@ func (*DagOutputsSpec_MapParameterSelectorsSpec) ProtoMessage() {} func (x *DagOutputsSpec_MapParameterSelectorsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3127,24 +3037,21 @@ func (x *DagOutputsSpec_MapParameterSelectorsSpec) GetMappedParameters() map[str // 3. Expose a list of outputs from multiple tasks (e.g. iterator flow). // 4. Expose the aggregation of output parameters as a name-value map. type DagOutputsSpec_DagOutputParameterSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: // // *DagOutputsSpec_DagOutputParameterSpec_ValueFromParameter // *DagOutputsSpec_DagOutputParameterSpec_ValueFromOneof - Kind isDagOutputsSpec_DagOutputParameterSpec_Kind `protobuf_oneof:"kind"` + Kind isDagOutputsSpec_DagOutputParameterSpec_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DagOutputsSpec_DagOutputParameterSpec) Reset() { *x = DagOutputsSpec_DagOutputParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DagOutputsSpec_DagOutputParameterSpec) String() string { @@ -3155,7 +3062,7 @@ func (*DagOutputsSpec_DagOutputParameterSpec) ProtoMessage() {} func (x *DagOutputsSpec_DagOutputParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3170,23 +3077,27 @@ func (*DagOutputsSpec_DagOutputParameterSpec) Descriptor() ([]byte, []int) { return file_pipeline_spec_proto_rawDescGZIP(), []int{4, 6} } -func (m *DagOutputsSpec_DagOutputParameterSpec) GetKind() isDagOutputsSpec_DagOutputParameterSpec_Kind { - if m != nil { - return m.Kind +func (x *DagOutputsSpec_DagOutputParameterSpec) GetKind() isDagOutputsSpec_DagOutputParameterSpec_Kind { + if x != nil { + return x.Kind } return nil } func (x *DagOutputsSpec_DagOutputParameterSpec) GetValueFromParameter() *DagOutputsSpec_ParameterSelectorSpec { - if x, ok := x.GetKind().(*DagOutputsSpec_DagOutputParameterSpec_ValueFromParameter); ok { - return x.ValueFromParameter + if x != nil { + if x, ok := x.Kind.(*DagOutputsSpec_DagOutputParameterSpec_ValueFromParameter); ok { + return x.ValueFromParameter + } } return nil } func (x *DagOutputsSpec_DagOutputParameterSpec) GetValueFromOneof() *DagOutputsSpec_ParameterSelectorsSpec { - if x, ok := x.GetKind().(*DagOutputsSpec_DagOutputParameterSpec_ValueFromOneof); ok { - return x.ValueFromOneof + if x != nil { + if x, ok := x.Kind.(*DagOutputsSpec_DagOutputParameterSpec_ValueFromOneof); ok { + return x.ValueFromOneof + } } return nil } @@ -3216,11 +3127,8 @@ func (*DagOutputsSpec_DagOutputParameterSpec_ValueFromOneof) isDagOutputsSpec_Da // Definition of an artifact input. type ComponentInputsSpec_ArtifactSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ArtifactType *ArtifactTypeSchema `protobuf:"bytes,1,opt,name=artifact_type,json=artifactType,proto3" json:"artifact_type,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ArtifactType *ArtifactTypeSchema `protobuf:"bytes,1,opt,name=artifact_type,json=artifactType,proto3" json:"artifact_type,omitempty"` // Indicates whether input is a single artifact or list of artifacts IsArtifactList bool `protobuf:"varint,2,opt,name=is_artifact_list,json=isArtifactList,proto3" json:"is_artifact_list,omitempty"` // Whether this input artifact is optional or not. @@ -3233,16 +3141,16 @@ type ComponentInputsSpec_ArtifactSpec struct { IsOptional bool `protobuf:"varint,3,opt,name=is_optional,json=isOptional,proto3" json:"is_optional,omitempty"` // The description for this input artifact of the component. // Should not exceed 1024 characters. - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComponentInputsSpec_ArtifactSpec) Reset() { *x = ComponentInputsSpec_ArtifactSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentInputsSpec_ArtifactSpec) String() string { @@ -3253,7 +3161,7 @@ func (*ComponentInputsSpec_ArtifactSpec) ProtoMessage() {} func (x *ComponentInputsSpec_ArtifactSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3298,10 +3206,7 @@ func (x *ComponentInputsSpec_ArtifactSpec) GetDescription() string { // Definition of a parameter input. type ComponentInputsSpec_ParameterSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Specifies an input parameter's type. // Deprecated. Use [ParameterSpec.parameter_type][] instead. // @@ -3323,16 +3228,16 @@ type ComponentInputsSpec_ParameterSpec struct { IsOptional bool `protobuf:"varint,4,opt,name=is_optional,json=isOptional,proto3" json:"is_optional,omitempty"` // The description for this input parameter of the component. // Should not exceed 1024 characters. - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComponentInputsSpec_ParameterSpec) Reset() { *x = ComponentInputsSpec_ParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentInputsSpec_ParameterSpec) String() string { @@ -3343,7 +3248,7 @@ func (*ComponentInputsSpec_ParameterSpec) ProtoMessage() {} func (x *ComponentInputsSpec_ParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3396,35 +3301,32 @@ func (x *ComponentInputsSpec_ParameterSpec) GetDescription() string { // Definition of an artifact output. type ComponentOutputsSpec_ArtifactSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ArtifactType *ArtifactTypeSchema `protobuf:"bytes,1,opt,name=artifact_type,json=artifactType,proto3" json:"artifact_type,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ArtifactType *ArtifactTypeSchema `protobuf:"bytes,1,opt,name=artifact_type,json=artifactType,proto3" json:"artifact_type,omitempty"` // Deprecated. Use [ArtifactSpec.metadata][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - Properties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Properties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Deprecated. Use [ArtifactSpec.metadata][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - CustomProperties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,3,rep,name=custom_properties,json=customProperties,proto3" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + CustomProperties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,3,rep,name=custom_properties,json=customProperties,proto3" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Properties of the Artifact. Metadata *structpb.Struct `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` // Indicates whether output is a single artifact or list of artifacts IsArtifactList bool `protobuf:"varint,5,opt,name=is_artifact_list,json=isArtifactList,proto3" json:"is_artifact_list,omitempty"` // The description for this output artifact of the component. // Should not exceed 1024 characters. - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComponentOutputsSpec_ArtifactSpec) Reset() { *x = ComponentOutputsSpec_ArtifactSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentOutputsSpec_ArtifactSpec) String() string { @@ -3435,7 +3337,7 @@ func (*ComponentOutputsSpec_ArtifactSpec) ProtoMessage() {} func (x *ComponentOutputsSpec_ArtifactSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[53] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3496,10 +3398,7 @@ func (x *ComponentOutputsSpec_ArtifactSpec) GetDescription() string { // Definition of a parameter output. type ComponentOutputsSpec_ParameterSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Specifies an input parameter's type. // Deprecated. Use [ParameterSpec.parameter_type][] instead. // @@ -3509,16 +3408,16 @@ type ComponentOutputsSpec_ParameterSpec struct { ParameterType ParameterType_ParameterTypeEnum `protobuf:"varint,2,opt,name=parameter_type,json=parameterType,proto3,enum=ml_pipelines.ParameterType_ParameterTypeEnum" json:"parameter_type,omitempty"` // The description for this output parameter of the component. // Should not exceed 1024 characters. - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ComponentOutputsSpec_ParameterSpec) Reset() { *x = ComponentOutputsSpec_ParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ComponentOutputsSpec_ParameterSpec) String() string { @@ -3529,7 +3428,7 @@ func (*ComponentOutputsSpec_ParameterSpec) ProtoMessage() {} func (x *ComponentOutputsSpec_ParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[54] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3568,24 +3467,21 @@ func (x *ComponentOutputsSpec_ParameterSpec) GetDescription() string { // The specification of a task input artifact. type TaskInputsSpec_InputArtifactSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: // // *TaskInputsSpec_InputArtifactSpec_TaskOutputArtifact // *TaskInputsSpec_InputArtifactSpec_ComponentInputArtifact - Kind isTaskInputsSpec_InputArtifactSpec_Kind `protobuf_oneof:"kind"` + Kind isTaskInputsSpec_InputArtifactSpec_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskInputsSpec_InputArtifactSpec) Reset() { *x = TaskInputsSpec_InputArtifactSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskInputsSpec_InputArtifactSpec) String() string { @@ -3596,7 +3492,7 @@ func (*TaskInputsSpec_InputArtifactSpec) ProtoMessage() {} func (x *TaskInputsSpec_InputArtifactSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[59] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3611,23 +3507,27 @@ func (*TaskInputsSpec_InputArtifactSpec) Descriptor() ([]byte, []int) { return file_pipeline_spec_proto_rawDescGZIP(), []int{7, 0} } -func (m *TaskInputsSpec_InputArtifactSpec) GetKind() isTaskInputsSpec_InputArtifactSpec_Kind { - if m != nil { - return m.Kind +func (x *TaskInputsSpec_InputArtifactSpec) GetKind() isTaskInputsSpec_InputArtifactSpec_Kind { + if x != nil { + return x.Kind } return nil } func (x *TaskInputsSpec_InputArtifactSpec) GetTaskOutputArtifact() *TaskInputsSpec_InputArtifactSpec_TaskOutputArtifactSpec { - if x, ok := x.GetKind().(*TaskInputsSpec_InputArtifactSpec_TaskOutputArtifact); ok { - return x.TaskOutputArtifact + if x != nil { + if x, ok := x.Kind.(*TaskInputsSpec_InputArtifactSpec_TaskOutputArtifact); ok { + return x.TaskOutputArtifact + } } return nil } func (x *TaskInputsSpec_InputArtifactSpec) GetComponentInputArtifact() string { - if x, ok := x.GetKind().(*TaskInputsSpec_InputArtifactSpec_ComponentInputArtifact); ok { - return x.ComponentInputArtifact + if x != nil { + if x, ok := x.Kind.(*TaskInputsSpec_InputArtifactSpec_ComponentInputArtifact); ok { + return x.ComponentInputArtifact + } } return "" } @@ -3658,11 +3558,8 @@ func (*TaskInputsSpec_InputArtifactSpec_ComponentInputArtifact) isTaskInputsSpec // `output_parameter_key`), or it can be a runtime value, which can either be // determined at compile-time, or from a pipeline parameter. type TaskInputsSpec_InputParameterSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Kind: // // *TaskInputsSpec_InputParameterSpec_TaskOutputParameter // *TaskInputsSpec_InputParameterSpec_RuntimeValue @@ -3695,15 +3592,15 @@ type TaskInputsSpec_InputParameterSpec struct { // // If unset, the value will be passed directly to the current task. ParameterExpressionSelector string `protobuf:"bytes,4,opt,name=parameter_expression_selector,json=parameterExpressionSelector,proto3" json:"parameter_expression_selector,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskInputsSpec_InputParameterSpec) Reset() { *x = TaskInputsSpec_InputParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskInputsSpec_InputParameterSpec) String() string { @@ -3714,7 +3611,7 @@ func (*TaskInputsSpec_InputParameterSpec) ProtoMessage() {} func (x *TaskInputsSpec_InputParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[60] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3729,37 +3626,45 @@ func (*TaskInputsSpec_InputParameterSpec) Descriptor() ([]byte, []int) { return file_pipeline_spec_proto_rawDescGZIP(), []int{7, 1} } -func (m *TaskInputsSpec_InputParameterSpec) GetKind() isTaskInputsSpec_InputParameterSpec_Kind { - if m != nil { - return m.Kind +func (x *TaskInputsSpec_InputParameterSpec) GetKind() isTaskInputsSpec_InputParameterSpec_Kind { + if x != nil { + return x.Kind } return nil } func (x *TaskInputsSpec_InputParameterSpec) GetTaskOutputParameter() *TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec { - if x, ok := x.GetKind().(*TaskInputsSpec_InputParameterSpec_TaskOutputParameter); ok { - return x.TaskOutputParameter + if x != nil { + if x, ok := x.Kind.(*TaskInputsSpec_InputParameterSpec_TaskOutputParameter); ok { + return x.TaskOutputParameter + } } return nil } func (x *TaskInputsSpec_InputParameterSpec) GetRuntimeValue() *ValueOrRuntimeParameter { - if x, ok := x.GetKind().(*TaskInputsSpec_InputParameterSpec_RuntimeValue); ok { - return x.RuntimeValue + if x != nil { + if x, ok := x.Kind.(*TaskInputsSpec_InputParameterSpec_RuntimeValue); ok { + return x.RuntimeValue + } } return nil } func (x *TaskInputsSpec_InputParameterSpec) GetComponentInputParameter() string { - if x, ok := x.GetKind().(*TaskInputsSpec_InputParameterSpec_ComponentInputParameter); ok { - return x.ComponentInputParameter + if x != nil { + if x, ok := x.Kind.(*TaskInputsSpec_InputParameterSpec_ComponentInputParameter); ok { + return x.ComponentInputParameter + } } return "" } func (x *TaskInputsSpec_InputParameterSpec) GetTaskFinalStatus() *TaskInputsSpec_InputParameterSpec_TaskFinalStatus { - if x, ok := x.GetKind().(*TaskInputsSpec_InputParameterSpec_TaskFinalStatus_); ok { - return x.TaskFinalStatus + if x != nil { + if x, ok := x.Kind.(*TaskInputsSpec_InputParameterSpec_TaskFinalStatus_); ok { + return x.TaskFinalStatus + } } return nil } @@ -3807,24 +3712,21 @@ func (*TaskInputsSpec_InputParameterSpec_TaskFinalStatus_) isTaskInputsSpec_Inpu } type TaskInputsSpec_InputArtifactSpec_TaskOutputArtifactSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of the upstream task which produces the output that matches // with the `output_artifact_key`. ProducerTask string `protobuf:"bytes,1,opt,name=producer_task,json=producerTask,proto3" json:"producer_task,omitempty"` // The key of [TaskOutputsSpec.artifacts][] map of the producer task. OutputArtifactKey string `protobuf:"bytes,2,opt,name=output_artifact_key,json=outputArtifactKey,proto3" json:"output_artifact_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskInputsSpec_InputArtifactSpec_TaskOutputArtifactSpec) Reset() { *x = TaskInputsSpec_InputArtifactSpec_TaskOutputArtifactSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskInputsSpec_InputArtifactSpec_TaskOutputArtifactSpec) String() string { @@ -3835,7 +3737,7 @@ func (*TaskInputsSpec_InputArtifactSpec_TaskOutputArtifactSpec) ProtoMessage() { func (x *TaskInputsSpec_InputArtifactSpec_TaskOutputArtifactSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[63] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3866,24 +3768,21 @@ func (x *TaskInputsSpec_InputArtifactSpec_TaskOutputArtifactSpec) GetOutputArtif // Represents an upstream task's output parameter. type TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of the upstream task which produces the output parameter that // matches with the `output_parameter_key`. ProducerTask string `protobuf:"bytes,1,opt,name=producer_task,json=producerTask,proto3" json:"producer_task,omitempty"` // The key of [TaskOutputsSpec.parameters][] map of the producer task. OutputParameterKey string `protobuf:"bytes,2,opt,name=output_parameter_key,json=outputParameterKey,proto3" json:"output_parameter_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec) Reset() { *x = TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec) String() string { @@ -3894,7 +3793,7 @@ func (*TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec) ProtoMessage() func (x *TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[64] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3927,21 +3826,18 @@ func (x *TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec) GetOutputPar // the schema version is `2.0.0`. The resolved input parameter will be a // JSON payload in string type. type TaskInputsSpec_InputParameterSpec_TaskFinalStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of the upstream task where the final status is coming from. - ProducerTask string `protobuf:"bytes,1,opt,name=producer_task,json=producerTask,proto3" json:"producer_task,omitempty"` + ProducerTask string `protobuf:"bytes,1,opt,name=producer_task,json=producerTask,proto3" json:"producer_task,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskInputsSpec_InputParameterSpec_TaskFinalStatus) Reset() { *x = TaskInputsSpec_InputParameterSpec_TaskFinalStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskInputsSpec_InputParameterSpec_TaskFinalStatus) String() string { @@ -3952,7 +3848,7 @@ func (*TaskInputsSpec_InputParameterSpec_TaskFinalStatus) ProtoMessage() {} func (x *TaskInputsSpec_InputParameterSpec_TaskFinalStatus) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[65] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3976,27 +3872,24 @@ func (x *TaskInputsSpec_InputParameterSpec_TaskFinalStatus) GetProducerTask() st // The specification of a task output artifact. type TaskOutputsSpec_OutputArtifactSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The type of the artifact. ArtifactType *ArtifactTypeSchema `protobuf:"bytes,1,opt,name=artifact_type,json=artifactType,proto3" json:"artifact_type,omitempty"` // The properties of the artifact, which are determined either at // compile-time, or at pipeline submission time through runtime parameters - Properties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Properties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The custom properties of the artifact, which are determined either at // compile-time, or at pipeline submission time through runtime parameters - CustomProperties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,3,rep,name=custom_properties,json=customProperties,proto3" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + CustomProperties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,3,rep,name=custom_properties,json=customProperties,proto3" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskOutputsSpec_OutputArtifactSpec) Reset() { *x = TaskOutputsSpec_OutputArtifactSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskOutputsSpec_OutputArtifactSpec) String() string { @@ -4007,7 +3900,7 @@ func (*TaskOutputsSpec_OutputArtifactSpec) ProtoMessage() {} func (x *TaskOutputsSpec_OutputArtifactSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[66] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4045,21 +3938,18 @@ func (x *TaskOutputsSpec_OutputArtifactSpec) GetCustomProperties() map[string]*V // Specification for output parameters produced by the task. type TaskOutputsSpec_OutputParameterSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required field. The type of the output parameter. - Type PrimitiveType_PrimitiveTypeEnum `protobuf:"varint,1,opt,name=type,proto3,enum=ml_pipelines.PrimitiveType_PrimitiveTypeEnum" json:"type,omitempty"` + Type PrimitiveType_PrimitiveTypeEnum `protobuf:"varint,1,opt,name=type,proto3,enum=ml_pipelines.PrimitiveType_PrimitiveTypeEnum" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TaskOutputsSpec_OutputParameterSpec) Reset() { *x = TaskOutputsSpec_OutputParameterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TaskOutputsSpec_OutputParameterSpec) String() string { @@ -4070,7 +3960,7 @@ func (*TaskOutputsSpec_OutputParameterSpec) ProtoMessage() {} func (x *TaskOutputsSpec_OutputParameterSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[67] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4093,24 +3983,21 @@ func (x *TaskOutputsSpec_OutputParameterSpec) GetType() PrimitiveType_PrimitiveT } type PipelineTaskSpec_CachingOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Whether or not to enable cache for this task. Defaults to false. EnableCache bool `protobuf:"varint,1,opt,name=enable_cache,json=enableCache,proto3" json:"enable_cache,omitempty"` // Customized cache key for this task. If set, the cache_key will be used // as the key for the task's cache. - CacheKey string `protobuf:"bytes,2,opt,name=cache_key,json=cacheKey,proto3" json:"cache_key,omitempty"` + CacheKey string `protobuf:"bytes,2,opt,name=cache_key,json=cacheKey,proto3" json:"cache_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskSpec_CachingOptions) Reset() { *x = PipelineTaskSpec_CachingOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskSpec_CachingOptions) String() string { @@ -4121,7 +4008,7 @@ func (*PipelineTaskSpec_CachingOptions) ProtoMessage() {} func (x *PipelineTaskSpec_CachingOptions) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[72] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4153,10 +4040,7 @@ func (x *PipelineTaskSpec_CachingOptions) GetCacheKey() string { // Trigger policy defines how the task gets triggered. If a task is not // triggered, it will run into SKIPPED state. type PipelineTaskSpec_TriggerPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // An expression which will be evaluated into a boolean value. True to // trigger the task to run. The expression follows the language of // [CEL Spec][https://github.com/google/cel-spec]. It can access the data @@ -4170,16 +4054,16 @@ type PipelineTaskSpec_TriggerPolicy struct { // the `strategy` is meet. // Unset or set to default value of TRIGGER_STRATEGY_UNDEFINED behaves the // same as ALL_UPSTREAM_TASKS_SUCCEEDED. - Strategy PipelineTaskSpec_TriggerPolicy_TriggerStrategy `protobuf:"varint,2,opt,name=strategy,proto3,enum=ml_pipelines.PipelineTaskSpec_TriggerPolicy_TriggerStrategy" json:"strategy,omitempty"` + Strategy PipelineTaskSpec_TriggerPolicy_TriggerStrategy `protobuf:"varint,2,opt,name=strategy,proto3,enum=ml_pipelines.PipelineTaskSpec_TriggerPolicy_TriggerStrategy" json:"strategy,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskSpec_TriggerPolicy) Reset() { *x = PipelineTaskSpec_TriggerPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskSpec_TriggerPolicy) String() string { @@ -4190,7 +4074,7 @@ func (*PipelineTaskSpec_TriggerPolicy) ProtoMessage() {} func (x *PipelineTaskSpec_TriggerPolicy) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[73] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4221,10 +4105,7 @@ func (x *PipelineTaskSpec_TriggerPolicy) GetStrategy() PipelineTaskSpec_TriggerP // User-configured task-level retry. type PipelineTaskSpec_RetryPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Number of retries before considering a task as failed. Set to 0 or // unspecified to disallow retry." MaxRetryCount int32 `protobuf:"varint,1,opt,name=max_retry_count,json=maxRetryCount,proto3" json:"max_retry_count,omitempty"` @@ -4237,15 +4118,15 @@ type PipelineTaskSpec_RetryPolicy struct { // the backoff strategy. Max allowed is 1 hour - higher value will be capped // to this limit. If unspecified, will set to 1 hour. BackoffMaxDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=backoff_max_duration,json=backoffMaxDuration,proto3" json:"backoff_max_duration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskSpec_RetryPolicy) Reset() { *x = PipelineTaskSpec_RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskSpec_RetryPolicy) String() string { @@ -4256,7 +4137,7 @@ func (*PipelineTaskSpec_RetryPolicy) ProtoMessage() {} func (x *PipelineTaskSpec_RetryPolicy) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[74] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4301,23 +4182,20 @@ func (x *PipelineTaskSpec_RetryPolicy) GetBackoffMaxDuration() *durationpb.Durat // Iterator related settings. type PipelineTaskSpec_IteratorPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The limit for the number of concurrent sub-tasks spawned by an iterator // task. The value should be a non-negative integer. A value of 0 represents // unconstrained parallelism. ParallelismLimit int32 `protobuf:"varint,1,opt,name=parallelism_limit,json=parallelismLimit,proto3" json:"parallelism_limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskSpec_IteratorPolicy) Reset() { *x = PipelineTaskSpec_IteratorPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskSpec_IteratorPolicy) String() string { @@ -4328,7 +4206,7 @@ func (*PipelineTaskSpec_IteratorPolicy) ProtoMessage() {} func (x *PipelineTaskSpec_IteratorPolicy) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[75] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4355,21 +4233,18 @@ func (x *PipelineTaskSpec_IteratorPolicy) GetParallelismLimit() int32 { // the collection and pass the item as a new input artifact channel as // specified by [item_input][]. type ArtifactIteratorSpec_ItemsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of the input artifact. InputArtifact string `protobuf:"bytes,1,opt,name=input_artifact,json=inputArtifact,proto3" json:"input_artifact,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArtifactIteratorSpec_ItemsSpec) Reset() { *x = ArtifactIteratorSpec_ItemsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArtifactIteratorSpec_ItemsSpec) String() string { @@ -4380,7 +4255,7 @@ func (*ArtifactIteratorSpec_ItemsSpec) ProtoMessage() {} func (x *ArtifactIteratorSpec_ItemsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[76] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4404,28 +4279,25 @@ func (x *ArtifactIteratorSpec_ItemsSpec) GetInputArtifact() string { // Specifies the spec to describe the parameter items to iterate. type ParameterIteratorSpec_ItemsSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Specifies where to get the collection of items to iterate. The iterator // will create a sub-task for each item of the collection and pass the item // as a new input parameter as specified by [item_input][]. // - // Types that are assignable to Kind: + // Types that are valid to be assigned to Kind: // // *ParameterIteratorSpec_ItemsSpec_Raw // *ParameterIteratorSpec_ItemsSpec_InputParameter - Kind isParameterIteratorSpec_ItemsSpec_Kind `protobuf_oneof:"kind"` + Kind isParameterIteratorSpec_ItemsSpec_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ParameterIteratorSpec_ItemsSpec) Reset() { *x = ParameterIteratorSpec_ItemsSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParameterIteratorSpec_ItemsSpec) String() string { @@ -4436,7 +4308,7 @@ func (*ParameterIteratorSpec_ItemsSpec) ProtoMessage() {} func (x *ParameterIteratorSpec_ItemsSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[77] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4451,23 +4323,27 @@ func (*ParameterIteratorSpec_ItemsSpec) Descriptor() ([]byte, []int) { return file_pipeline_spec_proto_rawDescGZIP(), []int{13, 0} } -func (m *ParameterIteratorSpec_ItemsSpec) GetKind() isParameterIteratorSpec_ItemsSpec_Kind { - if m != nil { - return m.Kind +func (x *ParameterIteratorSpec_ItemsSpec) GetKind() isParameterIteratorSpec_ItemsSpec_Kind { + if x != nil { + return x.Kind } return nil } func (x *ParameterIteratorSpec_ItemsSpec) GetRaw() string { - if x, ok := x.GetKind().(*ParameterIteratorSpec_ItemsSpec_Raw); ok { - return x.Raw + if x != nil { + if x, ok := x.Kind.(*ParameterIteratorSpec_ItemsSpec_Raw); ok { + return x.Raw + } } return "" } func (x *ParameterIteratorSpec_ItemsSpec) GetInputParameter() string { - if x, ok := x.GetKind().(*ParameterIteratorSpec_ItemsSpec_InputParameter); ok { - return x.InputParameter + if x != nil { + if x, ok := x.Kind.(*ParameterIteratorSpec_ItemsSpec_InputParameter); ok { + return x.InputParameter + } } return "" } @@ -4497,10 +4373,7 @@ func (*ParameterIteratorSpec_ItemsSpec_InputParameter) isParameterIteratorSpec_I // defined in [ExecutorInput](). The output of the container follows the // contract of [ExecutorOutput](). type PipelineDeploymentConfig_PipelineContainerSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The image uri of the container. Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"` // The main entrypoint commands of the container to run. If not provided, @@ -4512,16 +4385,16 @@ type PipelineDeploymentConfig_PipelineContainerSpec struct { Lifecycle *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle `protobuf:"bytes,4,opt,name=lifecycle,proto3" json:"lifecycle,omitempty"` Resources *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec `protobuf:"bytes,5,opt,name=resources,proto3" json:"resources,omitempty"` // Environment variables to be passed to the container. - Env []*PipelineDeploymentConfig_PipelineContainerSpec_EnvVar `protobuf:"bytes,6,rep,name=env,proto3" json:"env,omitempty"` + Env []*PipelineDeploymentConfig_PipelineContainerSpec_EnvVar `protobuf:"bytes,6,rep,name=env,proto3" json:"env,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_PipelineContainerSpec) Reset() { *x = PipelineDeploymentConfig_PipelineContainerSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_PipelineContainerSpec) String() string { @@ -4532,7 +4405,7 @@ func (*PipelineDeploymentConfig_PipelineContainerSpec) ProtoMessage() {} func (x *PipelineDeploymentConfig_PipelineContainerSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[78] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4591,10 +4464,7 @@ func (x *PipelineDeploymentConfig_PipelineContainerSpec) GetEnv() []*PipelineDep // The specification to import or reimport a new artifact to the pipeline. type PipelineDeploymentConfig_ImporterSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The URI of the artifact. ArtifactUri *ValueOrRuntimeParameter `protobuf:"bytes,1,opt,name=artifact_uri,json=artifactUri,proto3" json:"artifact_uri,omitempty"` // The type of the artifact. @@ -4603,25 +4473,25 @@ type PipelineDeploymentConfig_ImporterSpec struct { // Deprecated. Use [ImporterSpec.metadata][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - Properties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Properties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The custom properties of the artifact. // Deprecated. Use [ImporterSpec.metadata][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - CustomProperties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,4,rep,name=custom_properties,json=customProperties,proto3" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + CustomProperties map[string]*ValueOrRuntimeParameter `protobuf:"bytes,4,rep,name=custom_properties,json=customProperties,proto3" json:"custom_properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Properties of the Artifact. Metadata *structpb.Struct `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` // Whether or not import an artifact regardless it has been imported before. - Reimport bool `protobuf:"varint,5,opt,name=reimport,proto3" json:"reimport,omitempty"` + Reimport bool `protobuf:"varint,5,opt,name=reimport,proto3" json:"reimport,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_ImporterSpec) Reset() { *x = PipelineDeploymentConfig_ImporterSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_ImporterSpec) String() string { @@ -4632,7 +4502,7 @@ func (*PipelineDeploymentConfig_ImporterSpec) ProtoMessage() {} func (x *PipelineDeploymentConfig_ImporterSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[79] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4695,24 +4565,21 @@ func (x *PipelineDeploymentConfig_ImporterSpec) GetReimport() bool { // to the pipeline as output artifacts of the resolver task. The downstream // tasks can consume them as their input artifacts. type PipelineDeploymentConfig_ResolverSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of resolver output definitions. The // key of the map must be exactly the same as // the keys in the [PipelineTaskOutputsSpec.artifacts][] map. // At least one output must be defined. - OutputArtifactQueries map[string]*PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec `protobuf:"bytes,1,rep,name=output_artifact_queries,json=outputArtifactQueries,proto3" json:"output_artifact_queries,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + OutputArtifactQueries map[string]*PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec `protobuf:"bytes,1,rep,name=output_artifact_queries,json=outputArtifactQueries,proto3" json:"output_artifact_queries,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_ResolverSpec) Reset() { *x = PipelineDeploymentConfig_ResolverSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_ResolverSpec) String() string { @@ -4723,7 +4590,7 @@ func (*PipelineDeploymentConfig_ResolverSpec) ProtoMessage() {} func (x *PipelineDeploymentConfig_ResolverSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[80] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4747,10 +4614,7 @@ func (x *PipelineDeploymentConfig_ResolverSpec) GetOutputArtifactQueries() map[s // Deprecated: Marked as deprecated in pipeline_spec.proto. type PipelineDeploymentConfig_AIPlatformCustomJobSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // API Specification for invoking a Google Cloud AI Platform CustomJob. // The fields must match the field names and structures of CustomJob // defined in @@ -4759,16 +4623,16 @@ type PipelineDeploymentConfig_AIPlatformCustomJobSpec struct { // string based placeholder contract defined in [ExecutorInput](). The // placeholders will be replaced with the actual value during the runtime // before the job is launched. - CustomJob *structpb.Struct `protobuf:"bytes,1,opt,name=custom_job,json=customJob,proto3" json:"custom_job,omitempty"` + CustomJob *structpb.Struct `protobuf:"bytes,1,opt,name=custom_job,json=customJob,proto3" json:"custom_job,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_AIPlatformCustomJobSpec) Reset() { *x = PipelineDeploymentConfig_AIPlatformCustomJobSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_AIPlatformCustomJobSpec) String() string { @@ -4779,7 +4643,7 @@ func (*PipelineDeploymentConfig_AIPlatformCustomJobSpec) ProtoMessage() {} func (x *PipelineDeploymentConfig_AIPlatformCustomJobSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[81] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4803,26 +4667,23 @@ func (x *PipelineDeploymentConfig_AIPlatformCustomJobSpec) GetCustomJob() *struc // The specification of the executor. type PipelineDeploymentConfig_ExecutorSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Spec: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Spec: // // *PipelineDeploymentConfig_ExecutorSpec_Container // *PipelineDeploymentConfig_ExecutorSpec_Importer // *PipelineDeploymentConfig_ExecutorSpec_Resolver // *PipelineDeploymentConfig_ExecutorSpec_CustomJob - Spec isPipelineDeploymentConfig_ExecutorSpec_Spec `protobuf_oneof:"spec"` + Spec isPipelineDeploymentConfig_ExecutorSpec_Spec `protobuf_oneof:"spec"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_ExecutorSpec) Reset() { *x = PipelineDeploymentConfig_ExecutorSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_ExecutorSpec) String() string { @@ -4833,7 +4694,7 @@ func (*PipelineDeploymentConfig_ExecutorSpec) ProtoMessage() {} func (x *PipelineDeploymentConfig_ExecutorSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[82] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4848,38 +4709,46 @@ func (*PipelineDeploymentConfig_ExecutorSpec) Descriptor() ([]byte, []int) { return file_pipeline_spec_proto_rawDescGZIP(), []int{19, 4} } -func (m *PipelineDeploymentConfig_ExecutorSpec) GetSpec() isPipelineDeploymentConfig_ExecutorSpec_Spec { - if m != nil { - return m.Spec +func (x *PipelineDeploymentConfig_ExecutorSpec) GetSpec() isPipelineDeploymentConfig_ExecutorSpec_Spec { + if x != nil { + return x.Spec } return nil } func (x *PipelineDeploymentConfig_ExecutorSpec) GetContainer() *PipelineDeploymentConfig_PipelineContainerSpec { - if x, ok := x.GetSpec().(*PipelineDeploymentConfig_ExecutorSpec_Container); ok { - return x.Container + if x != nil { + if x, ok := x.Spec.(*PipelineDeploymentConfig_ExecutorSpec_Container); ok { + return x.Container + } } return nil } func (x *PipelineDeploymentConfig_ExecutorSpec) GetImporter() *PipelineDeploymentConfig_ImporterSpec { - if x, ok := x.GetSpec().(*PipelineDeploymentConfig_ExecutorSpec_Importer); ok { - return x.Importer + if x != nil { + if x, ok := x.Spec.(*PipelineDeploymentConfig_ExecutorSpec_Importer); ok { + return x.Importer + } } return nil } func (x *PipelineDeploymentConfig_ExecutorSpec) GetResolver() *PipelineDeploymentConfig_ResolverSpec { - if x, ok := x.GetSpec().(*PipelineDeploymentConfig_ExecutorSpec_Resolver); ok { - return x.Resolver + if x != nil { + if x, ok := x.Spec.(*PipelineDeploymentConfig_ExecutorSpec_Resolver); ok { + return x.Resolver + } } return nil } // Deprecated: Marked as deprecated in pipeline_spec.proto. func (x *PipelineDeploymentConfig_ExecutorSpec) GetCustomJob() *PipelineDeploymentConfig_AIPlatformCustomJobSpec { - if x, ok := x.GetSpec().(*PipelineDeploymentConfig_ExecutorSpec_CustomJob); ok { - return x.CustomJob + if x != nil { + if x, ok := x.Spec.(*PipelineDeploymentConfig_ExecutorSpec_CustomJob); ok { + return x.CustomJob + } } return nil } @@ -4928,24 +4797,21 @@ func (*PipelineDeploymentConfig_ExecutorSpec_CustomJob) isPipelineDeploymentConf // (-- TODO(b/165323565): add more documentation on caching and lifecycle // hooks. --) type PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // This hook is invoked before caching check. It can change the properties // of the execution and output artifacts before they are used to compute // the cache key. The updated metadata will be passed into the main // container entrypoint. PreCacheCheck *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle_Exec `protobuf:"bytes,1,opt,name=pre_cache_check,json=preCacheCheck,proto3" json:"pre_cache_check,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle) Reset() { *x = PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle) String() string { @@ -4956,7 +4822,7 @@ func (*PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle) ProtoMessage() func (x *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[84] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4982,10 +4848,7 @@ func (x *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle) GetPreCacheCh // This can include specification of vCPU, memory requirements, as well as // accelerator types and counts. type PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The limit of the number of vCPU cores. This container execution needs // at most cpu_limit vCPU to run. // Deprecated. Use [ResourceSpec.resource_cpu_limit] instead. @@ -5027,15 +4890,15 @@ type PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec struct { // values and placeholders. ResourceMemoryRequest string `protobuf:"bytes,10,opt,name=resource_memory_request,json=resourceMemoryRequest,proto3" json:"resource_memory_request,omitempty"` Accelerator *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_AcceleratorConfig `protobuf:"bytes,3,opt,name=accelerator,proto3" json:"accelerator,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec) Reset() { *x = PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec) String() string { @@ -5046,7 +4909,7 @@ func (*PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec) ProtoMessage func (x *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[85] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5131,10 +4994,7 @@ func (x *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec) GetAcceler // Environment variables to be passed to the container. // Represents an environment variable present in a container. type PipelineDeploymentConfig_PipelineContainerSpec_EnvVar struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Name of the environment variable. Must be a valid C identifier. It can // be composed of characters such as uppercase, lowercase characters, // underscore, digits, but the leading character should be either a @@ -5147,16 +5007,16 @@ type PipelineDeploymentConfig_PipelineContainerSpec_EnvVar struct { // will be unchanged. The $(VAR_NAME) syntax can be escaped with a double // $$, ie: $$(VAR_NAME). Escaped references will never be expanded, // regardless of whether the variable exists or not. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_PipelineContainerSpec_EnvVar) Reset() { *x = PipelineDeploymentConfig_PipelineContainerSpec_EnvVar{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_PipelineContainerSpec_EnvVar) String() string { @@ -5167,7 +5027,7 @@ func (*PipelineDeploymentConfig_PipelineContainerSpec_EnvVar) ProtoMessage() {} func (x *PipelineDeploymentConfig_PipelineContainerSpec_EnvVar) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[86] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5198,23 +5058,20 @@ func (x *PipelineDeploymentConfig_PipelineContainerSpec_EnvVar) GetValue() strin // The command and args to execute a program. type PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle_Exec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The command of the exec program. Command []string `protobuf:"bytes,2,rep,name=command,proto3" json:"command,omitempty"` // The args of the exec program. - Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` + Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle_Exec) Reset() { *x = PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle_Exec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle_Exec) String() string { @@ -5225,7 +5082,7 @@ func (*PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle_Exec) ProtoMessa func (x *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle_Exec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[87] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5256,10 +5113,7 @@ func (x *PipelineDeploymentConfig_PipelineContainerSpec_Lifecycle_Exec) GetArgs( // The specification on the accelerators being attached to this container. type PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_AcceleratorConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The type of accelerators. // Deprecated. Use [ResourceSpec.AcceleratorConfig.resource_type] // instead. @@ -5278,15 +5132,15 @@ type PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_AcceleratorConf // The number of accelerators. Handles static values and // placeholders. ResourceCount string `protobuf:"bytes,4,opt,name=resource_count,json=resourceCount,proto3" json:"resource_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_AcceleratorConfig) Reset() { *x = PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_AcceleratorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_AcceleratorConfig) String() string { @@ -5298,7 +5152,7 @@ func (*PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_AcceleratorCo func (x *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_AcceleratorConfig) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[88] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5345,10 +5199,7 @@ func (x *PipelineDeploymentConfig_PipelineContainerSpec_ResourceSpec_Accelerator // The query to fetch artifacts. type PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The filter of the artifact query. The supported syntax are: // - `in_context("")` // - `artifact_type=""` @@ -5361,16 +5212,16 @@ type PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec struct { Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` // The maximum number of the artifacts to be returned from the // query. If not defined, the default limit is `1`. - Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec) Reset() { *x = PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec) String() string { @@ -5381,7 +5232,7 @@ func (*PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec) ProtoMessage() { func (x *PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[91] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5412,28 +5263,25 @@ func (x *PipelineDeploymentConfig_ResolverSpec_ArtifactQuerySpec) GetLimit() int // The runtime inputs data of the execution. type ExecutorInput_Inputs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Input parameters of the execution. // Deprecated. Use [ExecutorInput.Inputs.parameter_values][] instead. // // Deprecated: Marked as deprecated in pipeline_spec.proto. - Parameters map[string]*Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Input artifacts of the execution. - Artifacts map[string]*ArtifactList `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Artifacts map[string]*ArtifactList `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Input parameters of the execution. - ParameterValues map[string]*structpb.Value `protobuf:"bytes,3,rep,name=parameter_values,json=parameterValues,proto3" json:"parameter_values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ParameterValues map[string]*structpb.Value `protobuf:"bytes,3,rep,name=parameter_values,json=parameterValues,proto3" json:"parameter_values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecutorInput_Inputs) Reset() { *x = ExecutorInput_Inputs{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[95] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutorInput_Inputs) String() string { @@ -5444,7 +5292,7 @@ func (*ExecutorInput_Inputs) ProtoMessage() {} func (x *ExecutorInput_Inputs) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[95] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5483,22 +5331,19 @@ func (x *ExecutorInput_Inputs) GetParameterValues() map[string]*structpb.Value { // The runtime output parameter. type ExecutorInput_OutputParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The file path which is used by the executor to pass the parameter value // to the system. - OutputFile string `protobuf:"bytes,1,opt,name=output_file,json=outputFile,proto3" json:"output_file,omitempty"` + OutputFile string `protobuf:"bytes,1,opt,name=output_file,json=outputFile,proto3" json:"output_file,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecutorInput_OutputParameter) Reset() { *x = ExecutorInput_OutputParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[96] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutorInput_OutputParameter) String() string { @@ -5509,7 +5354,7 @@ func (*ExecutorInput_OutputParameter) ProtoMessage() {} func (x *ExecutorInput_OutputParameter) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[96] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5533,29 +5378,26 @@ func (x *ExecutorInput_OutputParameter) GetOutputFile() string { // The runtime outputs data of the execution. type ExecutorInput_Outputs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The runtime output parameters. - Parameters map[string]*ExecutorInput_OutputParameter `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*ExecutorInput_OutputParameter `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The runtime output artifacts. - Artifacts map[string]*ArtifactList `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Artifacts map[string]*ArtifactList `protobuf:"bytes,2,rep,name=artifacts,proto3" json:"artifacts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The file path of the full output metadata JSON. The schema of the output // file is [ExecutorOutput][]. // // When the full output metadata file is set by the container, the output // parameter files will be ignored. - OutputFile string `protobuf:"bytes,3,opt,name=output_file,json=outputFile,proto3" json:"output_file,omitempty"` + OutputFile string `protobuf:"bytes,3,opt,name=output_file,json=outputFile,proto3" json:"output_file,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecutorInput_Outputs) Reset() { *x = ExecutorInput_Outputs{} - if protoimpl.UnsafeEnabled { - mi := &file_pipeline_spec_proto_msgTypes[97] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pipeline_spec_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecutorInput_Outputs) String() string { @@ -5566,7 +5408,7 @@ func (*ExecutorInput_Outputs) ProtoMessage() {} func (x *ExecutorInput_Outputs) ProtoReflect() protoreflect.Message { mi := &file_pipeline_spec_proto_msgTypes[97] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5604,1149 +5446,509 @@ func (x *ExecutorInput_Outputs) GetOutputFile() string { var File_pipeline_spec_proto protoreflect.FileDescriptor -var file_pipeline_spec_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x06, 0x0a, 0x0b, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x3d, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4a, 0x6f, 0x62, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x4e, - 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4a, 0x6f, - 0x62, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x39, - 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xb7, 0x03, 0x0a, 0x0d, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x0a, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x37, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4a, 0x6f, 0x62, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x67, 0x63, 0x73, 0x5f, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x67, 0x63, 0x73, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x67, 0x0a, 0x10, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4a, 0x6f, 0x62, 0x2e, - 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x1a, 0x52, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5a, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, - 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, - 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x22, 0xf8, 0x04, - 0x0a, 0x0c, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3f, - 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x40, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, - 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x1a, 0x8f, 0x01, 0x0a, 0x10, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, - 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, - 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x69, - 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x5a, 0x0a, 0x0f, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xee, 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x4e, 0x0a, 0x11, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x51, 0x0a, 0x12, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, - 0x03, 0x64, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x53, 0x70, 0x65, - 0x63, 0x48, 0x00, 0x52, 0x03, 0x64, 0x61, 0x67, 0x12, 0x27, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x12, 0x54, 0x0a, 0x15, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x13, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x53, 0x70, 0x65, 0x63, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x69, 0x6d, 0x70, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd3, 0x01, 0x0a, 0x07, 0x44, 0x61, - 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x36, 0x0a, - 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, - 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x07, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x73, 0x1a, 0x58, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xf6, 0x0a, 0x0a, 0x0e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, - 0x65, 0x63, 0x12, 0x49, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, - 0x70, 0x65, 0x63, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x4c, 0x0a, - 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x71, 0x0a, 0x14, 0x41, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, - 0x70, 0x65, 0x63, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x5f, - 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x53, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x2e, - 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4b, 0x65, 0x79, 0x1a, 0x79, - 0x0a, 0x15, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x60, 0x0a, 0x12, 0x61, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, - 0x63, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x11, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x1a, 0x70, 0x0a, 0x0e, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x74, 0x0a, 0x15, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, - 0x5f, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x53, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x12, - 0x30, 0x0a, 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4b, 0x65, - 0x79, 0x1a, 0x7d, 0x0a, 0x16, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x63, 0x0a, 0x13, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x12, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x1a, 0x8f, 0x02, 0x0a, 0x19, 0x4d, 0x61, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x79, - 0x0a, 0x11, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x61, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x70, 0x65, - 0x63, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x77, 0x0a, 0x15, 0x4d, 0x61, 0x70, - 0x70, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, - 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0xef, 0x01, 0x0a, 0x16, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x66, 0x0a, - 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x48, - 0x00, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x66, - 0x72, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, - 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x46, 0x72, 0x6f, - 0x6d, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x4a, 0x04, - 0x08, 0x03, 0x10, 0x04, 0x1a, 0x72, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x61, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8a, 0x07, 0x0a, 0x13, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x4e, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, - 0x12, 0x51, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x1a, 0xc2, 0x01, 0x0a, 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x45, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0c, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, - 0x73, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xac, 0x02, 0x0a, 0x0d, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x45, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x54, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6c, 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x44, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6e, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf4, 0x09, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x4f, - 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, - 0x52, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x1a, 0x85, 0x05, 0x0a, 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x45, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0c, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x63, 0x0a, 0x0a, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, - 0x70, 0x65, 0x63, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x76, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, - 0x10, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x64, 0x0a, 0x0f, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x4f, 0x72, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x6a, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x72, - 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xce, 0x01, 0x0a, 0x0d, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x45, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x54, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0d, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x0e, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, - 0x70, 0x65, 0x63, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6f, 0x0a, 0x0f, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, - 0x70, 0x65, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, - 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x0a, 0x0a, - 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x4c, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, - 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x49, 0x0a, - 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x1a, 0xc7, 0x02, 0x0a, 0x11, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x79, - 0x0a, 0x14, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x61, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, - 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x12, 0x74, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x3a, 0x0a, 0x18, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x61, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x16, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x1a, 0x6d, 0x0a, 0x16, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, - 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x4b, 0x65, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x4a, 0x04, 0x08, 0x05, - 0x10, 0x06, 0x1a, 0x84, 0x05, 0x0a, 0x12, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x7d, 0x0a, 0x15, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, - 0x63, 0x48, 0x00, 0x52, 0x13, 0x74, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x0d, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x72, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x17, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x12, 0x6d, 0x0a, 0x11, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x48, 0x00, 0x52, 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x42, 0x0a, 0x1d, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x1a, 0x70, 0x0a, 0x17, 0x54, 0x61, 0x73, 0x6b, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, - 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x5f, 0x74, - 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x1a, 0x36, 0x0a, 0x0f, 0x54, 0x61, 0x73, - 0x6b, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x54, 0x61, 0x73, - 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x1a, 0x6e, 0x0a, 0x0f, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, - 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6c, 0x0a, 0x0e, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x44, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xef, 0x07, 0x0a, 0x0f, 0x54, 0x61, 0x73, 0x6b, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x4d, 0x0a, 0x0a, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x1a, 0x84, 0x04, 0x0a, 0x12, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x45, 0x0a, - 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x60, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x46, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, - 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, - 0x70, 0x65, 0x63, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x64, 0x0a, 0x0f, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x72, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x6a, 0x0a, 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4f, 0x72, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x58, 0x0a, - 0x13, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, - 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, - 0x6d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x70, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6e, 0x0a, 0x0e, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6d, 0x0a, 0x0d, 0x50, 0x72, 0x69, - 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x58, 0x0a, 0x11, 0x50, 0x72, - 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, - 0x1e, 0x0a, 0x1a, 0x50, 0x52, 0x49, 0x4d, 0x49, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, - 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, - 0x1a, 0x02, 0x18, 0x01, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xb7, 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x11, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x5f, - 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x55, 0x4d, 0x42, - 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, - 0x45, 0x41, 0x4e, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x05, 0x12, - 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x54, - 0x41, 0x53, 0x4b, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x10, 0x07, 0x22, 0xfe, 0x0a, 0x0a, 0x10, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x73, 0x12, 0x56, 0x0a, 0x0f, 0x63, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0e, 0x63, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x52, 0x0c, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x12, 0x53, 0x0a, 0x0e, - 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x0d, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x51, 0x0a, 0x11, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x74, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, - 0x48, 0x00, 0x52, 0x10, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x74, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x54, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x5f, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x11, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x0c, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x56, 0x0a, 0x0f, 0x69, 0x74, 0x65, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x70, - 0x65, 0x63, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x0e, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x1a, 0x50, 0x0a, 0x0e, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x61, - 0x63, 0x68, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x63, 0x68, 0x65, - 0x4b, 0x65, 0x79, 0x1a, 0x80, 0x02, 0x0a, 0x0d, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x52, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0x77, 0x0a, - 0x0f, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x52, 0x41, - 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x4c, 0x4c, 0x5f, 0x55, 0x50, 0x53, 0x54, 0x52, 0x45, - 0x41, 0x4d, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x4c, 0x4c, 0x5f, 0x55, 0x50, 0x53, 0x54, - 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, - 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x1a, 0xef, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x44, - 0x0a, 0x10, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, - 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x62, 0x61, - 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x4b, 0x0a, 0x14, 0x62, - 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x4d, 0x61, 0x78, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3d, 0x0a, 0x0e, 0x49, 0x74, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x61, - 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, - 0x73, 0x6d, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x22, 0xad, 0x01, 0x0a, 0x14, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x42, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, - 0x49, 0x74, 0x65, 0x6d, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, - 0x32, 0x0a, 0x09, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0e, - 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x15, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x43, 0x0a, - 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, - 0x63, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x1a, 0x52, 0x0a, 0x09, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x12, - 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x72, - 0x61, 0x77, 0x12, 0x29, 0x0a, 0x0f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x42, 0x06, 0x0a, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x22, 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x67, 0x0a, 0x0c, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0xb8, 0x01, 0x0a, 0x12, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x5f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x23, - 0x0a, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x55, 0x72, 0x69, 0x12, 0x29, 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x25, - 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x43, 0x0a, - 0x10, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x61, - 0x6d, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x72, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x40, - 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x48, - 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x2d, 0x0a, 0x11, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, - 0x34, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcf, - 0x17, 0x0a, 0x18, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x09, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, - 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, - 0x1a, 0xfc, 0x09, 0x0a, 0x15, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, - 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x64, - 0x0a, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x46, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, - 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x52, 0x09, 0x6c, 0x69, 0x66, 0x65, 0x63, - 0x79, 0x63, 0x6c, 0x65, 0x12, 0x67, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x55, 0x0a, - 0x03, 0x65, 0x6e, 0x76, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x52, - 0x03, 0x65, 0x6e, 0x76, 0x1a, 0xb6, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, - 0x6c, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, - 0x63, 0x6c, 0x65, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x34, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x1a, 0x8b, 0x05, - 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1f, - 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x01, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x63, 0x70, 0x75, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x25, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x0a, 0x0b, 0x63, 0x70, 0x75, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x0a, 0x63, 0x70, 0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0e, 0x6d, - 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x01, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x70, 0x75, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x6d, - 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x70, 0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x7d, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5b, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x1a, 0x91, 0x01, 0x0a, 0x11, 0x41, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x18, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x1a, 0x32, 0x0a, 0x06, 0x45, - 0x6e, 0x76, 0x56, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, - 0xa3, 0x05, 0x0a, 0x0c, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x48, 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x72, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x55, 0x72, 0x69, 0x12, 0x41, 0x0a, 0x0b, 0x74, 0x79, - 0x70, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x41, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x0a, 0x74, 0x79, 0x70, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x67, 0x0a, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x43, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x7a, 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x49, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x69, 0x6d, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x69, 0x6d, 0x70, - 0x6f, 0x72, 0x74, 0x1a, 0x64, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x72, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6a, 0x0a, 0x15, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x72, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xec, 0x02, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x86, 0x01, 0x0a, 0x17, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x1a, - 0x41, 0x0a, 0x11, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x1a, 0x8f, 0x01, 0x0a, 0x1a, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x5b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x17, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4a, 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x12, - 0x36, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x09, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x4a, 0x6f, 0x62, 0x3a, 0x02, 0x18, 0x01, 0x1a, 0xff, 0x02, 0x0a, 0x0c, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x5c, 0x0a, 0x09, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, - 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x08, 0x69, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, - 0x63, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, - 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, - 0x12, 0x63, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x49, 0x50, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4a, 0x6f, 0x62, - 0x53, 0x70, 0x65, 0x63, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x09, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x4a, 0x6f, 0x62, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x1a, 0x71, 0x0a, - 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x49, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x79, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, - 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, - 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, 0x04, 0x0a, 0x0f, - 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x51, 0x0a, 0x0a, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x64, - 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x52, 0x0a, 0x0f, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x58, 0x0a, - 0x15, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x73, 0x22, 0xfa, 0x08, 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x73, 0x1a, 0x9f, 0x04, 0x0a, 0x06, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x56, 0x0a, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x37, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x52, 0x0a, 0x0f, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x58, 0x0a, - 0x0e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5a, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x32, 0x0a, 0x0f, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x1a, 0x97, 0x03, 0x0a, 0x07, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, - 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x1a, 0x6a, 0x0a, 0x0f, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x41, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x58, 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x95, 0x04, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x12, 0x50, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x49, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x73, 0x12, 0x5c, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x6c, - 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, - 0x52, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x58, 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5a, 0x0a, - 0x14, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa4, 0x02, 0x0a, 0x17, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4a, 0x6f, - 0x62, 0x55, 0x75, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4a, 0x6f, - 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0x9f, 0x02, 0x0a, 0x11, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x22, 0x89, 0x02, 0x0a, 0x11, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x16, - 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, - 0x5f, 0x44, 0x52, 0x49, 0x56, 0x45, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x52, 0x49, - 0x56, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x03, 0x12, - 0x14, 0x0a, 0x10, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, - 0x54, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, - 0x45, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x41, 0x4e, 0x43, - 0x45, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, - 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x0a, - 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, - 0x4e, 0x4f, 0x54, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x45, 0x44, 0x10, 0x0c, 0x12, - 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x41, 0x42, 0x4c, 0x45, - 0x10, 0x0d, 0x22, 0xb7, 0x01, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, - 0x70, 0x65, 0x63, 0x12, 0x47, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x70, - 0x65, 0x63, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x1a, 0x5e, 0x0a, 0x0e, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x53, - 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x70, 0x65, - 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf8, 0x01, 0x0a, - 0x12, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, - 0x70, 0x65, 0x63, 0x12, 0x4f, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x44, 0x0a, 0x0e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xc6, 0x01, 0x0a, 0x18, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x1a, 0x55, 0x0a, 0x0e, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x6b, 0x75, 0x62, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x4b, 0x75, 0x62, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x22, 0x72, 0x0a, 0x19, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x42, 0x0a, 0x0e, 0x70, 0x76, 0x63, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x76, 0x63, 0x53, 0x70, 0x65, 0x63, 0x50, 0x61, - 0x74, 0x63, 0x68, 0x88, 0x01, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x76, 0x63, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x22, 0xc7, 0x01, 0x0a, 0x0e, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x0d, - 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x6d, 0x61, 0x70, 0x68, 0x6f, 0x72, 0x65, 0x4b, 0x65, - 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75, 0x74, 0x65, 0x78, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x74, 0x6c, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x74, 0x6c, 0x12, 0x40, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x70, 0x65, - 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_pipeline_spec_proto_rawDesc = "" + + "\n" + + "\x13pipeline_spec.proto\x12\fml_pipelines\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\"\xb0\x06\n" + + "\vPipelineJob\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12!\n" + + "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12<\n" + + "\rpipeline_spec\x18\a \x01(\v2\x17.google.protobuf.StructR\fpipelineSpec\x12=\n" + + "\x06labels\x18\v \x03(\v2%.ml_pipelines.PipelineJob.LabelsEntryR\x06labels\x12N\n" + + "\x0eruntime_config\x18\f \x01(\v2'.ml_pipelines.PipelineJob.RuntimeConfigR\rruntimeConfig\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a\xb7\x03\n" + + "\rRuntimeConfig\x12[\n" + + "\n" + + "parameters\x18\x01 \x03(\v27.ml_pipelines.PipelineJob.RuntimeConfig.ParametersEntryB\x02\x18\x01R\n" + + "parameters\x120\n" + + "\x14gcs_output_directory\x18\x02 \x01(\tR\x12gcsOutputDirectory\x12g\n" + + "\x10parameter_values\x18\x03 \x03(\v2<.ml_pipelines.PipelineJob.RuntimeConfig.ParameterValuesEntryR\x0fparameterValues\x1aR\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.ml_pipelines.ValueR\x05value:\x028\x01\x1aZ\n" + + "\x14ParameterValuesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01J\x04\b\x03\x10\x04J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\x06\x10\aJ\x04\b\b\x10\tJ\x04\b\t\x10\n" + + "J\x04\b\n" + + "\x10\v\"\xf8\x04\n" + + "\fPipelineSpec\x12?\n" + + "\rpipeline_info\x18\x01 \x01(\v2\x1a.ml_pipelines.PipelineInfoR\fpipelineInfo\x12@\n" + + "\x0fdeployment_spec\x18\a \x01(\v2\x17.google.protobuf.StructR\x0edeploymentSpec\x12\x1f\n" + + "\vsdk_version\x18\x04 \x01(\tR\n" + + "sdkVersion\x12%\n" + + "\x0eschema_version\x18\x05 \x01(\tR\rschemaVersion\x12J\n" + + "\n" + + "components\x18\b \x03(\v2*.ml_pipelines.PipelineSpec.ComponentsEntryR\n" + + "components\x12/\n" + + "\x04root\x18\t \x01(\v2\x1b.ml_pipelines.ComponentSpecR\x04root\x122\n" + + "\x15default_pipeline_root\x18\n" + + " \x01(\tR\x13defaultPipelineRoot\x1a\x8f\x01\n" + + "\x10RuntimeParameter\x12A\n" + + "\x04type\x18\x01 \x01(\x0e2-.ml_pipelines.PrimitiveType.PrimitiveTypeEnumR\x04type\x128\n" + + "\rdefault_value\x18\x02 \x01(\v2\x13.ml_pipelines.ValueR\fdefaultValue\x1aZ\n" + + "\x0fComponentsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.ml_pipelines.ComponentSpecR\x05value:\x028\x01\"\xee\x02\n" + + "\rComponentSpec\x12N\n" + + "\x11input_definitions\x18\x01 \x01(\v2!.ml_pipelines.ComponentInputsSpecR\x10inputDefinitions\x12Q\n" + + "\x12output_definitions\x18\x02 \x01(\v2\".ml_pipelines.ComponentOutputsSpecR\x11outputDefinitions\x12)\n" + + "\x03dag\x18\x03 \x01(\v2\x15.ml_pipelines.DagSpecH\x00R\x03dag\x12'\n" + + "\x0eexecutor_label\x18\x04 \x01(\tH\x00R\rexecutorLabel\x12T\n" + + "\x15single_platform_specs\x18\x05 \x03(\v2 .ml_pipelines.SinglePlatformSpecR\x13singlePlatformSpecsB\x10\n" + + "\x0eimplementation\"\xd3\x01\n" + + "\aDagSpec\x126\n" + + "\x05tasks\x18\x01 \x03(\v2 .ml_pipelines.DagSpec.TasksEntryR\x05tasks\x126\n" + + "\aoutputs\x18\x02 \x01(\v2\x1c.ml_pipelines.DagOutputsSpecR\aoutputs\x1aX\n" + + "\n" + + "TasksEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x124\n" + + "\x05value\x18\x02 \x01(\v2\x1e.ml_pipelines.PipelineTaskSpecR\x05value:\x028\x01\"\xf6\n" + + "\n" + + "\x0eDagOutputsSpec\x12I\n" + + "\tartifacts\x18\x01 \x03(\v2+.ml_pipelines.DagOutputsSpec.ArtifactsEntryR\tartifacts\x12L\n" + + "\n" + + "parameters\x18\x02 \x03(\v2,.ml_pipelines.DagOutputsSpec.ParametersEntryR\n" + + "parameters\x1aq\n" + + "\x14ArtifactSelectorSpec\x12)\n" + + "\x10producer_subtask\x18\x01 \x01(\tR\x0fproducerSubtask\x12.\n" + + "\x13output_artifact_key\x18\x02 \x01(\tR\x11outputArtifactKey\x1ay\n" + + "\x15DagOutputArtifactSpec\x12`\n" + + "\x12artifact_selectors\x18\x01 \x03(\v21.ml_pipelines.DagOutputsSpec.ArtifactSelectorSpecR\x11artifactSelectors\x1ap\n" + + "\x0eArtifactsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12H\n" + + "\x05value\x18\x02 \x01(\v22.ml_pipelines.DagOutputsSpec.DagOutputArtifactSpecR\x05value:\x028\x01\x1at\n" + + "\x15ParameterSelectorSpec\x12)\n" + + "\x10producer_subtask\x18\x01 \x01(\tR\x0fproducerSubtask\x120\n" + + "\x14output_parameter_key\x18\x02 \x01(\tR\x12outputParameterKey\x1a}\n" + + "\x16ParameterSelectorsSpec\x12c\n" + + "\x13parameter_selectors\x18\x01 \x03(\v22.ml_pipelines.DagOutputsSpec.ParameterSelectorSpecR\x12parameterSelectors\x1a\x8f\x02\n" + + "\x19MapParameterSelectorsSpec\x12y\n" + + "\x11mapped_parameters\x18\x02 \x03(\v2L.ml_pipelines.DagOutputsSpec.MapParameterSelectorsSpec.MappedParametersEntryR\x10mappedParameters\x1aw\n" + + "\x15MappedParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12H\n" + + "\x05value\x18\x02 \x01(\v22.ml_pipelines.DagOutputsSpec.ParameterSelectorSpecR\x05value:\x028\x01\x1a\xef\x01\n" + + "\x16DagOutputParameterSpec\x12f\n" + + "\x14value_from_parameter\x18\x01 \x01(\v22.ml_pipelines.DagOutputsSpec.ParameterSelectorSpecH\x00R\x12valueFromParameter\x12_\n" + + "\x10value_from_oneof\x18\x02 \x01(\v23.ml_pipelines.DagOutputsSpec.ParameterSelectorsSpecH\x00R\x0evalueFromOneofB\x06\n" + + "\x04kindJ\x04\b\x03\x10\x04\x1ar\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12I\n" + + "\x05value\x18\x02 \x01(\v23.ml_pipelines.DagOutputsSpec.DagOutputParameterSpecR\x05value:\x028\x01\"\x8a\a\n" + + "\x13ComponentInputsSpec\x12N\n" + + "\tartifacts\x18\x01 \x03(\v20.ml_pipelines.ComponentInputsSpec.ArtifactsEntryR\tartifacts\x12Q\n" + + "\n" + + "parameters\x18\x02 \x03(\v21.ml_pipelines.ComponentInputsSpec.ParametersEntryR\n" + + "parameters\x1a\xc2\x01\n" + + "\fArtifactSpec\x12E\n" + + "\rartifact_type\x18\x01 \x01(\v2 .ml_pipelines.ArtifactTypeSchemaR\fartifactType\x12(\n" + + "\x10is_artifact_list\x18\x02 \x01(\bR\x0eisArtifactList\x12\x1f\n" + + "\vis_optional\x18\x03 \x01(\bR\n" + + "isOptional\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x1a\xac\x02\n" + + "\rParameterSpec\x12E\n" + + "\x04type\x18\x01 \x01(\x0e2-.ml_pipelines.PrimitiveType.PrimitiveTypeEnumB\x02\x18\x01R\x04type\x12T\n" + + "\x0eparameter_type\x18\x02 \x01(\x0e2-.ml_pipelines.ParameterType.ParameterTypeEnumR\rparameterType\x12;\n" + + "\rdefault_value\x18\x03 \x01(\v2\x16.google.protobuf.ValueR\fdefaultValue\x12\x1f\n" + + "\vis_optional\x18\x04 \x01(\bR\n" + + "isOptional\x12 \n" + + "\vdescription\x18\x05 \x01(\tR\vdescription\x1al\n" + + "\x0eArtifactsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12D\n" + + "\x05value\x18\x02 \x01(\v2..ml_pipelines.ComponentInputsSpec.ArtifactSpecR\x05value:\x028\x01\x1an\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12E\n" + + "\x05value\x18\x02 \x01(\v2/.ml_pipelines.ComponentInputsSpec.ParameterSpecR\x05value:\x028\x01\"\xf4\t\n" + + "\x14ComponentOutputsSpec\x12O\n" + + "\tartifacts\x18\x01 \x03(\v21.ml_pipelines.ComponentOutputsSpec.ArtifactsEntryR\tartifacts\x12R\n" + + "\n" + + "parameters\x18\x02 \x03(\v22.ml_pipelines.ComponentOutputsSpec.ParametersEntryR\n" + + "parameters\x1a\x85\x05\n" + + "\fArtifactSpec\x12E\n" + + "\rartifact_type\x18\x01 \x01(\v2 .ml_pipelines.ArtifactTypeSchemaR\fartifactType\x12c\n" + + "\n" + + "properties\x18\x02 \x03(\v2?.ml_pipelines.ComponentOutputsSpec.ArtifactSpec.PropertiesEntryB\x02\x18\x01R\n" + + "properties\x12v\n" + + "\x11custom_properties\x18\x03 \x03(\v2E.ml_pipelines.ComponentOutputsSpec.ArtifactSpec.CustomPropertiesEntryB\x02\x18\x01R\x10customProperties\x123\n" + + "\bmetadata\x18\x04 \x01(\v2\x17.google.protobuf.StructR\bmetadata\x12(\n" + + "\x10is_artifact_list\x18\x05 \x01(\bR\x0eisArtifactList\x12 \n" + + "\vdescription\x18\x06 \x01(\tR\vdescription\x1ad\n" + + "\x0fPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12;\n" + + "\x05value\x18\x02 \x01(\v2%.ml_pipelines.ValueOrRuntimeParameterR\x05value:\x028\x01\x1aj\n" + + "\x15CustomPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12;\n" + + "\x05value\x18\x02 \x01(\v2%.ml_pipelines.ValueOrRuntimeParameterR\x05value:\x028\x01\x1a\xce\x01\n" + + "\rParameterSpec\x12E\n" + + "\x04type\x18\x01 \x01(\x0e2-.ml_pipelines.PrimitiveType.PrimitiveTypeEnumB\x02\x18\x01R\x04type\x12T\n" + + "\x0eparameter_type\x18\x02 \x01(\x0e2-.ml_pipelines.ParameterType.ParameterTypeEnumR\rparameterType\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x1am\n" + + "\x0eArtifactsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12E\n" + + "\x05value\x18\x02 \x01(\v2/.ml_pipelines.ComponentOutputsSpec.ArtifactSpecR\x05value:\x028\x01\x1ao\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12F\n" + + "\x05value\x18\x02 \x01(\v20.ml_pipelines.ComponentOutputsSpec.ParameterSpecR\x05value:\x028\x01\"\xd8\n" + + "\n" + + "\x0eTaskInputsSpec\x12L\n" + + "\n" + + "parameters\x18\x01 \x03(\v2,.ml_pipelines.TaskInputsSpec.ParametersEntryR\n" + + "parameters\x12I\n" + + "\tartifacts\x18\x02 \x03(\v2+.ml_pipelines.TaskInputsSpec.ArtifactsEntryR\tartifacts\x1a\xc7\x02\n" + + "\x11InputArtifactSpec\x12y\n" + + "\x14task_output_artifact\x18\x03 \x01(\v2E.ml_pipelines.TaskInputsSpec.InputArtifactSpec.TaskOutputArtifactSpecH\x00R\x12taskOutputArtifact\x12:\n" + + "\x18component_input_artifact\x18\x04 \x01(\tH\x00R\x16componentInputArtifact\x1am\n" + + "\x16TaskOutputArtifactSpec\x12#\n" + + "\rproducer_task\x18\x01 \x01(\tR\fproducerTask\x12.\n" + + "\x13output_artifact_key\x18\x02 \x01(\tR\x11outputArtifactKeyB\x06\n" + + "\x04kindJ\x04\b\x05\x10\x06\x1a\x84\x05\n" + + "\x12InputParameterSpec\x12}\n" + + "\x15task_output_parameter\x18\x01 \x01(\v2G.ml_pipelines.TaskInputsSpec.InputParameterSpec.TaskOutputParameterSpecH\x00R\x13taskOutputParameter\x12L\n" + + "\rruntime_value\x18\x02 \x01(\v2%.ml_pipelines.ValueOrRuntimeParameterH\x00R\fruntimeValue\x12<\n" + + "\x19component_input_parameter\x18\x03 \x01(\tH\x00R\x17componentInputParameter\x12m\n" + + "\x11task_final_status\x18\x05 \x01(\v2?.ml_pipelines.TaskInputsSpec.InputParameterSpec.TaskFinalStatusH\x00R\x0ftaskFinalStatus\x12B\n" + + "\x1dparameter_expression_selector\x18\x04 \x01(\tR\x1bparameterExpressionSelector\x1ap\n" + + "\x17TaskOutputParameterSpec\x12#\n" + + "\rproducer_task\x18\x01 \x01(\tR\fproducerTask\x120\n" + + "\x14output_parameter_key\x18\x02 \x01(\tR\x12outputParameterKey\x1a6\n" + + "\x0fTaskFinalStatus\x12#\n" + + "\rproducer_task\x18\x01 \x01(\tR\fproducerTaskB\x06\n" + + "\x04kind\x1an\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12E\n" + + "\x05value\x18\x02 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x05value:\x028\x01\x1al\n" + + "\x0eArtifactsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12D\n" + + "\x05value\x18\x02 \x01(\v2..ml_pipelines.TaskInputsSpec.InputArtifactSpecR\x05value:\x028\x01\"\xef\a\n" + + "\x0fTaskOutputsSpec\x12M\n" + + "\n" + + "parameters\x18\x01 \x03(\v2-.ml_pipelines.TaskOutputsSpec.ParametersEntryR\n" + + "parameters\x12J\n" + + "\tartifacts\x18\x02 \x03(\v2,.ml_pipelines.TaskOutputsSpec.ArtifactsEntryR\tartifacts\x1a\x84\x04\n" + + "\x12OutputArtifactSpec\x12E\n" + + "\rartifact_type\x18\x01 \x01(\v2 .ml_pipelines.ArtifactTypeSchemaR\fartifactType\x12`\n" + + "\n" + + "properties\x18\x02 \x03(\v2@.ml_pipelines.TaskOutputsSpec.OutputArtifactSpec.PropertiesEntryR\n" + + "properties\x12s\n" + + "\x11custom_properties\x18\x03 \x03(\v2F.ml_pipelines.TaskOutputsSpec.OutputArtifactSpec.CustomPropertiesEntryR\x10customProperties\x1ad\n" + + "\x0fPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12;\n" + + "\x05value\x18\x02 \x01(\v2%.ml_pipelines.ValueOrRuntimeParameterR\x05value:\x028\x01\x1aj\n" + + "\x15CustomPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12;\n" + + "\x05value\x18\x02 \x01(\v2%.ml_pipelines.ValueOrRuntimeParameterR\x05value:\x028\x01\x1aX\n" + + "\x13OutputParameterSpec\x12A\n" + + "\x04type\x18\x01 \x01(\x0e2-.ml_pipelines.PrimitiveType.PrimitiveTypeEnumR\x04type\x1ap\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12G\n" + + "\x05value\x18\x02 \x01(\v21.ml_pipelines.TaskOutputsSpec.OutputParameterSpecR\x05value:\x028\x01\x1an\n" + + "\x0eArtifactsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12F\n" + + "\x05value\x18\x02 \x01(\v20.ml_pipelines.TaskOutputsSpec.OutputArtifactSpecR\x05value:\x028\x01\"m\n" + + "\rPrimitiveType\"X\n" + + "\x11PrimitiveTypeEnum\x12\x1e\n" + + "\x1aPRIMITIVE_TYPE_UNSPECIFIED\x10\x00\x12\a\n" + + "\x03INT\x10\x01\x12\n" + + "\n" + + "\x06DOUBLE\x10\x02\x12\n" + + "\n" + + "\x06STRING\x10\x03\x1a\x02\x18\x01:\x02\x18\x01\"\xb7\x01\n" + + "\rParameterType\"\xa5\x01\n" + + "\x11ParameterTypeEnum\x12#\n" + + "\x1fPARAMETER_TYPE_ENUM_UNSPECIFIED\x10\x00\x12\x11\n" + + "\rNUMBER_DOUBLE\x10\x01\x12\x12\n" + + "\x0eNUMBER_INTEGER\x10\x02\x12\n" + + "\n" + + "\x06STRING\x10\x03\x12\v\n" + + "\aBOOLEAN\x10\x04\x12\b\n" + + "\x04LIST\x10\x05\x12\n" + + "\n" + + "\x06STRUCT\x10\x06\x12\x15\n" + + "\x11TASK_FINAL_STATUS\x10\a\"\xfe\n" + + "\n" + + "\x10PipelineTaskSpec\x12;\n" + + "\ttask_info\x18\x01 \x01(\v2\x1e.ml_pipelines.PipelineTaskInfoR\btaskInfo\x124\n" + + "\x06inputs\x18\x02 \x01(\v2\x1c.ml_pipelines.TaskInputsSpecR\x06inputs\x12'\n" + + "\x0fdependent_tasks\x18\x05 \x03(\tR\x0edependentTasks\x12V\n" + + "\x0fcaching_options\x18\x06 \x01(\v2-.ml_pipelines.PipelineTaskSpec.CachingOptionsR\x0ecachingOptions\x12?\n" + + "\rcomponent_ref\x18\a \x01(\v2\x1a.ml_pipelines.ComponentRefR\fcomponentRef\x12S\n" + + "\x0etrigger_policy\x18\b \x01(\v2,.ml_pipelines.PipelineTaskSpec.TriggerPolicyR\rtriggerPolicy\x12Q\n" + + "\x11artifact_iterator\x18\t \x01(\v2\".ml_pipelines.ArtifactIteratorSpecH\x00R\x10artifactIterator\x12T\n" + + "\x12parameter_iterator\x18\n" + + " \x01(\v2#.ml_pipelines.ParameterIteratorSpecH\x00R\x11parameterIterator\x12M\n" + + "\fretry_policy\x18\v \x01(\v2*.ml_pipelines.PipelineTaskSpec.RetryPolicyR\vretryPolicy\x12V\n" + + "\x0fiterator_policy\x18\f \x01(\v2-.ml_pipelines.PipelineTaskSpec.IteratorPolicyR\x0eiteratorPolicy\x1aP\n" + + "\x0eCachingOptions\x12!\n" + + "\fenable_cache\x18\x01 \x01(\bR\venableCache\x12\x1b\n" + + "\tcache_key\x18\x02 \x01(\tR\bcacheKey\x1a\x80\x02\n" + + "\rTriggerPolicy\x12\x1c\n" + + "\tcondition\x18\x01 \x01(\tR\tcondition\x12X\n" + + "\bstrategy\x18\x02 \x01(\x0e2<.ml_pipelines.PipelineTaskSpec.TriggerPolicy.TriggerStrategyR\bstrategy\"w\n" + + "\x0fTriggerStrategy\x12 \n" + + "\x1cTRIGGER_STRATEGY_UNSPECIFIED\x10\x00\x12 \n" + + "\x1cALL_UPSTREAM_TASKS_SUCCEEDED\x10\x01\x12 \n" + + "\x1cALL_UPSTREAM_TASKS_COMPLETED\x10\x02\x1a\xef\x01\n" + + "\vRetryPolicy\x12&\n" + + "\x0fmax_retry_count\x18\x01 \x01(\x05R\rmaxRetryCount\x12D\n" + + "\x10backoff_duration\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x0fbackoffDuration\x12%\n" + + "\x0ebackoff_factor\x18\x03 \x01(\x01R\rbackoffFactor\x12K\n" + + "\x14backoff_max_duration\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x12backoffMaxDuration\x1a=\n" + + "\x0eIteratorPolicy\x12+\n" + + "\x11parallelism_limit\x18\x01 \x01(\x05R\x10parallelismLimitB\n" + + "\n" + + "\biterator\"\xad\x01\n" + + "\x14ArtifactIteratorSpec\x12B\n" + + "\x05items\x18\x01 \x01(\v2,.ml_pipelines.ArtifactIteratorSpec.ItemsSpecR\x05items\x12\x1d\n" + + "\n" + + "item_input\x18\x02 \x01(\tR\titemInput\x1a2\n" + + "\tItemsSpec\x12%\n" + + "\x0einput_artifact\x18\x01 \x01(\tR\rinputArtifact\"\xcf\x01\n" + + "\x15ParameterIteratorSpec\x12C\n" + + "\x05items\x18\x01 \x01(\v2-.ml_pipelines.ParameterIteratorSpec.ItemsSpecR\x05items\x12\x1d\n" + + "\n" + + "item_input\x18\x02 \x01(\tR\titemInput\x1aR\n" + + "\tItemsSpec\x12\x12\n" + + "\x03raw\x18\x01 \x01(\tH\x00R\x03raw\x12)\n" + + "\x0finput_parameter\x18\x02 \x01(\tH\x00R\x0einputParameterB\x06\n" + + "\x04kind\"\"\n" + + "\fComponentRef\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"g\n" + + "\fPipelineInfo\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12!\n" + + "\fdisplay_name\x18\x02 \x01(\tR\vdisplayName\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\"\xb8\x01\n" + + "\x12ArtifactTypeSchema\x12#\n" + + "\fschema_title\x18\x01 \x01(\tH\x00R\vschemaTitle\x12#\n" + + "\n" + + "schema_uri\x18\x02 \x01(\tB\x02\x18\x01H\x00R\tschemaUri\x12)\n" + + "\x0finstance_schema\x18\x03 \x01(\tH\x00R\x0einstanceSchema\x12%\n" + + "\x0eschema_version\x18\x04 \x01(\tR\rschemaVersionB\x06\n" + + "\x04kind\"C\n" + + "\x10PipelineTaskInfo\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1b\n" + + "\ttask_name\x18\x02 \x01(\tR\btaskName\"\xc9\x01\n" + + "\x17ValueOrRuntimeParameter\x12@\n" + + "\x0econstant_value\x18\x01 \x01(\v2\x13.ml_pipelines.ValueB\x02\x18\x01H\x00R\rconstantValue\x12-\n" + + "\x11runtime_parameter\x18\x02 \x01(\tH\x00R\x10runtimeParameter\x124\n" + + "\bconstant\x18\x03 \x01(\v2\x16.google.protobuf.ValueH\x00R\bconstantB\a\n" + + "\x05value\"\xcf\x17\n" + + "\x18PipelineDeploymentConfig\x12S\n" + + "\texecutors\x18\x01 \x03(\v25.ml_pipelines.PipelineDeploymentConfig.ExecutorsEntryR\texecutors\x1a\xfc\t\n" + + "\x15PipelineContainerSpec\x12\x14\n" + + "\x05image\x18\x01 \x01(\tR\x05image\x12\x18\n" + + "\acommand\x18\x02 \x03(\tR\acommand\x12\x12\n" + + "\x04args\x18\x03 \x03(\tR\x04args\x12d\n" + + "\tlifecycle\x18\x04 \x01(\v2F.ml_pipelines.PipelineDeploymentConfig.PipelineContainerSpec.LifecycleR\tlifecycle\x12g\n" + + "\tresources\x18\x05 \x01(\v2I.ml_pipelines.PipelineDeploymentConfig.PipelineContainerSpec.ResourceSpecR\tresources\x12U\n" + + "\x03env\x18\x06 \x03(\v2C.ml_pipelines.PipelineDeploymentConfig.PipelineContainerSpec.EnvVarR\x03env\x1a\xb6\x01\n" + + "\tLifecycle\x12s\n" + + "\x0fpre_cache_check\x18\x01 \x01(\v2K.ml_pipelines.PipelineDeploymentConfig.PipelineContainerSpec.Lifecycle.ExecR\rpreCacheCheck\x1a4\n" + + "\x04Exec\x12\x18\n" + + "\acommand\x18\x02 \x03(\tR\acommand\x12\x12\n" + + "\x04args\x18\x03 \x03(\tR\x04args\x1a\x8b\x05\n" + + "\fResourceSpec\x12\x1f\n" + + "\tcpu_limit\x18\x01 \x01(\x01B\x02\x18\x01R\bcpuLimit\x12%\n" + + "\fmemory_limit\x18\x02 \x01(\x01B\x02\x18\x01R\vmemoryLimit\x12#\n" + + "\vcpu_request\x18\x05 \x01(\x01B\x02\x18\x01R\n" + + "cpuRequest\x12)\n" + + "\x0ememory_request\x18\x06 \x01(\x01B\x02\x18\x01R\rmemoryRequest\x12,\n" + + "\x12resource_cpu_limit\x18\a \x01(\tR\x10resourceCpuLimit\x122\n" + + "\x15resource_memory_limit\x18\b \x01(\tR\x13resourceMemoryLimit\x120\n" + + "\x14resource_cpu_request\x18\t \x01(\tR\x12resourceCpuRequest\x126\n" + + "\x17resource_memory_request\x18\n" + + " \x01(\tR\x15resourceMemoryRequest\x12}\n" + + "\vaccelerator\x18\x03 \x01(\v2[.ml_pipelines.PipelineDeploymentConfig.PipelineContainerSpec.ResourceSpec.AcceleratorConfigR\vaccelerator\x1a\x91\x01\n" + + "\x11AcceleratorConfig\x12\x16\n" + + "\x04type\x18\x01 \x01(\tB\x02\x18\x01R\x04type\x12\x18\n" + + "\x05count\x18\x02 \x01(\x03B\x02\x18\x01R\x05count\x12#\n" + + "\rresource_type\x18\x03 \x01(\tR\fresourceType\x12%\n" + + "\x0eresource_count\x18\x04 \x01(\tR\rresourceCountJ\x04\b\x04\x10\x05\x1a2\n" + + "\x06EnvVar\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\x1a\xa3\x05\n" + + "\fImporterSpec\x12H\n" + + "\fartifact_uri\x18\x01 \x01(\v2%.ml_pipelines.ValueOrRuntimeParameterR\vartifactUri\x12A\n" + + "\vtype_schema\x18\x02 \x01(\v2 .ml_pipelines.ArtifactTypeSchemaR\n" + + "typeSchema\x12g\n" + + "\n" + + "properties\x18\x03 \x03(\v2C.ml_pipelines.PipelineDeploymentConfig.ImporterSpec.PropertiesEntryB\x02\x18\x01R\n" + + "properties\x12z\n" + + "\x11custom_properties\x18\x04 \x03(\v2I.ml_pipelines.PipelineDeploymentConfig.ImporterSpec.CustomPropertiesEntryB\x02\x18\x01R\x10customProperties\x123\n" + + "\bmetadata\x18\x06 \x01(\v2\x17.google.protobuf.StructR\bmetadata\x12\x1a\n" + + "\breimport\x18\x05 \x01(\bR\breimport\x1ad\n" + + "\x0fPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12;\n" + + "\x05value\x18\x02 \x01(\v2%.ml_pipelines.ValueOrRuntimeParameterR\x05value:\x028\x01\x1aj\n" + + "\x15CustomPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12;\n" + + "\x05value\x18\x02 \x01(\v2%.ml_pipelines.ValueOrRuntimeParameterR\x05value:\x028\x01\x1a\xec\x02\n" + + "\fResolverSpec\x12\x86\x01\n" + + "\x17output_artifact_queries\x18\x01 \x03(\v2N.ml_pipelines.PipelineDeploymentConfig.ResolverSpec.OutputArtifactQueriesEntryR\x15outputArtifactQueries\x1aA\n" + + "\x11ArtifactQuerySpec\x12\x16\n" + + "\x06filter\x18\x01 \x01(\tR\x06filter\x12\x14\n" + + "\x05limit\x18\x02 \x01(\x05R\x05limit\x1a\x8f\x01\n" + + "\x1aOutputArtifactQueriesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12[\n" + + "\x05value\x18\x02 \x01(\v2E.ml_pipelines.PipelineDeploymentConfig.ResolverSpec.ArtifactQuerySpecR\x05value:\x028\x01\x1aU\n" + + "\x17AIPlatformCustomJobSpec\x126\n" + + "\n" + + "custom_job\x18\x01 \x01(\v2\x17.google.protobuf.StructR\tcustomJob:\x02\x18\x01\x1a\xff\x02\n" + + "\fExecutorSpec\x12\\\n" + + "\tcontainer\x18\x01 \x01(\v2<.ml_pipelines.PipelineDeploymentConfig.PipelineContainerSpecH\x00R\tcontainer\x12Q\n" + + "\bimporter\x18\x02 \x01(\v23.ml_pipelines.PipelineDeploymentConfig.ImporterSpecH\x00R\bimporter\x12Q\n" + + "\bresolver\x18\x03 \x01(\v23.ml_pipelines.PipelineDeploymentConfig.ResolverSpecH\x00R\bresolver\x12c\n" + + "\n" + + "custom_job\x18\x04 \x01(\v2>.ml_pipelines.PipelineDeploymentConfig.AIPlatformCustomJobSpecB\x02\x18\x01H\x00R\tcustomJobB\x06\n" + + "\x04spec\x1aq\n" + + "\x0eExecutorsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12I\n" + + "\x05value\x18\x02 \x01(\v23.ml_pipelines.PipelineDeploymentConfig.ExecutorSpecR\x05value:\x028\x01\"y\n" + + "\x05Value\x12\x1d\n" + + "\tint_value\x18\x01 \x01(\x03H\x00R\bintValue\x12#\n" + + "\fdouble_value\x18\x02 \x01(\x01H\x00R\vdoubleValue\x12#\n" + + "\fstring_value\x18\x03 \x01(\tH\x00R\vstringValueB\a\n" + + "\x05value\"\x89\x04\n" + + "\x0fRuntimeArtifact\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x124\n" + + "\x04type\x18\x02 \x01(\v2 .ml_pipelines.ArtifactTypeSchemaR\x04type\x12\x10\n" + + "\x03uri\x18\x03 \x01(\tR\x03uri\x12Q\n" + + "\n" + + "properties\x18\x04 \x03(\v2-.ml_pipelines.RuntimeArtifact.PropertiesEntryB\x02\x18\x01R\n" + + "properties\x12d\n" + + "\x11custom_properties\x18\x05 \x03(\v23.ml_pipelines.RuntimeArtifact.CustomPropertiesEntryB\x02\x18\x01R\x10customProperties\x123\n" + + "\bmetadata\x18\x06 \x01(\v2\x17.google.protobuf.StructR\bmetadata\x1aR\n" + + "\x0fPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.ml_pipelines.ValueR\x05value:\x028\x01\x1aX\n" + + "\x15CustomPropertiesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.ml_pipelines.ValueR\x05value:\x028\x01\"K\n" + + "\fArtifactList\x12;\n" + + "\tartifacts\x18\x01 \x03(\v2\x1d.ml_pipelines.RuntimeArtifactR\tartifacts\"\xfa\b\n" + + "\rExecutorInput\x12:\n" + + "\x06inputs\x18\x01 \x01(\v2\".ml_pipelines.ExecutorInput.InputsR\x06inputs\x12=\n" + + "\aoutputs\x18\x02 \x01(\v2#.ml_pipelines.ExecutorInput.OutputsR\aoutputs\x1a\x9f\x04\n" + + "\x06Inputs\x12V\n" + + "\n" + + "parameters\x18\x01 \x03(\v22.ml_pipelines.ExecutorInput.Inputs.ParametersEntryB\x02\x18\x01R\n" + + "parameters\x12O\n" + + "\tartifacts\x18\x02 \x03(\v21.ml_pipelines.ExecutorInput.Inputs.ArtifactsEntryR\tartifacts\x12b\n" + + "\x10parameter_values\x18\x03 \x03(\v27.ml_pipelines.ExecutorInput.Inputs.ParameterValuesEntryR\x0fparameterValues\x1aR\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.ml_pipelines.ValueR\x05value:\x028\x01\x1aX\n" + + "\x0eArtifactsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.ml_pipelines.ArtifactListR\x05value:\x028\x01\x1aZ\n" + + "\x14ParameterValuesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\x1a2\n" + + "\x0fOutputParameter\x12\x1f\n" + + "\voutput_file\x18\x01 \x01(\tR\n" + + "outputFile\x1a\x97\x03\n" + + "\aOutputs\x12S\n" + + "\n" + + "parameters\x18\x01 \x03(\v23.ml_pipelines.ExecutorInput.Outputs.ParametersEntryR\n" + + "parameters\x12P\n" + + "\tartifacts\x18\x02 \x03(\v22.ml_pipelines.ExecutorInput.Outputs.ArtifactsEntryR\tartifacts\x12\x1f\n" + + "\voutput_file\x18\x03 \x01(\tR\n" + + "outputFile\x1aj\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12A\n" + + "\x05value\x18\x02 \x01(\v2+.ml_pipelines.ExecutorInput.OutputParameterR\x05value:\x028\x01\x1aX\n" + + "\x0eArtifactsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.ml_pipelines.ArtifactListR\x05value:\x028\x01\"\x95\x04\n" + + "\x0eExecutorOutput\x12P\n" + + "\n" + + "parameters\x18\x01 \x03(\v2,.ml_pipelines.ExecutorOutput.ParametersEntryB\x02\x18\x01R\n" + + "parameters\x12I\n" + + "\tartifacts\x18\x02 \x03(\v2+.ml_pipelines.ExecutorOutput.ArtifactsEntryR\tartifacts\x12\\\n" + + "\x10parameter_values\x18\x03 \x03(\v21.ml_pipelines.ExecutorOutput.ParameterValuesEntryR\x0fparameterValues\x1aR\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12)\n" + + "\x05value\x18\x02 \x01(\v2\x13.ml_pipelines.ValueR\x05value:\x028\x01\x1aX\n" + + "\x0eArtifactsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.ml_pipelines.ArtifactListR\x05value:\x028\x01\x1aZ\n" + + "\x14ParameterValuesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\"\xa4\x02\n" + + "\x17PipelineTaskFinalStatus\x12\x14\n" + + "\x05state\x18\x01 \x01(\tR\x05state\x12(\n" + + "\x05error\x18\x02 \x01(\v2\x12.google.rpc.StatusR\x05error\x12.\n" + + "\x11pipeline_job_uuid\x18\x03 \x01(\x03B\x02\x18\x01R\x0fpipelineJobUuid\x12.\n" + + "\x11pipeline_job_name\x18\x04 \x01(\tB\x02\x18\x01R\x0fpipelineJobName\x12;\n" + + "\x1apipeline_job_resource_name\x18\x05 \x01(\tR\x17pipelineJobResourceName\x12,\n" + + "\x12pipeline_task_name\x18\x06 \x01(\tR\x10pipelineTaskName\"\x9f\x02\n" + + "\x11PipelineStateEnum\"\x89\x02\n" + + "\x11PipelineTaskState\x12\x1a\n" + + "\x16TASK_STATE_UNSPECIFIED\x10\x00\x12\v\n" + + "\aPENDING\x10\x01\x12\x12\n" + + "\x0eRUNNING_DRIVER\x10\x02\x12\x14\n" + + "\x10DRIVER_SUCCEEDED\x10\x03\x12\x14\n" + + "\x10RUNNING_EXECUTOR\x10\x04\x12\r\n" + + "\tSUCCEEDED\x10\x05\x12\x12\n" + + "\x0eCANCEL_PENDING\x10\x06\x12\x0e\n" + + "\n" + + "CANCELLING\x10\a\x12\r\n" + + "\tCANCELLED\x10\b\x12\n" + + "\n" + + "\x06FAILED\x10\t\x12\v\n" + + "\aSKIPPED\x10\n" + + "\x12\n" + + "\n" + + "\x06QUEUED\x10\v\x12\x11\n" + + "\rNOT_TRIGGERED\x10\f\x12\x11\n" + + "\rUNSCHEDULABLE\x10\r\"\xb7\x01\n" + + "\fPlatformSpec\x12G\n" + + "\tplatforms\x18\x01 \x03(\v2).ml_pipelines.PlatformSpec.PlatformsEntryR\tplatforms\x1a^\n" + + "\x0ePlatformsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x126\n" + + "\x05value\x18\x02 \x01(\v2 .ml_pipelines.SinglePlatformSpecR\x05value:\x028\x01\"\xf8\x01\n" + + "\x12SinglePlatformSpec\x12O\n" + + "\x0fdeployment_spec\x18\x01 \x01(\v2&.ml_pipelines.PlatformDeploymentConfigR\x0edeploymentSpec\x12\x1a\n" + + "\bplatform\x18\x02 \x01(\tR\bplatform\x12/\n" + + "\x06config\x18\x03 \x01(\v2\x17.google.protobuf.StructR\x06config\x12D\n" + + "\x0epipelineConfig\x18\x04 \x01(\v2\x1c.ml_pipelines.PipelineConfigR\x0epipelineConfig\"\xc6\x01\n" + + "\x18PlatformDeploymentConfig\x12S\n" + + "\texecutors\x18\x01 \x03(\v25.ml_pipelines.PlatformDeploymentConfig.ExecutorsEntryR\texecutors\x1aU\n" + + "\x0eExecutorsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.google.protobuf.StructR\x05value:\x028\x01\"\x82\x01\n" + + "\x0fWorkspaceConfig\x12\x12\n" + + "\x04size\x18\x01 \x01(\tR\x04size\x12L\n" + + "\n" + + "kubernetes\x18\x02 \x01(\v2'.ml_pipelines.KubernetesWorkspaceConfigH\x00R\n" + + "kubernetes\x88\x01\x01B\r\n" + + "\v_kubernetes\"r\n" + + "\x19KubernetesWorkspaceConfig\x12B\n" + + "\x0epvc_spec_patch\x18\x01 \x01(\v2\x17.google.protobuf.StructH\x00R\fpvcSpecPatch\x88\x01\x01B\x11\n" + + "\x0f_pvc_spec_patch\"\xc7\x01\n" + + "\x0ePipelineConfig\x12#\n" + + "\rsemaphore_key\x18\x01 \x01(\tR\fsemaphoreKey\x12\x1d\n" + + "\n" + + "mutex_name\x18\x02 \x01(\tR\tmutexName\x12!\n" + + "\fresource_ttl\x18\x03 \x01(\x05R\vresourceTtl\x12@\n" + + "\tworkspace\x18\x04 \x01(\v2\x1d.ml_pipelines.WorkspaceConfigH\x00R\tworkspace\x88\x01\x01B\f\n" + + "\n" + + "_workspaceB=4.21.1,<=6.31.1 diff --git a/api/v2alpha1/python/setup.py b/api/v2alpha1/python/setup.py index 6ab2a20cb43..5d0dd7cbb90 100644 --- a/api/v2alpha1/python/setup.py +++ b/api/v2alpha1/python/setup.py @@ -13,10 +13,22 @@ # limitations under the License. import setuptools +import os +from typing import List NAME = 'kfp-pipeline-spec' VERSION = '0.7.0' +def get_requirements(requirements_file: str) -> List[str]: + """Read requirements from requirements.in.""" + + file_path = os.path.join(os.path.dirname(__file__), requirements_file) + with open(file_path, 'r') as f: + lines = f.readlines() + lines = [line.strip() for line in lines] + lines = [line for line in lines if not line.startswith('#') and line] + return lines + setuptools.setup( name=NAME, version=VERSION, @@ -26,7 +38,7 @@ url='https://github.com/kubeflow/pipelines', packages=setuptools.find_namespace_packages(include=['kfp.*']), python_requires='>=3.9.0', - install_requires=['protobuf>=4.21.1,<5'], + install_requires=get_requirements('requirements.txt'), include_package_data=True, license='Apache 2.0', ) diff --git a/backend/api/Dockerfile b/backend/api/Dockerfile index a73be417484..93c63a9e20b 100644 --- a/backend/api/Dockerfile +++ b/backend/api/Dockerfile @@ -14,41 +14,70 @@ # Generate client code (go & json) from API protocol buffers FROM golang:1.23 as generator -ENV GRPC_GATEWAY_VERSION v1.9.6 -ENV GO_SWAGGER_VERSION v0.18.0 -ENV GOLANG_PROTOBUF_VERSION v1.5.1 -ENV GRPC_VERSION v1.23.0 -ENV PROTOC_VERSION 3.20.3 +ENV GRPC_GATEWAY_VERSION v2.27.1 +ENV GO_SWAGGER_VERSION v0.32.3 +ENV GRPC_VERSION v1.73.0 +ENV PROTOC_VERSION 31.1 ENV GOBIN=/go/bin +# The googleapis repo doesn't use GitHub releases or version tags, +# so we pin a specific commit to make the clone reproducible. +ENV GOOGLEAPIS_COMMIT 68d5196a529174df97c28c70622ffc1c3721815f + +# **Note** that protoc-gen-go-grpc is packaged with grpc-go but is versioned +# separately. You can find the releases for protoc-gen-go-grpc here: +# https://github.com/grpc/grpc-go/releases +# **Note** that these also include releases for grpc-go which is the grpc Go +# runtime package. protoc-gen-go-grpc is the package used for generating +# Go GRPC code from .proto files. +# to list recent protoc-gen-go-grpc versions you can also do: +# go list -m -versions google.golang.org/grpc/cmd/protoc-gen-go-grpc +# PROTOC_GEN_GO_GRPC & PROTOBUF_GO versions should match reasonably close to each other. +# You can check the protobuf in the go.mod for protoc-gen-go-grpc, like here: +# https://github.com/grpc/grpc-go/blob/cmd/protoc-gen-go-grpc/v1.5.1/cmd/protoc-gen-go-grpc/go.mod#L7 +# **Note** That BOTH PROTOC_GEN_GO_GRPC & PROTOBUF_GO here are used for +# Generating GO Code. These versions should be identical to the +# runtime Go packages (in the project go.mod) +ENV PROTOC_GEN_GO_GRPC v1.5.1 +ENV PROTOBUF_GO=v1.36.6 # Install protoc. RUN apt-get update -y && apt-get install -y jq sed unzip RUN curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip -RUN unzip -o protoc.zip -d /usr/ bin/protoc -RUN unzip -o protoc.zip -d /usr/ 'include/*' +RUN unzip -o protoc.zip -d /tmp/protoc && \ + mv /tmp/protoc/bin/protoc /usr/bin/protoc && \ + chmod +x /usr/bin/protoc +RUN unzip -o protoc.zip 'include/*' -d /tmp/protoc && \ + mv /tmp/protoc/include/* /usr/include RUN rm -f protoc.zip ENV PROTOCCOMPILER /usr/bin/protoc ENV PROTOCINCLUDE /usr/include/google/protobuf # Need grpc-gateway source code for -I in protoc command. -WORKDIR /go/src/github.com -RUN mkdir grpc-ecosystem && cd grpc-ecosystem && git clone --depth 1 --branch $GRPC_GATEWAY_VERSION https://github.com/grpc-ecosystem/grpc-gateway.git -RUN mkdir grpc && git clone --depth 1 --branch $GRPC_VERSION https://github.com/grpc/grpc-go - # Install protoc-gen-rpc-gateway && protoc-gen-swagger. -RUN cd grpc-ecosystem/grpc-gateway && GO111MODULE=on go mod vendor -RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@latest -RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@latest +RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@${GRPC_GATEWAY_VERSION} +RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@${GRPC_GATEWAY_VERSION} + +# Need to explicitly provide the googleapis protos and the OpenAPI options that were previously present in the grpc-gateway repo. +RUN git init /googleapis && \ + cd /googleapis && \ + git remote add origin https://github.com/googleapis/googleapis.git && \ + git fetch --depth 1 origin ${GOOGLEAPIS_COMMIT} && \ + git checkout FETCH_HEAD +RUN mkdir -p /protoc-gen-openapiv2 && \ + cp -r /go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway/v2@${GRPC_GATEWAY_VERSION}/protoc-gen-openapiv2/options /protoc-gen-openapiv2/options # Download go-swagger binary. RUN curl -LO "https://github.com/go-swagger/go-swagger/releases/download/${GO_SWAGGER_VERSION}/swagger_linux_amd64" RUN chmod +x swagger_linux_amd64 && mv swagger_linux_amd64 /usr/bin/swagger # Need protobuf source code for -I in protoc command. -RUN mkdir golang && cd golang && git clone --depth 1 --branch $GOLANG_PROTOBUF_VERSION https://github.com/golang/protobuf.git # Install protoc-gen-go. -RUN cd golang/protobuf && GO111MODULE=on go mod vendor -RUN go install github.com/golang/protobuf/protoc-gen-go@latest +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOBUF_GO} +RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC} + +# Needed for buildling python packages requiring protoc +RUN apt-get update && apt-get install -y python3-pip +RUN pip3 install --upgrade pip setuptools wheel --break-system-packages # WORKAROUND: https://github.com/docker-library/golang/issues/225#issuecomment-403170792 ENV XDG_CACHE_HOME /tmp/.cache diff --git a/backend/api/Makefile b/backend/api/Makefile index 447202b4123..ad3858e44fa 100644 --- a/backend/api/Makefile +++ b/backend/api/Makefile @@ -15,13 +15,13 @@ # Makefile to generate KFP api clients from proto. IMAGE_TAG=kfp-api-generator -# Contact chensun or zijianjoy if this remote image needs an update. +# Contact chensun or HumairAK if this remote image needs an update. REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator # Assume the latest API version by default. API_VERSION ?= v2beta1 # Keep in sync with the version used in test/release/Dockerfile.release -PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.1 +PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.2 CONTAINER_ENGINE ?= docker @@ -38,7 +38,6 @@ generate: fetch-dependencies hack/generator.sh $(API_VERSION)/*.proto .PHONY: fetch-dependencies fetch-dependencies: v2beta1/google/rpc/status.proto -# TODO(gkcalat): add this as a submodule? v2beta1/google/rpc/status.proto: mkdir -p v2beta1/google/rpc wget -O v2beta1/google/rpc/status.proto https://raw.githubusercontent.com/googleapis/googleapis/047d3a8ac7f75383855df0166144f891d7af08d9/google/rpc/status.proto diff --git a/backend/api/hack/generator.sh b/backend/api/hack/generator.sh index f89a99fda89..45fc482a345 100755 --- a/backend/api/hack/generator.sh +++ b/backend/api/hack/generator.sh @@ -35,33 +35,45 @@ mkdir -p backend/api/${API_VERSION}/go_client mkdir -p backend/api/${API_VERSION}/swagger # Generate *.pb.go (grpc api client) from *.proto. -${PROTOCCOMPILER} -I. -Ibackend/api/${API_VERSION} \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/ \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/ \ - -I/usr/include/ \ - --plugin=protoc-gen-go=/go/bin/protoc-gen-go \ - --go_out=plugins=grpc:${TMP_OUTPUT} \ - backend/api/${API_VERSION}/*.proto +# -I/ allows for absolute import paths +# e.g. "import protoc-gen-openapiv2/options/annotations.proto" +${PROTOCCOMPILER} \ + -I. \ + -Ibackend/api/${API_VERSION} \ + -I/googleapis \ + -I/protoc-gen-openapiv2 \ + -I/usr/include \ + -I/ \ + --go_out=${TMP_OUTPUT} \ + --go-grpc_out=${TMP_OUTPUT} \ + --plugin=protoc-gen-go=/go/bin/protoc-gen-go \ + --plugin=protoc-gen-go-grpc=/go/bin/protoc-gen-go-grpc \ + backend/api/${API_VERSION}/*.proto + # Generate *.pb.gw.go (grpc api rest client) from *.proto. -${PROTOCCOMPILER} -I. -Ibackend/api/${API_VERSION} \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/ \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/ \ - -I/usr/include/ \ +${PROTOCCOMPILER} \ + -I. \ + -Ibackend/api/${API_VERSION} \ + -I/googleapis \ + -I/protoc-gen-openapiv2 \ + -I/usr/include \ + -I/ \ --plugin=protoc-gen-grpc-gateway=/go/bin/protoc-gen-grpc-gateway \ --grpc-gateway_out=logtostderr=true:${TMP_OUTPUT} \ backend/api/${API_VERSION}/*.proto + # Move *.pb.go and *.gw.go to go_client folder. cp ${TMP_OUTPUT}/github.com/kubeflow/pipelines/backend/api/${API_VERSION}/go_client/* ./backend/api/${API_VERSION}/go_client # Generate *.swagger.json from *.proto into swagger folder. -${PROTOCCOMPILER} -I. -Ibackend/api/${API_VERSION} \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/ \ - -I/go/src/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/ \ - -I//usr/include/ \ - --plugin=protoc-gen-swagger=/go/bin/protoc-gen-swagger \ - --swagger_out=logtostderr=true:${TMP_OUTPUT} \ +${PROTOCCOMPILER} \ + -I. \ + -Ibackend/api/${API_VERSION} \ + -I/googleapis \ + -I/protoc-gen-openapiv2 \ + -I/usr/include \ + -I/ \ + --plugin=protoc-gen-openapiv2=/go/bin/protoc-gen-openapiv2 \ + --openapiv2_out=logtostderr=true,json_names_for_fields=false:${TMP_OUTPUT} \ backend/api/${API_VERSION}/*.proto # Move *.swagger.json files into swagger folder. cp -a ${TMP_OUTPUT}/backend/api/${API_VERSION}/*.swagger.json ./backend/api/${API_VERSION}/swagger diff --git a/backend/api/v1beta1/auth.proto b/backend/api/v1beta1/auth.proto index 04bf584702c..c76c27dbe00 100644 --- a/backend/api/v1beta1/auth.proto +++ b/backend/api/v1beta1/auth.proto @@ -19,9 +19,9 @@ package api; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; diff --git a/backend/api/v1beta1/error.proto b/backend/api/v1beta1/error.proto index b43b351e91b..23f98f10a29 100644 --- a/backend/api/v1beta1/error.proto +++ b/backend/api/v1beta1/error.proto @@ -20,8 +20,8 @@ package api; import "google/protobuf/any.proto"; message Error { - string error_message = 1; - string error_details = 2; + string error_message = 1 [json_name = "error_message"]; + string error_details = 2 [json_name = "error_details"]; } message Status { diff --git a/backend/api/v1beta1/experiment.proto b/backend/api/v1beta1/experiment.proto index aa0f896b42b..39ee8d9eb4a 100644 --- a/backend/api/v1beta1/experiment.proto +++ b/backend/api/v1beta1/experiment.proto @@ -17,14 +17,13 @@ syntax = "proto3"; option go_package = "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client"; package api; -import "backend/api/v1beta1/error.proto"; import "backend/api/v1beta1/resource_reference.proto"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; @@ -121,16 +120,16 @@ message ListExperimentsRequest { // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListExperiment call or can be omitted when fetching the first page. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // The number of experiments to be listed per page. If there are more // experiments than this number, the response message will contain a // nextPageToken field you can use to fetch the next page. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). @@ -139,7 +138,7 @@ message ListExperimentsRequest { // What resource reference to filter on. // For Experiment, the only valid resource type is Namespace. An sample query string could be // resource_reference_key.type=NAMESPACE&resource_reference_key.id=ns1 - ResourceKey resource_reference_key = 5; + ResourceKey resource_reference_key = 5 [json_name = "resource_reference_key"]; } message ListExperimentsResponse { @@ -147,10 +146,10 @@ message ListExperimentsResponse { repeated Experiment experiments = 1; // The total number of experiments for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of experiments. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message DeleteExperimentRequest { @@ -169,11 +168,11 @@ message Experiment { string description = 3; // Output. The time that the experiment created. - google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp created_at = 4 [json_name = "created_at"]; // Optional input field. Specify which resource this run belongs to. // For Experiment, the only valid resource reference is a single Namespace. - repeated ResourceReference resource_references = 5; + repeated ResourceReference resource_references = 5 [json_name = "resource_references"]; enum StorageState { STORAGESTATE_UNSPECIFIED = 0; @@ -182,7 +181,7 @@ message Experiment { } // Output. Specifies whether this experiment is in archived or available state. - StorageState storage_state = 6; + StorageState storage_state = 6 [json_name = "storage_state"]; } message ArchiveExperimentRequest { diff --git a/backend/api/v1beta1/filter.proto b/backend/api/v1beta1/filter.proto index 8ae80f56760..9e7dd97734c 100644 --- a/backend/api/v1beta1/filter.proto +++ b/backend/api/v1beta1/filter.proto @@ -17,7 +17,6 @@ syntax = "proto3"; option go_package = "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client"; package api; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; // Predicate captures individual conditions that must be true for a resource @@ -48,18 +47,18 @@ message Predicate { string key = 2; oneof value { - int32 int_value = 3; - int64 long_value = 4; - string string_value = 5; + int32 int_value = 3 [json_name = "int_value"]; + int64 long_value = 4 [json_name = "long_value"]; + string string_value = 5 [json_name = "string_value"]; // Timestamp values will be converted to Unix time (seconds since the epoch) // prior to being used in a filtering operation. - google.protobuf.Timestamp timestamp_value = 6; + google.protobuf.Timestamp timestamp_value = 6 [json_name = "timestamp_value"]; // Array values below are only meant to be used by the IN operator. - IntValues int_values = 7; - LongValues long_values = 8; - StringValues string_values = 9; + IntValues int_values = 7 [json_name = "int_values"]; + LongValues long_values = 8 [json_name = "long_values"]; + StringValues string_values = 9 [json_name = "string_values"]; } } @@ -126,4 +125,4 @@ message Filter { // encoded version of it is used. service DummyFilterService { rpc GetFilter(Filter) returns (Filter) {} -} \ No newline at end of file +} diff --git a/backend/api/v1beta1/go_client/auth.pb.go b/backend/api/v1beta1/go_client/auth.pb.go index 76696c0d6c4..f87b44fbd88 100644 --- a/backend/api/v1beta1/go_client/auth.pb.go +++ b/backend/api/v1beta1/go_client/auth.pb.go @@ -14,24 +14,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/auth.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -145,22 +142,19 @@ func (AuthorizeRequest_Verb) EnumDescriptor() ([]byte, []int) { // and verb. User identity is not part of the message, because it is expected // to be parsed from request headers. Caller should proxy user request's headers. type AuthorizeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // Namespace the resource belongs to. + Resources AuthorizeRequest_Resources `protobuf:"varint,2,opt,name=resources,proto3,enum=api.AuthorizeRequest_Resources" json:"resources,omitempty"` // Resource type asking for authorization. + Verb AuthorizeRequest_Verb `protobuf:"varint,3,opt,name=verb,proto3,enum=api.AuthorizeRequest_Verb" json:"verb,omitempty"` // Verb on the resource asking for authorization. unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // Namespace the resource belongs to. - Resources AuthorizeRequest_Resources `protobuf:"varint,2,opt,name=resources,proto3,enum=api.AuthorizeRequest_Resources" json:"resources,omitempty"` // Resource type asking for authorization. - Verb AuthorizeRequest_Verb `protobuf:"varint,3,opt,name=verb,proto3,enum=api.AuthorizeRequest_Verb" json:"verb,omitempty"` // Verb on the resource asking for authorization. + sizeCache protoimpl.SizeCache } func (x *AuthorizeRequest) Reset() { *x = AuthorizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_auth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizeRequest) String() string { @@ -171,7 +165,7 @@ func (*AuthorizeRequest) ProtoMessage() {} func (x *AuthorizeRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -209,67 +203,48 @@ func (x *AuthorizeRequest) GetVerb() AuthorizeRequest_Verb { var File_backend_api_v1beta1_auth_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_auth_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, - 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, - 0x02, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x2e, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, - 0x22, 0x32, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, - 0x14, 0x55, 0x4e, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, - 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x49, 0x45, 0x57, 0x45, - 0x52, 0x53, 0x10, 0x01, 0x22, 0x3c, 0x0a, 0x04, 0x56, 0x65, 0x72, 0x62, 0x12, 0x13, 0x0a, 0x0f, - 0x55, 0x4e, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x42, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, - 0x03, 0x47, 0x45, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, - 0x10, 0x03, 0x32, 0x67, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x56, 0x31, - 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x42, 0x91, 0x01, 0x92, 0x41, - 0x51, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x1c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x12, 0x11, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, - 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, - 0x12, 0x00, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_auth_proto_rawDesc = "" + + "\n" + + "\x1ebackend/api/v1beta1/auth.proto\x12\x03api\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\x91\x02\n" + + "\x10AuthorizeRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12=\n" + + "\tresources\x18\x02 \x01(\x0e2\x1f.api.AuthorizeRequest.ResourcesR\tresources\x12.\n" + + "\x04verb\x18\x03 \x01(\x0e2\x1a.api.AuthorizeRequest.VerbR\x04verb\"2\n" + + "\tResources\x12\x18\n" + + "\x14UNASSIGNED_RESOURCES\x10\x00\x12\v\n" + + "\aVIEWERS\x10\x01\"<\n" + + "\x04Verb\x12\x13\n" + + "\x0fUNASSIGNED_VERB\x10\x00\x12\n" + + "\n" + + "\x06CREATE\x10\x01\x12\a\n" + + "\x03GET\x10\x02\x12\n" + + "\n" + + "\x06DELETE\x10\x032g\n" + + "\vAuthService\x12X\n" + + "\vAuthorizeV1\x12\x15.api.AuthorizeRequest\x1a\x16.google.protobuf.Empty\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/apis/v1beta1/authB\x91\x01\x92AQ*\x02\x01\x02R\x1c\n" + + "\adefault\x12\x11\x12\x0f\n" + + "\r\x1a\v.api.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_auth_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_auth_proto_rawDescData = file_backend_api_v1beta1_auth_proto_rawDesc + file_backend_api_v1beta1_auth_proto_rawDescData []byte ) func file_backend_api_v1beta1_auth_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_auth_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_auth_proto_rawDescData) + file_backend_api_v1beta1_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_auth_proto_rawDesc), len(file_backend_api_v1beta1_auth_proto_rawDesc))) }) return file_backend_api_v1beta1_auth_proto_rawDescData } var file_backend_api_v1beta1_auth_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_backend_api_v1beta1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_backend_api_v1beta1_auth_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_auth_proto_goTypes = []any{ (AuthorizeRequest_Resources)(0), // 0: api.AuthorizeRequest.Resources (AuthorizeRequest_Verb)(0), // 1: api.AuthorizeRequest.Verb (*AuthorizeRequest)(nil), // 2: api.AuthorizeRequest @@ -292,25 +267,11 @@ func file_backend_api_v1beta1_auth_proto_init() { if File_backend_api_v1beta1_auth_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthorizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_auth_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_auth_proto_rawDesc), len(file_backend_api_v1beta1_auth_proto_rawDesc)), NumEnums: 2, NumMessages: 1, NumExtensions: 0, @@ -322,87 +283,6 @@ func file_backend_api_v1beta1_auth_proto_init() { MessageInfos: file_backend_api_v1beta1_auth_proto_msgTypes, }.Build() File_backend_api_v1beta1_auth_proto = out.File - file_backend_api_v1beta1_auth_proto_rawDesc = nil file_backend_api_v1beta1_auth_proto_goTypes = nil file_backend_api_v1beta1_auth_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AuthServiceClient is the client API for AuthService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AuthServiceClient interface { - AuthorizeV1(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type authServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { - return &authServiceClient{cc} -} - -func (c *authServiceClient) AuthorizeV1(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.AuthService/AuthorizeV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuthServiceServer is the server API for AuthService service. -type AuthServiceServer interface { - AuthorizeV1(context.Context, *AuthorizeRequest) (*emptypb.Empty, error) -} - -// UnimplementedAuthServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAuthServiceServer struct { -} - -func (*UnimplementedAuthServiceServer) AuthorizeV1(context.Context, *AuthorizeRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthorizeV1 not implemented") -} - -func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) { - s.RegisterService(&_AuthService_serviceDesc, srv) -} - -func _AuthService_AuthorizeV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthorizeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).AuthorizeV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.AuthService/AuthorizeV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).AuthorizeV1(ctx, req.(*AuthorizeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AuthService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.AuthService", - HandlerType: (*AuthServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AuthorizeV1", - Handler: _AuthService_AuthorizeV1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/auth.proto", -} diff --git a/backend/api/v1beta1/go_client/auth.pb.gw.go b/backend/api/v1beta1/go_client/auth.pb.gw.go index bdf0ab485d2..2a0d6521edf 100644 --- a/backend/api/v1beta1/go_client/auth.pb.gw.go +++ b/backend/api/v1beta1/go_client/auth.pb.gw.go @@ -10,92 +10,91 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - var ( - filter_AuthService_AuthorizeV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_AuthService_AuthorizeV1_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AuthorizeRequest - var metadata runtime.ServerMetadata +var filter_AuthService_AuthorizeV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_AuthService_AuthorizeV1_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AuthorizeRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_AuthorizeV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.AuthorizeV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AuthService_AuthorizeV1_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AuthorizeRequest - var metadata runtime.ServerMetadata - + var ( + protoReq AuthorizeRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_AuthorizeV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AuthorizeV1(ctx, &protoReq) return msg, metadata, err - } // RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". // UnaryRPC :call AuthServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error { - - mux.Handle("GET", pattern_AuthService_AuthorizeV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_AuthService_AuthorizeV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.AuthService/AuthorizeV1", runtime.WithHTTPPathPattern("/apis/v1beta1/auth")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AuthService_AuthorizeV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthService_AuthorizeV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_AuthService_AuthorizeV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_AuthService_AuthorizeV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -104,25 +103,24 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterAuthServiceHandler(ctx, mux, conn) } @@ -136,34 +134,30 @@ func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AuthServiceClient" to call the correct interceptors. +// "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error { - - mux.Handle("GET", pattern_AuthService_AuthorizeV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_AuthService_AuthorizeV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.AuthService/AuthorizeV1", runtime.WithHTTPPathPattern("/apis/v1beta1/auth")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthService_AuthorizeV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_AuthService_AuthorizeV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_AuthService_AuthorizeV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_AuthService_AuthorizeV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_AuthService_AuthorizeV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "auth"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_AuthService_AuthorizeV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "auth"}, "")) ) var ( diff --git a/backend/api/v1beta1/go_client/auth_grpc.pb.go b/backend/api/v1beta1/go_client/auth_grpc.pb.go new file mode 100644 index 00000000000..a0daa3ebaef --- /dev/null +++ b/backend/api/v1beta1/go_client/auth_grpc.pb.go @@ -0,0 +1,136 @@ +// Copyright 2020 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/auth.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + AuthService_AuthorizeV1_FullMethodName = "/api.AuthService/AuthorizeV1" +) + +// AuthServiceClient is the client API for AuthService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AuthServiceClient interface { + AuthorizeV1(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type authServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { + return &authServiceClient{cc} +} + +func (c *authServiceClient) AuthorizeV1(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, AuthService_AuthorizeV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthServiceServer is the server API for AuthService service. +// All implementations must embed UnimplementedAuthServiceServer +// for forward compatibility. +type AuthServiceServer interface { + AuthorizeV1(context.Context, *AuthorizeRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedAuthServiceServer() +} + +// UnimplementedAuthServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAuthServiceServer struct{} + +func (UnimplementedAuthServiceServer) AuthorizeV1(context.Context, *AuthorizeRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthorizeV1 not implemented") +} +func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {} +func (UnimplementedAuthServiceServer) testEmbeddedByValue() {} + +// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuthServiceServer will +// result in compilation errors. +type UnsafeAuthServiceServer interface { + mustEmbedUnimplementedAuthServiceServer() +} + +func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) { + // If the following call pancis, it indicates UnimplementedAuthServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&AuthService_ServiceDesc, srv) +} + +func _AuthService_AuthorizeV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AuthorizeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).AuthorizeV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_AuthorizeV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).AuthorizeV1(ctx, req.(*AuthorizeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AuthService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.AuthService", + HandlerType: (*AuthServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AuthorizeV1", + Handler: _AuthService_AuthorizeV1_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/auth.proto", +} diff --git a/backend/api/v1beta1/go_client/error.pb.go b/backend/api/v1beta1/go_client/error.pb.go index a4d0642e618..ca3a67bdc44 100644 --- a/backend/api/v1beta1/go_client/error.pb.go +++ b/backend/api/v1beta1/go_client/error.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/error.proto package go_client @@ -26,6 +26,7 @@ import ( anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -36,21 +37,18 @@ const ( ) type Error struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ErrorMessage string `protobuf:"bytes,1,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + ErrorDetails string `protobuf:"bytes,2,opt,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"` unknownFields protoimpl.UnknownFields - - ErrorMessage string `protobuf:"bytes,1,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` - ErrorDetails string `protobuf:"bytes,2,opt,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Error) Reset() { *x = Error{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_error_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_error_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Error) String() string { @@ -61,7 +59,7 @@ func (*Error) ProtoMessage() {} func (x *Error) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_error_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91,22 +89,19 @@ func (x *Error) GetErrorDetails() string { } type Status struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` + Details []*anypb.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` unknownFields protoimpl.UnknownFields - - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` - Details []*anypb.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Status) Reset() { *x = Status{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_error_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_error_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Status) String() string { @@ -117,7 +112,7 @@ func (*Status) ProtoMessage() {} func (x *Status) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_error_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,43 +150,31 @@ func (x *Status) GetDetails() []*anypb.Any { var File_backend_api_v1beta1_error_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_error_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x51, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x22, 0x62, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, - 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_error_proto_rawDesc = "" + + "\n" + + "\x1fbackend/api/v1beta1/error.proto\x12\x03api\x1a\x19google/protobuf/any.proto\"Q\n" + + "\x05Error\x12#\n" + + "\rerror_message\x18\x01 \x01(\tR\ferrorMessage\x12#\n" + + "\rerror_details\x18\x02 \x01(\tR\ferrorDetails\"b\n" + + "\x06Status\x12\x14\n" + + "\x05error\x18\x01 \x01(\tR\x05error\x12\x12\n" + + "\x04code\x18\x02 \x01(\x05R\x04code\x12.\n" + + "\adetails\x18\x03 \x03(\v2\x14.google.protobuf.AnyR\adetailsB=Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_error_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_error_proto_rawDescData = file_backend_api_v1beta1_error_proto_rawDesc + file_backend_api_v1beta1_error_proto_rawDescData []byte ) func file_backend_api_v1beta1_error_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_error_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_error_proto_rawDescData) + file_backend_api_v1beta1_error_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_error_proto_rawDesc), len(file_backend_api_v1beta1_error_proto_rawDesc))) }) return file_backend_api_v1beta1_error_proto_rawDescData } var file_backend_api_v1beta1_error_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_backend_api_v1beta1_error_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_error_proto_goTypes = []any{ (*Error)(nil), // 0: api.Error (*Status)(nil), // 1: api.Status (*anypb.Any)(nil), // 2: google.protobuf.Any @@ -210,37 +193,11 @@ func file_backend_api_v1beta1_error_proto_init() { if File_backend_api_v1beta1_error_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_error_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_error_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_error_proto_rawDesc), len(file_backend_api_v1beta1_error_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -251,7 +208,6 @@ func file_backend_api_v1beta1_error_proto_init() { MessageInfos: file_backend_api_v1beta1_error_proto_msgTypes, }.Build() File_backend_api_v1beta1_error_proto = out.File - file_backend_api_v1beta1_error_proto_rawDesc = nil file_backend_api_v1beta1_error_proto_goTypes = nil file_backend_api_v1beta1_error_proto_depIdxs = nil } diff --git a/backend/api/v1beta1/go_client/experiment.pb.go b/backend/api/v1beta1/go_client/experiment.pb.go index 651695b960f..a80cbbeec78 100644 --- a/backend/api/v1beta1/go_client/experiment.pb.go +++ b/backend/api/v1beta1/go_client/experiment.pb.go @@ -14,25 +14,22 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/experiment.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -92,21 +89,18 @@ func (Experiment_StorageState) EnumDescriptor() ([]byte, []int) { } type CreateExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The experiment to be created. - Experiment *Experiment `protobuf:"bytes,1,opt,name=experiment,proto3" json:"experiment,omitempty"` + Experiment *Experiment `protobuf:"bytes,1,opt,name=experiment,proto3" json:"experiment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateExperimentRequest) Reset() { *x = CreateExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExperimentRequest) String() string { @@ -117,7 +111,7 @@ func (*CreateExperimentRequest) ProtoMessage() {} func (x *CreateExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -140,21 +134,18 @@ func (x *CreateExperimentRequest) GetExperiment() *Experiment { } type GetExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the experiment to be retrieved. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetExperimentRequest) Reset() { *x = GetExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExperimentRequest) String() string { @@ -165,7 +156,7 @@ func (*GetExperimentRequest) ProtoMessage() {} func (x *GetExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,10 +179,7 @@ func (x *GetExperimentRequest) GetId() string { } type ListExperimentsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListExperiment call or can be omitted when fetching the first page. @@ -210,15 +198,15 @@ type ListExperimentsRequest struct { // For Experiment, the only valid resource type is Namespace. An sample query string could be // resource_reference_key.type=NAMESPACE&resource_reference_key.id=ns1 ResourceReferenceKey *ResourceKey `protobuf:"bytes,5,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListExperimentsRequest) Reset() { *x = ListExperimentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExperimentsRequest) String() string { @@ -229,7 +217,7 @@ func (*ListExperimentsRequest) ProtoMessage() {} func (x *ListExperimentsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -280,25 +268,22 @@ func (x *ListExperimentsRequest) GetResourceReferenceKey() *ResourceKey { } type ListExperimentsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of experiments returned. Experiments []*Experiment `protobuf:"bytes,1,rep,name=experiments,proto3" json:"experiments,omitempty"` // The total number of experiments for the given query. TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` // The token to list the next page of experiments. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListExperimentsResponse) Reset() { *x = ListExperimentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExperimentsResponse) String() string { @@ -309,7 +294,7 @@ func (*ListExperimentsResponse) ProtoMessage() {} func (x *ListExperimentsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -346,21 +331,18 @@ func (x *ListExperimentsResponse) GetNextPageToken() string { } type DeleteExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the experiment to be deleted. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteExperimentRequest) Reset() { *x = DeleteExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExperimentRequest) String() string { @@ -371,7 +353,7 @@ func (*DeleteExperimentRequest) ProtoMessage() {} func (x *DeleteExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,10 +376,7 @@ func (x *DeleteExperimentRequest) GetId() string { } type Experiment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique experiment ID. Generated by API server. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Required input field. Unique experiment name provided by user. @@ -410,16 +389,16 @@ type Experiment struct { // For Experiment, the only valid resource reference is a single Namespace. ResourceReferences []*ResourceReference `protobuf:"bytes,5,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references,omitempty"` // Output. Specifies whether this experiment is in archived or available state. - StorageState Experiment_StorageState `protobuf:"varint,6,opt,name=storage_state,json=storageState,proto3,enum=api.Experiment_StorageState" json:"storage_state,omitempty"` + StorageState Experiment_StorageState `protobuf:"varint,6,opt,name=storage_state,json=storageState,proto3,enum=api.Experiment_StorageState" json:"storage_state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Experiment) Reset() { *x = Experiment{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment) String() string { @@ -430,7 +409,7 @@ func (*Experiment) ProtoMessage() {} func (x *Experiment) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,21 +467,18 @@ func (x *Experiment) GetStorageState() Experiment_StorageState { } type ArchiveExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the experiment to be archived. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArchiveExperimentRequest) Reset() { *x = ArchiveExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArchiveExperimentRequest) String() string { @@ -513,7 +489,7 @@ func (*ArchiveExperimentRequest) ProtoMessage() {} func (x *ArchiveExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -536,21 +512,18 @@ func (x *ArchiveExperimentRequest) GetId() string { } type UnarchiveExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the experiment to be restored. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UnarchiveExperimentRequest) Reset() { *x = UnarchiveExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnarchiveExperimentRequest) String() string { @@ -561,7 +534,7 @@ func (*UnarchiveExperimentRequest) ProtoMessage() {} func (x *UnarchiveExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_experiment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -585,158 +558,77 @@ func (x *UnarchiveExperimentRequest) GetId() string { var File_backend_api_v1beta1_experiment_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_experiment_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, - 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2f, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x22, 0x26, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xcd, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, - 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x46, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, - 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x93, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, - 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x29, - 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xfe, 0x02, 0x0a, 0x0a, 0x45, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x63, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, - 0x19, 0x0a, 0x15, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02, 0x22, 0x2a, 0x0a, 0x18, 0x41, 0x72, - 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x1a, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, - 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x32, 0xd8, 0x05, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x12, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x31, - 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, - 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x65, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x56, - 0x31, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x26, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x71, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x56, 0x31, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x72, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x31, 0x12, 0x1c, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7c, 0x0a, 0x13, - 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x56, 0x31, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, - 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x28, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x15, 0x55, - 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, - 0x6e, 0x74, 0x56, 0x31, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, - 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x30, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x42, - 0x91, 0x01, 0x92, 0x41, 0x51, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x1c, 0x0a, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, - 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, - 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_experiment_proto_rawDesc = "" + + "\n" + + "$backend/api/v1beta1/experiment.proto\x12\x03api\x1a,backend/api/v1beta1/resource_reference.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"J\n" + + "\x17CreateExperimentRequest\x12/\n" + + "\n" + + "experiment\x18\x01 \x01(\v2\x0f.api.ExperimentR\n" + + "experiment\"&\n" + + "\x14GetExperimentRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\xcd\x01\n" + + "\x16ListExperimentsRequest\x12\x1d\n" + + "\n" + + "page_token\x18\x01 \x01(\tR\tpageToken\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x17\n" + + "\asort_by\x18\x03 \x01(\tR\x06sortBy\x12\x16\n" + + "\x06filter\x18\x04 \x01(\tR\x06filter\x12F\n" + + "\x16resource_reference_key\x18\x05 \x01(\v2\x10.api.ResourceKeyR\x14resourceReferenceKey\"\x93\x01\n" + + "\x17ListExperimentsResponse\x121\n" + + "\vexperiments\x18\x01 \x03(\v2\x0f.api.ExperimentR\vexperiments\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\")\n" + + "\x17DeleteExperimentRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\xfe\x02\n" + + "\n" + + "Experiment\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x129\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12G\n" + + "\x13resource_references\x18\x05 \x03(\v2\x16.api.ResourceReferenceR\x12resourceReferences\x12A\n" + + "\rstorage_state\x18\x06 \x01(\x0e2\x1c.api.Experiment.StorageStateR\fstorageState\"c\n" + + "\fStorageState\x12\x1c\n" + + "\x18STORAGESTATE_UNSPECIFIED\x10\x00\x12\x1a\n" + + "\x16STORAGESTATE_AVAILABLE\x10\x01\x12\x19\n" + + "\x15STORAGESTATE_ARCHIVED\x10\x02\"*\n" + + "\x18ArchiveExperimentRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\",\n" + + "\x1aUnarchiveExperimentRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id2\xd8\x05\n" + + "\x11ExperimentService\x12r\n" + + "\x12CreateExperimentV1\x12\x1c.api.CreateExperimentRequest\x1a\x0f.api.Experiment\"-\x82\xd3\xe4\x93\x02':\n" + + "experiment\"\x19/apis/v1beta1/experiments\x12e\n" + + "\x0fGetExperimentV1\x12\x19.api.GetExperimentRequest\x1a\x0f.api.Experiment\"&\x82\xd3\xe4\x93\x02 \x12\x1e/apis/v1beta1/experiments/{id}\x12q\n" + + "\x11ListExperimentsV1\x12\x1b.api.ListExperimentsRequest\x1a\x1c.api.ListExperimentsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/apis/v1beta1/experiments\x12r\n" + + "\x12DeleteExperimentV1\x12\x1c.api.DeleteExperimentRequest\x1a\x16.google.protobuf.Empty\"&\x82\xd3\xe4\x93\x02 *\x1e/apis/v1beta1/experiments/{id}\x12|\n" + + "\x13ArchiveExperimentV1\x12\x1d.api.ArchiveExperimentRequest\x1a\x16.google.protobuf.Empty\".\x82\xd3\xe4\x93\x02(\"&/apis/v1beta1/experiments/{id}:archive\x12\x82\x01\n" + + "\x15UnarchiveExperimentV1\x12\x1f.api.UnarchiveExperimentRequest\x1a\x16.google.protobuf.Empty\"0\x82\xd3\xe4\x93\x02*\"(/apis/v1beta1/experiments/{id}:unarchiveB\x91\x01\x92AQ*\x02\x01\x02R\x1c\n" + + "\adefault\x12\x11\x12\x0f\n" + + "\r\x1a\v.api.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_experiment_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_experiment_proto_rawDescData = file_backend_api_v1beta1_experiment_proto_rawDesc + file_backend_api_v1beta1_experiment_proto_rawDescData []byte ) func file_backend_api_v1beta1_experiment_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_experiment_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_experiment_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_experiment_proto_rawDescData) + file_backend_api_v1beta1_experiment_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_experiment_proto_rawDesc), len(file_backend_api_v1beta1_experiment_proto_rawDesc))) }) return file_backend_api_v1beta1_experiment_proto_rawDescData } var file_backend_api_v1beta1_experiment_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_backend_api_v1beta1_experiment_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_backend_api_v1beta1_experiment_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_experiment_proto_goTypes = []any{ (Experiment_StorageState)(0), // 0: api.Experiment.StorageState (*CreateExperimentRequest)(nil), // 1: api.CreateExperimentRequest (*GetExperimentRequest)(nil), // 2: api.GetExperimentRequest @@ -782,111 +674,12 @@ func file_backend_api_v1beta1_experiment_proto_init() { if File_backend_api_v1beta1_experiment_proto != nil { return } - file_backend_api_v1beta1_error_proto_init() file_backend_api_v1beta1_resource_reference_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_experiment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_experiment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_experiment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListExperimentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_experiment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListExperimentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_experiment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_experiment_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Experiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_experiment_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_experiment_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnarchiveExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_experiment_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_experiment_proto_rawDesc), len(file_backend_api_v1beta1_experiment_proto_rawDesc)), NumEnums: 1, NumMessages: 8, NumExtensions: 0, @@ -898,285 +691,6 @@ func file_backend_api_v1beta1_experiment_proto_init() { MessageInfos: file_backend_api_v1beta1_experiment_proto_msgTypes, }.Build() File_backend_api_v1beta1_experiment_proto = out.File - file_backend_api_v1beta1_experiment_proto_rawDesc = nil file_backend_api_v1beta1_experiment_proto_goTypes = nil file_backend_api_v1beta1_experiment_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ExperimentServiceClient is the client API for ExperimentService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ExperimentServiceClient interface { - // Creates a new experiment. - CreateExperimentV1(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) - // Finds a specific experiment by ID. - GetExperimentV1(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) - // Finds all experiments. Supports pagination, and sorting on certain fields. - ListExperimentsV1(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) - // Deletes an experiment without deleting the experiment's runs and jobs. To - // avoid unexpected behaviors, delete an experiment's runs and jobs before - // deleting the experiment. - DeleteExperimentV1(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Archives an experiment and the experiment's runs and jobs. - ArchiveExperimentV1(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Restores an archived experiment. The experiment's archived runs and jobs - // will stay archived. - UnarchiveExperimentV1(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type experimentServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewExperimentServiceClient(cc grpc.ClientConnInterface) ExperimentServiceClient { - return &experimentServiceClient{cc} -} - -func (c *experimentServiceClient) CreateExperimentV1(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { - out := new(Experiment) - err := c.cc.Invoke(ctx, "/api.ExperimentService/CreateExperimentV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) GetExperimentV1(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { - out := new(Experiment) - err := c.cc.Invoke(ctx, "/api.ExperimentService/GetExperimentV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) ListExperimentsV1(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) { - out := new(ListExperimentsResponse) - err := c.cc.Invoke(ctx, "/api.ExperimentService/ListExperimentsV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) DeleteExperimentV1(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.ExperimentService/DeleteExperimentV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) ArchiveExperimentV1(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.ExperimentService/ArchiveExperimentV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) UnarchiveExperimentV1(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.ExperimentService/UnarchiveExperimentV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ExperimentServiceServer is the server API for ExperimentService service. -type ExperimentServiceServer interface { - // Creates a new experiment. - CreateExperimentV1(context.Context, *CreateExperimentRequest) (*Experiment, error) - // Finds a specific experiment by ID. - GetExperimentV1(context.Context, *GetExperimentRequest) (*Experiment, error) - // Finds all experiments. Supports pagination, and sorting on certain fields. - ListExperimentsV1(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) - // Deletes an experiment without deleting the experiment's runs and jobs. To - // avoid unexpected behaviors, delete an experiment's runs and jobs before - // deleting the experiment. - DeleteExperimentV1(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) - // Archives an experiment and the experiment's runs and jobs. - ArchiveExperimentV1(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) - // Restores an archived experiment. The experiment's archived runs and jobs - // will stay archived. - UnarchiveExperimentV1(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) -} - -// UnimplementedExperimentServiceServer can be embedded to have forward compatible implementations. -type UnimplementedExperimentServiceServer struct { -} - -func (*UnimplementedExperimentServiceServer) CreateExperimentV1(context.Context, *CreateExperimentRequest) (*Experiment, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateExperimentV1 not implemented") -} -func (*UnimplementedExperimentServiceServer) GetExperimentV1(context.Context, *GetExperimentRequest) (*Experiment, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExperimentV1 not implemented") -} -func (*UnimplementedExperimentServiceServer) ListExperimentsV1(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExperimentsV1 not implemented") -} -func (*UnimplementedExperimentServiceServer) DeleteExperimentV1(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteExperimentV1 not implemented") -} -func (*UnimplementedExperimentServiceServer) ArchiveExperimentV1(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ArchiveExperimentV1 not implemented") -} -func (*UnimplementedExperimentServiceServer) UnarchiveExperimentV1(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnarchiveExperimentV1 not implemented") -} - -func RegisterExperimentServiceServer(s *grpc.Server, srv ExperimentServiceServer) { - s.RegisterService(&_ExperimentService_serviceDesc, srv) -} - -func _ExperimentService_CreateExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).CreateExperimentV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ExperimentService/CreateExperimentV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).CreateExperimentV1(ctx, req.(*CreateExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_GetExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).GetExperimentV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ExperimentService/GetExperimentV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).GetExperimentV1(ctx, req.(*GetExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_ListExperimentsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListExperimentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).ListExperimentsV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ExperimentService/ListExperimentsV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).ListExperimentsV1(ctx, req.(*ListExperimentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_DeleteExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).DeleteExperimentV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ExperimentService/DeleteExperimentV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).DeleteExperimentV1(ctx, req.(*DeleteExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_ArchiveExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).ArchiveExperimentV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ExperimentService/ArchiveExperimentV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).ArchiveExperimentV1(ctx, req.(*ArchiveExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_UnarchiveExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnarchiveExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).UnarchiveExperimentV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ExperimentService/UnarchiveExperimentV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).UnarchiveExperimentV1(ctx, req.(*UnarchiveExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ExperimentService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.ExperimentService", - HandlerType: (*ExperimentServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateExperimentV1", - Handler: _ExperimentService_CreateExperimentV1_Handler, - }, - { - MethodName: "GetExperimentV1", - Handler: _ExperimentService_GetExperimentV1_Handler, - }, - { - MethodName: "ListExperimentsV1", - Handler: _ExperimentService_ListExperimentsV1_Handler, - }, - { - MethodName: "DeleteExperimentV1", - Handler: _ExperimentService_DeleteExperimentV1_Handler, - }, - { - MethodName: "ArchiveExperimentV1", - Handler: _ExperimentService_ArchiveExperimentV1_Handler, - }, - { - MethodName: "UnarchiveExperimentV1", - Handler: _ExperimentService_UnarchiveExperimentV1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/experiment.proto", -} diff --git a/backend/api/v1beta1/go_client/experiment.pb.gw.go b/backend/api/v1beta1/go_client/experiment.pb.gw.go index 8a5943375b5..f86810065b4 100644 --- a/backend/api/v1beta1/go_client/experiment.pb.gw.go +++ b/backend/api/v1beta1/go_client/experiment.pb.gw.go @@ -10,457 +10,374 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_ExperimentService_CreateExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateExperimentRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Experiment); err != nil && err != io.EOF { + var ( + protoReq CreateExperimentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Experiment); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreateExperimentV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_CreateExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateExperimentRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Experiment); err != nil && err != io.EOF { + var ( + protoReq CreateExperimentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Experiment); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateExperimentV1(ctx, &protoReq) return msg, metadata, err - } func request_ExperimentService_GetExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.GetExperimentV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_GetExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.GetExperimentV1(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ExperimentService_ListExperimentsV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_ExperimentService_ListExperimentsV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_ExperimentService_ListExperimentsV1_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListExperimentsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListExperimentsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExperimentService_ListExperimentsV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListExperimentsV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_ListExperimentsV1_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListExperimentsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListExperimentsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExperimentService_ListExperimentsV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListExperimentsV1(ctx, &protoReq) return msg, metadata, err - } func request_ExperimentService_DeleteExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.DeleteExperimentV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_DeleteExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.DeleteExperimentV1(ctx, &protoReq) return msg, metadata, err - } func request_ExperimentService_ArchiveExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ArchiveExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.ArchiveExperimentV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_ArchiveExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ArchiveExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.ArchiveExperimentV1(ctx, &protoReq) return msg, metadata, err - } func request_ExperimentService_UnarchiveExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnarchiveExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UnarchiveExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.UnarchiveExperimentV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_UnarchiveExperimentV1_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnarchiveExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UnarchiveExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.UnarchiveExperimentV1(ctx, &protoReq) return msg, metadata, err - } // RegisterExperimentServiceHandlerServer registers the http handlers for service ExperimentService to "mux". // UnaryRPC :call ExperimentServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterExperimentServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterExperimentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExperimentServiceServer) error { - - mux.Handle("POST", pattern_ExperimentService_CreateExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_CreateExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ExperimentService/CreateExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_CreateExperimentV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_CreateExperimentV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_CreateExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_CreateExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_ExperimentService_GetExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExperimentService_GetExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ExperimentService/GetExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_GetExperimentV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_GetExperimentV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_GetExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_GetExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_ExperimentService_ListExperimentsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExperimentService_ListExperimentsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ExperimentService/ListExperimentsV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_ListExperimentsV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_ListExperimentsV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_ListExperimentsV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_ListExperimentsV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_ExperimentService_DeleteExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_ExperimentService_DeleteExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ExperimentService/DeleteExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_DeleteExperimentV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_DeleteExperimentV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_DeleteExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_DeleteExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ExperimentService_ArchiveExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_ArchiveExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ExperimentService/ArchiveExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments/{id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_ArchiveExperimentV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_ArchiveExperimentV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_ArchiveExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_ArchiveExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ExperimentService_UnarchiveExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_UnarchiveExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ExperimentService/UnarchiveExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments/{id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_UnarchiveExperimentV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_UnarchiveExperimentV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_UnarchiveExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_UnarchiveExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -469,25 +386,24 @@ func RegisterExperimentServiceHandlerServer(ctx context.Context, mux *runtime.Se // RegisterExperimentServiceHandlerFromEndpoint is same as RegisterExperimentServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterExperimentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterExperimentServiceHandler(ctx, mux, conn) } @@ -501,156 +417,127 @@ func RegisterExperimentServiceHandler(ctx context.Context, mux *runtime.ServeMux // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExperimentServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExperimentServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ExperimentServiceClient" to call the correct interceptors. +// "ExperimentServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterExperimentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExperimentServiceClient) error { - - mux.Handle("POST", pattern_ExperimentService_CreateExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_CreateExperimentV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.ExperimentService/CreateExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_CreateExperimentV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_CreateExperimentV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_CreateExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_CreateExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_ExperimentService_GetExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExperimentService_GetExperimentV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.ExperimentService/GetExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_GetExperimentV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_GetExperimentV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_GetExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_GetExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_ExperimentService_ListExperimentsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExperimentService_ListExperimentsV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.ExperimentService/ListExperimentsV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_ListExperimentsV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_ListExperimentsV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_ListExperimentsV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_ListExperimentsV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_ExperimentService_DeleteExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_ExperimentService_DeleteExperimentV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.ExperimentService/DeleteExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_DeleteExperimentV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_DeleteExperimentV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_DeleteExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_DeleteExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ExperimentService_ArchiveExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_ArchiveExperimentV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.ExperimentService/ArchiveExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments/{id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_ArchiveExperimentV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_ArchiveExperimentV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_ArchiveExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_ArchiveExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ExperimentService_UnarchiveExperimentV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_UnarchiveExperimentV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.ExperimentService/UnarchiveExperimentV1", runtime.WithHTTPPathPattern("/apis/v1beta1/experiments/{id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_UnarchiveExperimentV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_UnarchiveExperimentV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_UnarchiveExperimentV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_UnarchiveExperimentV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_ExperimentService_CreateExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "experiments"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_GetExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "experiments", "id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_ListExperimentsV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "experiments"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_DeleteExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "experiments", "id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_ArchiveExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "experiments", "id"}, "archive", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_UnarchiveExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "experiments", "id"}, "unarchive", runtime.AssumeColonVerbOpt(true))) + pattern_ExperimentService_CreateExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "experiments"}, "")) + pattern_ExperimentService_GetExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "experiments", "id"}, "")) + pattern_ExperimentService_ListExperimentsV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "experiments"}, "")) + pattern_ExperimentService_DeleteExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "experiments", "id"}, "")) + pattern_ExperimentService_ArchiveExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "experiments", "id"}, "archive")) + pattern_ExperimentService_UnarchiveExperimentV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "experiments", "id"}, "unarchive")) ) var ( - forward_ExperimentService_CreateExperimentV1_0 = runtime.ForwardResponseMessage - - forward_ExperimentService_GetExperimentV1_0 = runtime.ForwardResponseMessage - - forward_ExperimentService_ListExperimentsV1_0 = runtime.ForwardResponseMessage - - forward_ExperimentService_DeleteExperimentV1_0 = runtime.ForwardResponseMessage - - forward_ExperimentService_ArchiveExperimentV1_0 = runtime.ForwardResponseMessage - + forward_ExperimentService_CreateExperimentV1_0 = runtime.ForwardResponseMessage + forward_ExperimentService_GetExperimentV1_0 = runtime.ForwardResponseMessage + forward_ExperimentService_ListExperimentsV1_0 = runtime.ForwardResponseMessage + forward_ExperimentService_DeleteExperimentV1_0 = runtime.ForwardResponseMessage + forward_ExperimentService_ArchiveExperimentV1_0 = runtime.ForwardResponseMessage forward_ExperimentService_UnarchiveExperimentV1_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v1beta1/go_client/experiment_grpc.pb.go b/backend/api/v1beta1/go_client/experiment_grpc.pb.go new file mode 100644 index 00000000000..d52c9673a10 --- /dev/null +++ b/backend/api/v1beta1/go_client/experiment_grpc.pb.go @@ -0,0 +1,344 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/experiment.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ExperimentService_CreateExperimentV1_FullMethodName = "/api.ExperimentService/CreateExperimentV1" + ExperimentService_GetExperimentV1_FullMethodName = "/api.ExperimentService/GetExperimentV1" + ExperimentService_ListExperimentsV1_FullMethodName = "/api.ExperimentService/ListExperimentsV1" + ExperimentService_DeleteExperimentV1_FullMethodName = "/api.ExperimentService/DeleteExperimentV1" + ExperimentService_ArchiveExperimentV1_FullMethodName = "/api.ExperimentService/ArchiveExperimentV1" + ExperimentService_UnarchiveExperimentV1_FullMethodName = "/api.ExperimentService/UnarchiveExperimentV1" +) + +// ExperimentServiceClient is the client API for ExperimentService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ExperimentServiceClient interface { + // Creates a new experiment. + CreateExperimentV1(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) + // Finds a specific experiment by ID. + GetExperimentV1(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) + // Finds all experiments. Supports pagination, and sorting on certain fields. + ListExperimentsV1(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) + // Deletes an experiment without deleting the experiment's runs and jobs. To + // avoid unexpected behaviors, delete an experiment's runs and jobs before + // deleting the experiment. + DeleteExperimentV1(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Archives an experiment and the experiment's runs and jobs. + ArchiveExperimentV1(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Restores an archived experiment. The experiment's archived runs and jobs + // will stay archived. + UnarchiveExperimentV1(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type experimentServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewExperimentServiceClient(cc grpc.ClientConnInterface) ExperimentServiceClient { + return &experimentServiceClient{cc} +} + +func (c *experimentServiceClient) CreateExperimentV1(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Experiment) + err := c.cc.Invoke(ctx, ExperimentService_CreateExperimentV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) GetExperimentV1(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Experiment) + err := c.cc.Invoke(ctx, ExperimentService_GetExperimentV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) ListExperimentsV1(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListExperimentsResponse) + err := c.cc.Invoke(ctx, ExperimentService_ListExperimentsV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) DeleteExperimentV1(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ExperimentService_DeleteExperimentV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) ArchiveExperimentV1(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ExperimentService_ArchiveExperimentV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) UnarchiveExperimentV1(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ExperimentService_UnarchiveExperimentV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ExperimentServiceServer is the server API for ExperimentService service. +// All implementations must embed UnimplementedExperimentServiceServer +// for forward compatibility. +type ExperimentServiceServer interface { + // Creates a new experiment. + CreateExperimentV1(context.Context, *CreateExperimentRequest) (*Experiment, error) + // Finds a specific experiment by ID. + GetExperimentV1(context.Context, *GetExperimentRequest) (*Experiment, error) + // Finds all experiments. Supports pagination, and sorting on certain fields. + ListExperimentsV1(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) + // Deletes an experiment without deleting the experiment's runs and jobs. To + // avoid unexpected behaviors, delete an experiment's runs and jobs before + // deleting the experiment. + DeleteExperimentV1(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) + // Archives an experiment and the experiment's runs and jobs. + ArchiveExperimentV1(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) + // Restores an archived experiment. The experiment's archived runs and jobs + // will stay archived. + UnarchiveExperimentV1(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedExperimentServiceServer() +} + +// UnimplementedExperimentServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedExperimentServiceServer struct{} + +func (UnimplementedExperimentServiceServer) CreateExperimentV1(context.Context, *CreateExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateExperimentV1 not implemented") +} +func (UnimplementedExperimentServiceServer) GetExperimentV1(context.Context, *GetExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExperimentV1 not implemented") +} +func (UnimplementedExperimentServiceServer) ListExperimentsV1(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExperimentsV1 not implemented") +} +func (UnimplementedExperimentServiceServer) DeleteExperimentV1(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteExperimentV1 not implemented") +} +func (UnimplementedExperimentServiceServer) ArchiveExperimentV1(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveExperimentV1 not implemented") +} +func (UnimplementedExperimentServiceServer) UnarchiveExperimentV1(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnarchiveExperimentV1 not implemented") +} +func (UnimplementedExperimentServiceServer) mustEmbedUnimplementedExperimentServiceServer() {} +func (UnimplementedExperimentServiceServer) testEmbeddedByValue() {} + +// UnsafeExperimentServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ExperimentServiceServer will +// result in compilation errors. +type UnsafeExperimentServiceServer interface { + mustEmbedUnimplementedExperimentServiceServer() +} + +func RegisterExperimentServiceServer(s grpc.ServiceRegistrar, srv ExperimentServiceServer) { + // If the following call pancis, it indicates UnimplementedExperimentServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ExperimentService_ServiceDesc, srv) +} + +func _ExperimentService_CreateExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).CreateExperimentV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_CreateExperimentV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).CreateExperimentV1(ctx, req.(*CreateExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_GetExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).GetExperimentV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_GetExperimentV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).GetExperimentV1(ctx, req.(*GetExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_ListExperimentsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExperimentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).ListExperimentsV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_ListExperimentsV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).ListExperimentsV1(ctx, req.(*ListExperimentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_DeleteExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).DeleteExperimentV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_DeleteExperimentV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).DeleteExperimentV1(ctx, req.(*DeleteExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_ArchiveExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).ArchiveExperimentV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_ArchiveExperimentV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).ArchiveExperimentV1(ctx, req.(*ArchiveExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_UnarchiveExperimentV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnarchiveExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).UnarchiveExperimentV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_UnarchiveExperimentV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).UnarchiveExperimentV1(ctx, req.(*UnarchiveExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ExperimentService_ServiceDesc is the grpc.ServiceDesc for ExperimentService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ExperimentService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.ExperimentService", + HandlerType: (*ExperimentServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateExperimentV1", + Handler: _ExperimentService_CreateExperimentV1_Handler, + }, + { + MethodName: "GetExperimentV1", + Handler: _ExperimentService_GetExperimentV1_Handler, + }, + { + MethodName: "ListExperimentsV1", + Handler: _ExperimentService_ListExperimentsV1_Handler, + }, + { + MethodName: "DeleteExperimentV1", + Handler: _ExperimentService_DeleteExperimentV1_Handler, + }, + { + MethodName: "ArchiveExperimentV1", + Handler: _ExperimentService_ArchiveExperimentV1_Handler, + }, + { + MethodName: "UnarchiveExperimentV1", + Handler: _ExperimentService_UnarchiveExperimentV1_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/experiment.proto", +} diff --git a/backend/api/v1beta1/go_client/filter.pb.go b/backend/api/v1beta1/go_client/filter.pb.go index c6adf00ce61..402bd1d59b9 100644 --- a/backend/api/v1beta1/go_client/filter.pb.go +++ b/backend/api/v1beta1/go_client/filter.pb.go @@ -14,23 +14,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/filter.proto package go_client import ( - context "context" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -117,13 +113,10 @@ func (Predicate_Op) EnumDescriptor() ([]byte, []int) { // Predicate captures individual conditions that must be true for a resource // being filtered. type Predicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Op Predicate_Op `protobuf:"varint,1,opt,name=op,proto3,enum=api.Predicate_Op" json:"op,omitempty"` - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // Types that are assignable to Value: + state protoimpl.MessageState `protogen:"open.v1"` + Op Predicate_Op `protobuf:"varint,1,opt,name=op,proto3,enum=api.Predicate_Op" json:"op,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // Types that are valid to be assigned to Value: // // *Predicate_IntValue // *Predicate_LongValue @@ -132,16 +125,16 @@ type Predicate struct { // *Predicate_IntValues // *Predicate_LongValues // *Predicate_StringValues - Value isPredicate_Value `protobuf_oneof:"value"` + Value isPredicate_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Predicate) Reset() { *x = Predicate{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_filter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Predicate) String() string { @@ -152,7 +145,7 @@ func (*Predicate) ProtoMessage() {} func (x *Predicate) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,58 +174,72 @@ func (x *Predicate) GetKey() string { return "" } -func (m *Predicate) GetValue() isPredicate_Value { - if m != nil { - return m.Value +func (x *Predicate) GetValue() isPredicate_Value { + if x != nil { + return x.Value } return nil } func (x *Predicate) GetIntValue() int32 { - if x, ok := x.GetValue().(*Predicate_IntValue); ok { - return x.IntValue + if x != nil { + if x, ok := x.Value.(*Predicate_IntValue); ok { + return x.IntValue + } } return 0 } func (x *Predicate) GetLongValue() int64 { - if x, ok := x.GetValue().(*Predicate_LongValue); ok { - return x.LongValue + if x != nil { + if x, ok := x.Value.(*Predicate_LongValue); ok { + return x.LongValue + } } return 0 } func (x *Predicate) GetStringValue() string { - if x, ok := x.GetValue().(*Predicate_StringValue); ok { - return x.StringValue + if x != nil { + if x, ok := x.Value.(*Predicate_StringValue); ok { + return x.StringValue + } } return "" } func (x *Predicate) GetTimestampValue() *timestamppb.Timestamp { - if x, ok := x.GetValue().(*Predicate_TimestampValue); ok { - return x.TimestampValue + if x != nil { + if x, ok := x.Value.(*Predicate_TimestampValue); ok { + return x.TimestampValue + } } return nil } func (x *Predicate) GetIntValues() *IntValues { - if x, ok := x.GetValue().(*Predicate_IntValues); ok { - return x.IntValues + if x != nil { + if x, ok := x.Value.(*Predicate_IntValues); ok { + return x.IntValues + } } return nil } func (x *Predicate) GetLongValues() *LongValues { - if x, ok := x.GetValue().(*Predicate_LongValues); ok { - return x.LongValues + if x != nil { + if x, ok := x.Value.(*Predicate_LongValues); ok { + return x.LongValues + } } return nil } func (x *Predicate) GetStringValues() *StringValues { - if x, ok := x.GetValue().(*Predicate_StringValues); ok { - return x.StringValues + if x != nil { + if x, ok := x.Value.(*Predicate_StringValues); ok { + return x.StringValues + } } return nil } @@ -287,20 +294,17 @@ func (*Predicate_LongValues) isPredicate_Value() {} func (*Predicate_StringValues) isPredicate_Value() {} type IntValues struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Values []int32 `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Values []int32 `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *IntValues) Reset() { *x = IntValues{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_filter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_filter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *IntValues) String() string { @@ -311,7 +315,7 @@ func (*IntValues) ProtoMessage() {} func (x *IntValues) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_filter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -334,20 +338,17 @@ func (x *IntValues) GetValues() []int32 { } type StringValues struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *StringValues) Reset() { *x = StringValues{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_filter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_filter_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StringValues) String() string { @@ -358,7 +359,7 @@ func (*StringValues) ProtoMessage() {} func (x *StringValues) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_filter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -381,20 +382,17 @@ func (x *StringValues) GetValues() []string { } type LongValues struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Values []int64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Values []int64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *LongValues) Reset() { *x = LongValues{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_filter_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_filter_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LongValues) String() string { @@ -405,7 +403,7 @@ func (*LongValues) ProtoMessage() {} func (x *LongValues) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_filter_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,21 +468,18 @@ func (x *LongValues) GetValues() []int64 { // } // } type Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // All predicates are AND-ed when this filter is applied. - Predicates []*Predicate `protobuf:"bytes,1,rep,name=predicates,proto3" json:"predicates,omitempty"` + Predicates []*Predicate `protobuf:"bytes,1,rep,name=predicates,proto3" json:"predicates,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Filter) Reset() { *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_filter_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_filter_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Filter) String() string { @@ -495,7 +490,7 @@ func (*Filter) ProtoMessage() {} func (x *Filter) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_filter_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -519,85 +514,64 @@ func (x *Filter) GetPredicates() []*Predicate { var File_backend_api_v1beta1_filter_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_filter_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x04, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x2e, 0x4f, 0x70, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, - 0x6c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, - 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x74, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0a, - 0x6c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x02, 0x4f, 0x70, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x51, 0x55, 0x41, - 0x4c, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, - 0x4c, 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, - 0x54, 0x48, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, - 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x05, 0x12, - 0x0d, 0x0a, 0x09, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x06, 0x12, 0x14, - 0x0a, 0x10, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, - 0x4c, 0x53, 0x10, 0x07, 0x12, 0x06, 0x0a, 0x02, 0x49, 0x4e, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, - 0x49, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x42, 0x07, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x09, 0x49, 0x6e, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x26, 0x0a, 0x0c, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x22, 0x24, 0x0a, 0x0a, 0x4c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x03, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x06, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x73, 0x32, 0x3d, 0x0a, 0x12, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x09, 0x47, 0x65, - 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x22, 0x00, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_filter_proto_rawDesc = "" + + "\n" + + " backend/api/v1beta1/filter.proto\x12\x03api\x1a\x1fgoogle/protobuf/timestamp.proto\"\xae\x04\n" + + "\tPredicate\x12!\n" + + "\x02op\x18\x01 \x01(\x0e2\x11.api.Predicate.OpR\x02op\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x12\x1d\n" + + "\tint_value\x18\x03 \x01(\x05H\x00R\bintValue\x12\x1f\n" + + "\n" + + "long_value\x18\x04 \x01(\x03H\x00R\tlongValue\x12#\n" + + "\fstring_value\x18\x05 \x01(\tH\x00R\vstringValue\x12E\n" + + "\x0ftimestamp_value\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\x0etimestampValue\x12/\n" + + "\n" + + "int_values\x18\a \x01(\v2\x0e.api.IntValuesH\x00R\tintValues\x122\n" + + "\vlong_values\x18\b \x01(\v2\x0f.api.LongValuesH\x00R\n" + + "longValues\x128\n" + + "\rstring_values\x18\t \x01(\v2\x11.api.StringValuesH\x00R\fstringValues\"\x97\x01\n" + + "\x02Op\x12\v\n" + + "\aUNKNOWN\x10\x00\x12\n" + + "\n" + + "\x06EQUALS\x10\x01\x12\x0e\n" + + "\n" + + "NOT_EQUALS\x10\x02\x12\x10\n" + + "\fGREATER_THAN\x10\x03\x12\x17\n" + + "\x13GREATER_THAN_EQUALS\x10\x05\x12\r\n" + + "\tLESS_THAN\x10\x06\x12\x14\n" + + "\x10LESS_THAN_EQUALS\x10\a\x12\x06\n" + + "\x02IN\x10\b\x12\x10\n" + + "\fIS_SUBSTRING\x10\tB\a\n" + + "\x05value\"#\n" + + "\tIntValues\x12\x16\n" + + "\x06values\x18\x01 \x03(\x05R\x06values\"&\n" + + "\fStringValues\x12\x16\n" + + "\x06values\x18\x02 \x03(\tR\x06values\"$\n" + + "\n" + + "LongValues\x12\x16\n" + + "\x06values\x18\x03 \x03(\x03R\x06values\"8\n" + + "\x06Filter\x12.\n" + + "\n" + + "predicates\x18\x01 \x03(\v2\x0e.api.PredicateR\n" + + "predicates2=\n" + + "\x12DummyFilterService\x12'\n" + + "\tGetFilter\x12\v.api.Filter\x1a\v.api.Filter\"\x00B=Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_filter_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_filter_proto_rawDescData = file_backend_api_v1beta1_filter_proto_rawDesc + file_backend_api_v1beta1_filter_proto_rawDescData []byte ) func file_backend_api_v1beta1_filter_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_filter_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_filter_proto_rawDescData) + file_backend_api_v1beta1_filter_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_filter_proto_rawDesc), len(file_backend_api_v1beta1_filter_proto_rawDesc))) }) return file_backend_api_v1beta1_filter_proto_rawDescData } var file_backend_api_v1beta1_filter_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_backend_api_v1beta1_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_backend_api_v1beta1_filter_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_filter_proto_goTypes = []any{ (Predicate_Op)(0), // 0: api.Predicate.Op (*Predicate)(nil), // 1: api.Predicate (*IntValues)(nil), // 2: api.IntValues @@ -627,69 +601,7 @@ func file_backend_api_v1beta1_filter_proto_init() { if File_backend_api_v1beta1_filter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Predicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_filter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IntValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_filter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StringValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_filter_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LongValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_filter_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_backend_api_v1beta1_filter_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_backend_api_v1beta1_filter_proto_msgTypes[0].OneofWrappers = []any{ (*Predicate_IntValue)(nil), (*Predicate_LongValue)(nil), (*Predicate_StringValue)(nil), @@ -702,7 +614,7 @@ func file_backend_api_v1beta1_filter_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_filter_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_filter_proto_rawDesc), len(file_backend_api_v1beta1_filter_proto_rawDesc)), NumEnums: 1, NumMessages: 5, NumExtensions: 0, @@ -714,87 +626,6 @@ func file_backend_api_v1beta1_filter_proto_init() { MessageInfos: file_backend_api_v1beta1_filter_proto_msgTypes, }.Build() File_backend_api_v1beta1_filter_proto = out.File - file_backend_api_v1beta1_filter_proto_rawDesc = nil file_backend_api_v1beta1_filter_proto_goTypes = nil file_backend_api_v1beta1_filter_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// DummyFilterServiceClient is the client API for DummyFilterService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type DummyFilterServiceClient interface { - GetFilter(ctx context.Context, in *Filter, opts ...grpc.CallOption) (*Filter, error) -} - -type dummyFilterServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewDummyFilterServiceClient(cc grpc.ClientConnInterface) DummyFilterServiceClient { - return &dummyFilterServiceClient{cc} -} - -func (c *dummyFilterServiceClient) GetFilter(ctx context.Context, in *Filter, opts ...grpc.CallOption) (*Filter, error) { - out := new(Filter) - err := c.cc.Invoke(ctx, "/api.DummyFilterService/GetFilter", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DummyFilterServiceServer is the server API for DummyFilterService service. -type DummyFilterServiceServer interface { - GetFilter(context.Context, *Filter) (*Filter, error) -} - -// UnimplementedDummyFilterServiceServer can be embedded to have forward compatible implementations. -type UnimplementedDummyFilterServiceServer struct { -} - -func (*UnimplementedDummyFilterServiceServer) GetFilter(context.Context, *Filter) (*Filter, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFilter not implemented") -} - -func RegisterDummyFilterServiceServer(s *grpc.Server, srv DummyFilterServiceServer) { - s.RegisterService(&_DummyFilterService_serviceDesc, srv) -} - -func _DummyFilterService_GetFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Filter) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DummyFilterServiceServer).GetFilter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.DummyFilterService/GetFilter", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DummyFilterServiceServer).GetFilter(ctx, req.(*Filter)) - } - return interceptor(ctx, in, info, handler) -} - -var _DummyFilterService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.DummyFilterService", - HandlerType: (*DummyFilterServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetFilter", - Handler: _DummyFilterService_GetFilter_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/filter.proto", -} diff --git a/backend/api/v1beta1/go_client/filter_grpc.pb.go b/backend/api/v1beta1/go_client/filter_grpc.pb.go new file mode 100644 index 00000000000..a5cdbb5a07d --- /dev/null +++ b/backend/api/v1beta1/go_client/filter_grpc.pb.go @@ -0,0 +1,145 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/filter.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + DummyFilterService_GetFilter_FullMethodName = "/api.DummyFilterService/GetFilter" +) + +// DummyFilterServiceClient is the client API for DummyFilterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// This dummy service is required so that grpc-gateway will generate Swagger +// definitions for the Filter message. Otherwise, it does not get generated +// since Filter itself is not used in any of the RPC calls - only a serialized +// encoded version of it is used. +type DummyFilterServiceClient interface { + GetFilter(ctx context.Context, in *Filter, opts ...grpc.CallOption) (*Filter, error) +} + +type dummyFilterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDummyFilterServiceClient(cc grpc.ClientConnInterface) DummyFilterServiceClient { + return &dummyFilterServiceClient{cc} +} + +func (c *dummyFilterServiceClient) GetFilter(ctx context.Context, in *Filter, opts ...grpc.CallOption) (*Filter, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Filter) + err := c.cc.Invoke(ctx, DummyFilterService_GetFilter_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DummyFilterServiceServer is the server API for DummyFilterService service. +// All implementations must embed UnimplementedDummyFilterServiceServer +// for forward compatibility. +// +// This dummy service is required so that grpc-gateway will generate Swagger +// definitions for the Filter message. Otherwise, it does not get generated +// since Filter itself is not used in any of the RPC calls - only a serialized +// encoded version of it is used. +type DummyFilterServiceServer interface { + GetFilter(context.Context, *Filter) (*Filter, error) + mustEmbedUnimplementedDummyFilterServiceServer() +} + +// UnimplementedDummyFilterServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDummyFilterServiceServer struct{} + +func (UnimplementedDummyFilterServiceServer) GetFilter(context.Context, *Filter) (*Filter, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFilter not implemented") +} +func (UnimplementedDummyFilterServiceServer) mustEmbedUnimplementedDummyFilterServiceServer() {} +func (UnimplementedDummyFilterServiceServer) testEmbeddedByValue() {} + +// UnsafeDummyFilterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DummyFilterServiceServer will +// result in compilation errors. +type UnsafeDummyFilterServiceServer interface { + mustEmbedUnimplementedDummyFilterServiceServer() +} + +func RegisterDummyFilterServiceServer(s grpc.ServiceRegistrar, srv DummyFilterServiceServer) { + // If the following call pancis, it indicates UnimplementedDummyFilterServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&DummyFilterService_ServiceDesc, srv) +} + +func _DummyFilterService_GetFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Filter) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DummyFilterServiceServer).GetFilter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DummyFilterService_GetFilter_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DummyFilterServiceServer).GetFilter(ctx, req.(*Filter)) + } + return interceptor(ctx, in, info, handler) +} + +// DummyFilterService_ServiceDesc is the grpc.ServiceDesc for DummyFilterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DummyFilterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.DummyFilterService", + HandlerType: (*DummyFilterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetFilter", + Handler: _DummyFilterService_GetFilter_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/filter.proto", +} diff --git a/backend/api/v1beta1/go_client/healthz.pb.go b/backend/api/v1beta1/go_client/healthz.pb.go index 2ffee3cb906..df2e91b38ba 100644 --- a/backend/api/v1beta1/go_client/healthz.pb.go +++ b/backend/api/v1beta1/go_client/healthz.pb.go @@ -14,24 +14,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/healthz.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -42,21 +39,18 @@ const ( ) type GetHealthzResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Returns if KFP in multi-user mode - MultiUser bool `protobuf:"varint,3,opt,name=multi_user,json=multiUser,proto3" json:"multi_user,omitempty"` + MultiUser bool `protobuf:"varint,3,opt,name=multi_user,json=multiUser,proto3" json:"multi_user,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetHealthzResponse) Reset() { *x = GetHealthzResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_healthz_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_healthz_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHealthzResponse) String() string { @@ -67,7 +61,7 @@ func (*GetHealthzResponse) ProtoMessage() {} func (x *GetHealthzResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_healthz_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91,55 +85,37 @@ func (x *GetHealthzResponse) GetMultiUser() bool { var File_backend_api_v1beta1_healthz_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_healthz_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, - 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x55, 0x73, 0x65, 0x72, 0x32, 0x6e, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x7a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x42, 0x91, 0x01, 0x92, 0x41, 0x51, 0x2a, 0x02, 0x01, - 0x02, 0x52, 0x1c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x12, 0x0f, - 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, - 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, - 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, - 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x3b, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_healthz_proto_rawDesc = "" + + "\n" + + "!backend/api/v1beta1/healthz.proto\x12\x03api\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"3\n" + + "\x12GetHealthzResponse\x12\x1d\n" + + "\n" + + "multi_user\x18\x03 \x01(\bR\tmultiUser2n\n" + + "\x0eHealthzService\x12\\\n" + + "\n" + + "GetHealthz\x12\x16.google.protobuf.Empty\x1a\x17.api.GetHealthzResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/apis/v1beta1/healthzB\x91\x01\x92AQ*\x02\x01\x02R\x1c\n" + + "\adefault\x12\x11\x12\x0f\n" + + "\r\x1a\v.api.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_healthz_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_healthz_proto_rawDescData = file_backend_api_v1beta1_healthz_proto_rawDesc + file_backend_api_v1beta1_healthz_proto_rawDescData []byte ) func file_backend_api_v1beta1_healthz_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_healthz_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_healthz_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_healthz_proto_rawDescData) + file_backend_api_v1beta1_healthz_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_healthz_proto_rawDesc), len(file_backend_api_v1beta1_healthz_proto_rawDesc))) }) return file_backend_api_v1beta1_healthz_proto_rawDescData } var file_backend_api_v1beta1_healthz_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_backend_api_v1beta1_healthz_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_healthz_proto_goTypes = []any{ (*GetHealthzResponse)(nil), // 0: api.GetHealthzResponse (*emptypb.Empty)(nil), // 1: google.protobuf.Empty } @@ -158,26 +134,11 @@ func file_backend_api_v1beta1_healthz_proto_init() { if File_backend_api_v1beta1_healthz_proto != nil { return } - file_backend_api_v1beta1_error_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_healthz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHealthzResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_healthz_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_healthz_proto_rawDesc), len(file_backend_api_v1beta1_healthz_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -188,89 +149,6 @@ func file_backend_api_v1beta1_healthz_proto_init() { MessageInfos: file_backend_api_v1beta1_healthz_proto_msgTypes, }.Build() File_backend_api_v1beta1_healthz_proto = out.File - file_backend_api_v1beta1_healthz_proto_rawDesc = nil file_backend_api_v1beta1_healthz_proto_goTypes = nil file_backend_api_v1beta1_healthz_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// HealthzServiceClient is the client API for HealthzService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HealthzServiceClient interface { - // Get healthz data. - GetHealthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHealthzResponse, error) -} - -type healthzServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewHealthzServiceClient(cc grpc.ClientConnInterface) HealthzServiceClient { - return &healthzServiceClient{cc} -} - -func (c *healthzServiceClient) GetHealthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHealthzResponse, error) { - out := new(GetHealthzResponse) - err := c.cc.Invoke(ctx, "/api.HealthzService/GetHealthz", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HealthzServiceServer is the server API for HealthzService service. -type HealthzServiceServer interface { - // Get healthz data. - GetHealthz(context.Context, *emptypb.Empty) (*GetHealthzResponse, error) -} - -// UnimplementedHealthzServiceServer can be embedded to have forward compatible implementations. -type UnimplementedHealthzServiceServer struct { -} - -func (*UnimplementedHealthzServiceServer) GetHealthz(context.Context, *emptypb.Empty) (*GetHealthzResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHealthz not implemented") -} - -func RegisterHealthzServiceServer(s *grpc.Server, srv HealthzServiceServer) { - s.RegisterService(&_HealthzService_serviceDesc, srv) -} - -func _HealthzService_GetHealthz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HealthzServiceServer).GetHealthz(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.HealthzService/GetHealthz", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthzServiceServer).GetHealthz(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _HealthzService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.HealthzService", - HandlerType: (*HealthzServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetHealthz", - Handler: _HealthzService_GetHealthz_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/healthz.proto", -} diff --git a/backend/api/v1beta1/go_client/healthz.pb.gw.go b/backend/api/v1beta1/go_client/healthz.pb.gw.go index 960de060c97..94f069393fa 100644 --- a/backend/api/v1beta1/go_client/healthz.pb.gw.go +++ b/backend/api/v1beta1/go_client/healthz.pb.gw.go @@ -10,75 +10,78 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_HealthzService_GetHealthz_0(ctx context.Context, marshaler runtime.Marshaler, client HealthzServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq emptypb.Empty - var metadata runtime.ServerMetadata - + var ( + protoReq emptypb.Empty + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetHealthz(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_HealthzService_GetHealthz_0(ctx context.Context, marshaler runtime.Marshaler, server HealthzServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq emptypb.Empty - var metadata runtime.ServerMetadata - + var ( + protoReq emptypb.Empty + metadata runtime.ServerMetadata + ) msg, err := server.GetHealthz(ctx, &protoReq) return msg, metadata, err - } // RegisterHealthzServiceHandlerServer registers the http handlers for service HealthzService to "mux". // UnaryRPC :call HealthzServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthzServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterHealthzServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthzServiceServer) error { - - mux.Handle("GET", pattern_HealthzService_GetHealthz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_HealthzService_GetHealthz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.HealthzService/GetHealthz", runtime.WithHTTPPathPattern("/apis/v1beta1/healthz")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_HealthzService_GetHealthz_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_HealthzService_GetHealthz_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_HealthzService_GetHealthz_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_HealthzService_GetHealthz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -87,25 +90,24 @@ func RegisterHealthzServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterHealthzServiceHandlerFromEndpoint is same as RegisterHealthzServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterHealthzServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterHealthzServiceHandler(ctx, mux, conn) } @@ -119,34 +121,30 @@ func RegisterHealthzServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HealthzServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HealthzServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "HealthzServiceClient" to call the correct interceptors. +// "HealthzServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterHealthzServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthzServiceClient) error { - - mux.Handle("GET", pattern_HealthzService_GetHealthz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_HealthzService_GetHealthz_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.HealthzService/GetHealthz", runtime.WithHTTPPathPattern("/apis/v1beta1/healthz")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_HealthzService_GetHealthz_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_HealthzService_GetHealthz_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_HealthzService_GetHealthz_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_HealthzService_GetHealthz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_HealthzService_GetHealthz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "healthz"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_HealthzService_GetHealthz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "healthz"}, "")) ) var ( diff --git a/backend/api/v1beta1/go_client/healthz_grpc.pb.go b/backend/api/v1beta1/go_client/healthz_grpc.pb.go new file mode 100644 index 00000000000..8e934dbe508 --- /dev/null +++ b/backend/api/v1beta1/go_client/healthz_grpc.pb.go @@ -0,0 +1,138 @@ +// Copyright 2020 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/healthz.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + HealthzService_GetHealthz_FullMethodName = "/api.HealthzService/GetHealthz" +) + +// HealthzServiceClient is the client API for HealthzService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HealthzServiceClient interface { + // Get healthz data. + GetHealthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHealthzResponse, error) +} + +type healthzServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHealthzServiceClient(cc grpc.ClientConnInterface) HealthzServiceClient { + return &healthzServiceClient{cc} +} + +func (c *healthzServiceClient) GetHealthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHealthzResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetHealthzResponse) + err := c.cc.Invoke(ctx, HealthzService_GetHealthz_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HealthzServiceServer is the server API for HealthzService service. +// All implementations must embed UnimplementedHealthzServiceServer +// for forward compatibility. +type HealthzServiceServer interface { + // Get healthz data. + GetHealthz(context.Context, *emptypb.Empty) (*GetHealthzResponse, error) + mustEmbedUnimplementedHealthzServiceServer() +} + +// UnimplementedHealthzServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedHealthzServiceServer struct{} + +func (UnimplementedHealthzServiceServer) GetHealthz(context.Context, *emptypb.Empty) (*GetHealthzResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHealthz not implemented") +} +func (UnimplementedHealthzServiceServer) mustEmbedUnimplementedHealthzServiceServer() {} +func (UnimplementedHealthzServiceServer) testEmbeddedByValue() {} + +// UnsafeHealthzServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HealthzServiceServer will +// result in compilation errors. +type UnsafeHealthzServiceServer interface { + mustEmbedUnimplementedHealthzServiceServer() +} + +func RegisterHealthzServiceServer(s grpc.ServiceRegistrar, srv HealthzServiceServer) { + // If the following call pancis, it indicates UnimplementedHealthzServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&HealthzService_ServiceDesc, srv) +} + +func _HealthzService_GetHealthz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthzServiceServer).GetHealthz(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HealthzService_GetHealthz_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthzServiceServer).GetHealthz(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +// HealthzService_ServiceDesc is the grpc.ServiceDesc for HealthzService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HealthzService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.HealthzService", + HandlerType: (*HealthzServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetHealthz", + Handler: _HealthzService_GetHealthz_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/healthz.proto", +} diff --git a/backend/api/v1beta1/go_client/job.pb.go b/backend/api/v1beta1/go_client/job.pb.go index 93e56b7f7b3..78ef93d97cb 100644 --- a/backend/api/v1beta1/go_client/job.pb.go +++ b/backend/api/v1beta1/go_client/job.pb.go @@ -14,25 +14,22 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/job.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -94,21 +91,18 @@ func (Job_Mode) EnumDescriptor() ([]byte, []int) { } type CreateJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The job to be created - Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` + Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateJobRequest) Reset() { *x = CreateJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateJobRequest) String() string { @@ -119,7 +113,7 @@ func (*CreateJobRequest) ProtoMessage() {} func (x *CreateJobRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,21 +136,18 @@ func (x *CreateJobRequest) GetJob() *Job { } type GetJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the job to be retrieved - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetJobRequest) Reset() { *x = GetJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetJobRequest) String() string { @@ -167,7 +158,7 @@ func (*GetJobRequest) ProtoMessage() {} func (x *GetJobRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,10 +181,7 @@ func (x *GetJobRequest) GetId() string { } type ListJobsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListJobs call or can be omitted when fetching the first page. @@ -211,16 +199,16 @@ type ListJobsRequest struct { ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). - Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListJobsRequest) Reset() { *x = ListJobsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsRequest) String() string { @@ -231,7 +219,7 @@ func (*ListJobsRequest) ProtoMessage() {} func (x *ListJobsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,25 +270,22 @@ func (x *ListJobsRequest) GetFilter() string { } type ListJobsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of jobs returned. Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"` // The total number of jobs for the given query. TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` // The token to list the next page of jobs. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListJobsResponse) Reset() { *x = ListJobsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListJobsResponse) String() string { @@ -311,7 +296,7 @@ func (*ListJobsResponse) ProtoMessage() {} func (x *ListJobsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,21 +333,18 @@ func (x *ListJobsResponse) GetNextPageToken() string { } type DeleteJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the job to be deleted - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteJobRequest) Reset() { *x = DeleteJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteJobRequest) String() string { @@ -373,7 +355,7 @@ func (*DeleteJobRequest) ProtoMessage() {} func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -396,21 +378,18 @@ func (x *DeleteJobRequest) GetId() string { } type EnableJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the job to be enabled - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EnableJobRequest) Reset() { *x = EnableJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableJobRequest) String() string { @@ -421,7 +400,7 @@ func (*EnableJobRequest) ProtoMessage() {} func (x *EnableJobRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,21 +423,18 @@ func (x *EnableJobRequest) GetId() string { } type DisableJobRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the job to be disabled - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DisableJobRequest) Reset() { *x = DisableJobRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableJobRequest) String() string { @@ -469,7 +445,7 @@ func (*DisableJobRequest) ProtoMessage() {} func (x *DisableJobRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -493,26 +469,23 @@ func (x *DisableJobRequest) GetId() string { // CronSchedule allow scheduling the job with unix-like cron type CronSchedule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The start time of the cron job StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // The end time of the cron job EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // The cron string. For details how to compose a cron, visit // ttps://en.wikipedia.org/wiki/Cron - Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"` + Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CronSchedule) Reset() { *x = CronSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CronSchedule) String() string { @@ -523,7 +496,7 @@ func (*CronSchedule) ProtoMessage() {} func (x *CronSchedule) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,25 +534,22 @@ func (x *CronSchedule) GetCron() string { // PeriodicSchedule allow scheduling the job periodically with certain interval type PeriodicSchedule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The start time of the periodic job StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // The end time of the periodic job EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // The time interval between the starting time of consecutive jobs IntervalSecond int64 `protobuf:"varint,3,opt,name=interval_second,json=intervalSecond,proto3" json:"interval_second,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PeriodicSchedule) Reset() { *x = PeriodicSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PeriodicSchedule) String() string { @@ -590,7 +560,7 @@ func (*PeriodicSchedule) ProtoMessage() {} func (x *PeriodicSchedule) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -628,24 +598,21 @@ func (x *PeriodicSchedule) GetIntervalSecond() int64 { // Trigger defines what starts a pipeline run. type Trigger struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Trigger: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Trigger: // // *Trigger_CronSchedule // *Trigger_PeriodicSchedule - Trigger isTrigger_Trigger `protobuf_oneof:"trigger"` + Trigger isTrigger_Trigger `protobuf_oneof:"trigger"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Trigger) Reset() { *x = Trigger{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trigger) String() string { @@ -656,7 +623,7 @@ func (*Trigger) ProtoMessage() {} func (x *Trigger) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -671,23 +638,27 @@ func (*Trigger) Descriptor() ([]byte, []int) { return file_backend_api_v1beta1_job_proto_rawDescGZIP(), []int{9} } -func (m *Trigger) GetTrigger() isTrigger_Trigger { - if m != nil { - return m.Trigger +func (x *Trigger) GetTrigger() isTrigger_Trigger { + if x != nil { + return x.Trigger } return nil } func (x *Trigger) GetCronSchedule() *CronSchedule { - if x, ok := x.GetTrigger().(*Trigger_CronSchedule); ok { - return x.CronSchedule + if x != nil { + if x, ok := x.Trigger.(*Trigger_CronSchedule); ok { + return x.CronSchedule + } } return nil } func (x *Trigger) GetPeriodicSchedule() *PeriodicSchedule { - if x, ok := x.GetTrigger().(*Trigger_PeriodicSchedule); ok { - return x.PeriodicSchedule + if x != nil { + if x, ok := x.Trigger.(*Trigger_PeriodicSchedule); ok { + return x.PeriodicSchedule + } } return nil } @@ -709,10 +680,7 @@ func (*Trigger_CronSchedule) isTrigger_Trigger() {} func (*Trigger_PeriodicSchedule) isTrigger_Trigger() {} type Job struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique run ID. Generated by API server. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Required input field. Job name provided by user. Not unique. @@ -750,16 +718,16 @@ type Job struct { // Optional input field. Whether the job should catch up if behind schedule. // If true, the job will only schedule the latest interval if behind schedule. // If false, the job will catch up on each past interval. - NoCatchup bool `protobuf:"varint,17,opt,name=no_catchup,json=noCatchup,proto3" json:"no_catchup,omitempty"` + NoCatchup bool `protobuf:"varint,17,opt,name=no_catchup,json=noCatchup,proto3" json:"no_catchup,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Job) Reset() { *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_job_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_job_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Job) String() string { @@ -770,7 +738,7 @@ func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_job_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,189 +860,101 @@ func (x *Job) GetNoCatchup() bool { var File_backend_api_v1beta1_job_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_job_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6a, 0x6f, - 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x6f, - 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x1f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, - 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, - 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, - 0x12, 0x46, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, - 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x22, 0x77, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6a, 0x6f, - 0x62, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, - 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x22, 0x0a, 0x10, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, - 0x10, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x94, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x6f, 0x6e, 0x53, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x22, 0xad, 0x01, - 0x0a, 0x10, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, - 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x22, 0x94, 0x01, - 0x0a, 0x07, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x0d, 0x63, 0x72, 0x6f, - 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x5f, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, - 0x63, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x22, 0xfb, 0x04, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0c, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, - 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, - 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x21, 0x0a, - 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, - 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x63, 0x61, 0x74, 0x63, 0x68, 0x75, 0x70, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x6e, 0x6f, 0x43, 0x61, 0x74, 0x63, 0x68, 0x75, 0x70, 0x22, 0x33, 0x0a, - 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, - 0x10, 0x02, 0x32, 0xa1, 0x04, 0x0a, 0x0a, 0x4a, 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x6f, 0x62, 0x22, - 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x12, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, - 0x12, 0x47, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x08, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x6f, 0x62, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x53, 0x0a, 0x08, 0x4c, 0x69, 0x73, - 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x12, 0x62, - 0x0a, 0x09, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x20, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x65, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, 0x62, - 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4a, 0x6f, - 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x5b, 0x0a, 0x09, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6a, 0x6f, 0x62, - 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x91, 0x01, 0x92, 0x41, 0x51, 0x2a, 0x02, 0x01, 0x02, - 0x52, 0x1c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x12, 0x0f, 0x0a, - 0x0d, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, - 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, - 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x3b, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} +const file_backend_api_v1beta1_job_proto_rawDesc = "" + + "\n" + + "\x1dbackend/api/v1beta1/job.proto\x12\x03api\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a'backend/api/v1beta1/pipeline_spec.proto\x1a,backend/api/v1beta1/resource_reference.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\".\n" + + "\x10CreateJobRequest\x12\x1a\n" + + "\x03job\x18\x01 \x01(\v2\b.api.JobR\x03job\"\x1f\n" + + "\rGetJobRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\xc6\x01\n" + + "\x0fListJobsRequest\x12\x1d\n" + + "\n" + + "page_token\x18\x01 \x01(\tR\tpageToken\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x17\n" + + "\asort_by\x18\x03 \x01(\tR\x06sortBy\x12F\n" + + "\x16resource_reference_key\x18\x04 \x01(\v2\x10.api.ResourceKeyR\x14resourceReferenceKey\x12\x16\n" + + "\x06filter\x18\x05 \x01(\tR\x06filter\"w\n" + + "\x10ListJobsResponse\x12\x1c\n" + + "\x04jobs\x18\x01 \x03(\v2\b.api.JobR\x04jobs\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\"\n" + + "\x10DeleteJobRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\"\n" + + "\x10EnableJobRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"#\n" + + "\x11DisableJobRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x94\x01\n" + + "\fCronSchedule\x129\n" + + "\n" + + "start_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x125\n" + + "\bend_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\aendTime\x12\x12\n" + + "\x04cron\x18\x03 \x01(\tR\x04cron\"\xad\x01\n" + + "\x10PeriodicSchedule\x129\n" + + "\n" + + "start_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x125\n" + + "\bend_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\aendTime\x12'\n" + + "\x0finterval_second\x18\x03 \x01(\x03R\x0eintervalSecond\"\x94\x01\n" + + "\aTrigger\x128\n" + + "\rcron_schedule\x18\x01 \x01(\v2\x11.api.CronScheduleH\x00R\fcronSchedule\x12D\n" + + "\x11periodic_schedule\x18\x02 \x01(\v2\x15.api.PeriodicScheduleH\x00R\x10periodicScheduleB\t\n" + + "\atrigger\"\xfb\x04\n" + + "\x03Job\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x126\n" + + "\rpipeline_spec\x18\x04 \x01(\v2\x11.api.PipelineSpecR\fpipelineSpec\x12G\n" + + "\x13resource_references\x18\x05 \x03(\v2\x16.api.ResourceReferenceR\x12resourceReferences\x12'\n" + + "\x0fservice_account\x18\x12 \x01(\tR\x0eserviceAccount\x12'\n" + + "\x0fmax_concurrency\x18\x06 \x01(\x03R\x0emaxConcurrency\x12&\n" + + "\atrigger\x18\a \x01(\v2\f.api.TriggerR\atrigger\x12!\n" + + "\x04mode\x18\b \x01(\x0e2\r.api.Job.ModeR\x04mode\x129\n" + + "\n" + + "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x16\n" + + "\x06status\x18\v \x01(\tR\x06status\x12\x14\n" + + "\x05error\x18\f \x01(\tR\x05error\x12\x18\n" + + "\aenabled\x18\x10 \x01(\bR\aenabled\x12\x1d\n" + + "\n" + + "no_catchup\x18\x11 \x01(\bR\tnoCatchup\"3\n" + + "\x04Mode\x12\x10\n" + + "\fUNKNOWN_MODE\x10\x00\x12\v\n" + + "\aENABLED\x10\x01\x12\f\n" + + "\bDISABLED\x10\x022\xa1\x04\n" + + "\n" + + "JobService\x12M\n" + + "\tCreateJob\x12\x15.api.CreateJobRequest\x1a\b.api.Job\"\x1f\x82\xd3\xe4\x93\x02\x19:\x03job\"\x12/apis/v1beta1/jobs\x12G\n" + + "\x06GetJob\x12\x12.api.GetJobRequest\x1a\b.api.Job\"\x1f\x82\xd3\xe4\x93\x02\x19\x12\x17/apis/v1beta1/jobs/{id}\x12S\n" + + "\bListJobs\x12\x14.api.ListJobsRequest\x1a\x15.api.ListJobsResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/apis/v1beta1/jobs\x12b\n" + + "\tEnableJob\x12\x15.api.EnableJobRequest\x1a\x16.google.protobuf.Empty\"&\x82\xd3\xe4\x93\x02 \"\x1e/apis/v1beta1/jobs/{id}/enable\x12e\n" + + "\n" + + "DisableJob\x12\x16.api.DisableJobRequest\x1a\x16.google.protobuf.Empty\"'\x82\xd3\xe4\x93\x02!\"\x1f/apis/v1beta1/jobs/{id}/disable\x12[\n" + + "\tDeleteJob\x12\x15.api.DeleteJobRequest\x1a\x16.google.protobuf.Empty\"\x1f\x82\xd3\xe4\x93\x02\x19*\x17/apis/v1beta1/jobs/{id}B\x91\x01\x92AQ*\x02\x01\x02R\x1c\n" + + "\adefault\x12\x11\x12\x0f\n" + + "\r\x1a\v.api.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_job_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_job_proto_rawDescData = file_backend_api_v1beta1_job_proto_rawDesc + file_backend_api_v1beta1_job_proto_rawDescData []byte ) func file_backend_api_v1beta1_job_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_job_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_job_proto_rawDescData) + file_backend_api_v1beta1_job_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_job_proto_rawDesc), len(file_backend_api_v1beta1_job_proto_rawDesc))) }) return file_backend_api_v1beta1_job_proto_rawDescData } var file_backend_api_v1beta1_job_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_backend_api_v1beta1_job_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_backend_api_v1beta1_job_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_job_proto_goTypes = []any{ (Job_Mode)(0), // 0: api.Job.Mode (*CreateJobRequest)(nil), // 1: api.CreateJobRequest (*GetJobRequest)(nil), // 2: api.GetJobRequest @@ -1135,142 +1015,7 @@ func file_backend_api_v1beta1_job_proto_init() { } file_backend_api_v1beta1_pipeline_spec_proto_init() file_backend_api_v1beta1_resource_reference_proto_init() - file_backend_api_v1beta1_error_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_job_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListJobsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListJobsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnableJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisableJobRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CronSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeriodicSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Trigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_job_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_backend_api_v1beta1_job_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_backend_api_v1beta1_job_proto_msgTypes[9].OneofWrappers = []any{ (*Trigger_CronSchedule)(nil), (*Trigger_PeriodicSchedule)(nil), } @@ -1278,7 +1023,7 @@ func file_backend_api_v1beta1_job_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_job_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_job_proto_rawDesc), len(file_backend_api_v1beta1_job_proto_rawDesc)), NumEnums: 1, NumMessages: 11, NumExtensions: 0, @@ -1290,279 +1035,6 @@ func file_backend_api_v1beta1_job_proto_init() { MessageInfos: file_backend_api_v1beta1_job_proto_msgTypes, }.Build() File_backend_api_v1beta1_job_proto = out.File - file_backend_api_v1beta1_job_proto_rawDesc = nil file_backend_api_v1beta1_job_proto_goTypes = nil file_backend_api_v1beta1_job_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// JobServiceClient is the client API for JobService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type JobServiceClient interface { - // Creates a new job. - CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) - // Finds a specific job by ID. - GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) - // Finds all jobs. - ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) - // Restarts a job that was previously stopped. All runs associated with the job will continue. - EnableJob(ctx context.Context, in *EnableJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Stops a job and all its associated runs. The job is not deleted. - DisableJob(ctx context.Context, in *DisableJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Deletes a job. - DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type jobServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewJobServiceClient(cc grpc.ClientConnInterface) JobServiceClient { - return &jobServiceClient{cc} -} - -func (c *jobServiceClient) CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) { - out := new(Job) - err := c.cc.Invoke(ctx, "/api.JobService/CreateJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) { - out := new(Job) - err := c.cc.Invoke(ctx, "/api.JobService/GetJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { - out := new(ListJobsResponse) - err := c.cc.Invoke(ctx, "/api.JobService/ListJobs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) EnableJob(ctx context.Context, in *EnableJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.JobService/EnableJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) DisableJob(ctx context.Context, in *DisableJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.JobService/DisableJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobServiceClient) DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.JobService/DeleteJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// JobServiceServer is the server API for JobService service. -type JobServiceServer interface { - // Creates a new job. - CreateJob(context.Context, *CreateJobRequest) (*Job, error) - // Finds a specific job by ID. - GetJob(context.Context, *GetJobRequest) (*Job, error) - // Finds all jobs. - ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) - // Restarts a job that was previously stopped. All runs associated with the job will continue. - EnableJob(context.Context, *EnableJobRequest) (*emptypb.Empty, error) - // Stops a job and all its associated runs. The job is not deleted. - DisableJob(context.Context, *DisableJobRequest) (*emptypb.Empty, error) - // Deletes a job. - DeleteJob(context.Context, *DeleteJobRequest) (*emptypb.Empty, error) -} - -// UnimplementedJobServiceServer can be embedded to have forward compatible implementations. -type UnimplementedJobServiceServer struct { -} - -func (*UnimplementedJobServiceServer) CreateJob(context.Context, *CreateJobRequest) (*Job, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateJob not implemented") -} -func (*UnimplementedJobServiceServer) GetJob(context.Context, *GetJobRequest) (*Job, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented") -} -func (*UnimplementedJobServiceServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") -} -func (*UnimplementedJobServiceServer) EnableJob(context.Context, *EnableJobRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method EnableJob not implemented") -} -func (*UnimplementedJobServiceServer) DisableJob(context.Context, *DisableJobRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DisableJob not implemented") -} -func (*UnimplementedJobServiceServer) DeleteJob(context.Context, *DeleteJobRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteJob not implemented") -} - -func RegisterJobServiceServer(s *grpc.Server, srv JobServiceServer) { - s.RegisterService(&_JobService_serviceDesc, srv) -} - -func _JobService_CreateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).CreateJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.JobService/CreateJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).CreateJob(ctx, req.(*CreateJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_GetJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).GetJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.JobService/GetJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).GetJob(ctx, req.(*GetJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListJobsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).ListJobs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.JobService/ListJobs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).ListJobs(ctx, req.(*ListJobsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_EnableJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnableJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).EnableJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.JobService/EnableJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).EnableJob(ctx, req.(*EnableJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_DisableJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DisableJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).DisableJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.JobService/DisableJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).DisableJob(ctx, req.(*DisableJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobService_DeleteJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobServiceServer).DeleteJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.JobService/DeleteJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobServiceServer).DeleteJob(ctx, req.(*DeleteJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _JobService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.JobService", - HandlerType: (*JobServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateJob", - Handler: _JobService_CreateJob_Handler, - }, - { - MethodName: "GetJob", - Handler: _JobService_GetJob_Handler, - }, - { - MethodName: "ListJobs", - Handler: _JobService_ListJobs_Handler, - }, - { - MethodName: "EnableJob", - Handler: _JobService_EnableJob_Handler, - }, - { - MethodName: "DisableJob", - Handler: _JobService_DisableJob_Handler, - }, - { - MethodName: "DeleteJob", - Handler: _JobService_DeleteJob_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/job.proto", -} diff --git a/backend/api/v1beta1/go_client/job.pb.gw.go b/backend/api/v1beta1/go_client/job.pb.gw.go index f7f28b57942..bcc08e3d72f 100644 --- a/backend/api/v1beta1/go_client/job.pb.gw.go +++ b/backend/api/v1beta1/go_client/job.pb.gw.go @@ -10,457 +10,374 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_JobService_CreateJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateJobRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Job); err != nil && err != io.EOF { + var ( + protoReq CreateJobRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Job); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreateJob(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_JobService_CreateJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateJobRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Job); err != nil && err != io.EOF { + var ( + protoReq CreateJobRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Job); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateJob(ctx, &protoReq) return msg, metadata, err - } func request_JobService_GetJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetJobRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetJobRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.GetJob(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_JobService_GetJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetJobRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetJobRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.GetJob(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_JobService_ListJobs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_JobService_ListJobs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_JobService_ListJobs_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListJobsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListJobsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_JobService_ListJobs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListJobs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_JobService_ListJobs_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListJobsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListJobsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_JobService_ListJobs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListJobs(ctx, &protoReq) return msg, metadata, err - } func request_JobService_EnableJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EnableJobRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq EnableJobRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.EnableJob(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_JobService_EnableJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EnableJobRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq EnableJobRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.EnableJob(ctx, &protoReq) return msg, metadata, err - } func request_JobService_DisableJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DisableJobRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DisableJobRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.DisableJob(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_JobService_DisableJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DisableJobRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DisableJobRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.DisableJob(ctx, &protoReq) return msg, metadata, err - } func request_JobService_DeleteJob_0(ctx context.Context, marshaler runtime.Marshaler, client JobServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteJobRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteJobRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.DeleteJob(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_JobService_DeleteJob_0(ctx context.Context, marshaler runtime.Marshaler, server JobServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteJobRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteJobRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.DeleteJob(ctx, &protoReq) return msg, metadata, err - } // RegisterJobServiceHandlerServer registers the http handlers for service JobService to "mux". // UnaryRPC :call JobServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterJobServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterJobServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server JobServiceServer) error { - - mux.Handle("POST", pattern_JobService_CreateJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_JobService_CreateJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.JobService/CreateJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_JobService_CreateJob_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_JobService_CreateJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_CreateJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_CreateJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_JobService_GetJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_JobService_GetJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.JobService/GetJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_JobService_GetJob_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_JobService_GetJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_GetJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_GetJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_JobService_ListJobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_JobService_ListJobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.JobService/ListJobs", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_JobService_ListJobs_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_JobService_ListJobs_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_ListJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_ListJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_JobService_EnableJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_JobService_EnableJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.JobService/EnableJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs/{id}/enable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_JobService_EnableJob_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_JobService_EnableJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_EnableJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_EnableJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_JobService_DisableJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_JobService_DisableJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.JobService/DisableJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs/{id}/disable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_JobService_DisableJob_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_JobService_DisableJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_DisableJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_DisableJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_JobService_DeleteJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_JobService_DeleteJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.JobService/DeleteJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_JobService_DeleteJob_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_JobService_DeleteJob_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_DeleteJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_DeleteJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -469,25 +386,24 @@ func RegisterJobServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterJobServiceHandlerFromEndpoint is same as RegisterJobServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterJobServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterJobServiceHandler(ctx, mux, conn) } @@ -501,156 +417,127 @@ func RegisterJobServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "JobServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "JobServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "JobServiceClient" to call the correct interceptors. +// "JobServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterJobServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client JobServiceClient) error { - - mux.Handle("POST", pattern_JobService_CreateJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_JobService_CreateJob_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.JobService/CreateJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_CreateJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_CreateJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_CreateJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_CreateJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_JobService_GetJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_JobService_GetJob_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.JobService/GetJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_GetJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_GetJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_GetJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_GetJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_JobService_ListJobs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_JobService_ListJobs_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.JobService/ListJobs", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_ListJobs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_ListJobs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_ListJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_ListJobs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_JobService_EnableJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_JobService_EnableJob_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.JobService/EnableJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs/{id}/enable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_EnableJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_EnableJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_EnableJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_EnableJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_JobService_DisableJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_JobService_DisableJob_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.JobService/DisableJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs/{id}/disable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_DisableJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_DisableJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_DisableJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_DisableJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_JobService_DeleteJob_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_JobService_DeleteJob_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.JobService/DeleteJob", runtime.WithHTTPPathPattern("/apis/v1beta1/jobs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_JobService_DeleteJob_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_JobService_DeleteJob_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_JobService_DeleteJob_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_JobService_DeleteJob_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_JobService_CreateJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "jobs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_JobService_GetJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "jobs", "id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_JobService_ListJobs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "jobs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_JobService_EnableJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "jobs", "id", "enable"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_JobService_DisableJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "jobs", "id", "disable"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_JobService_DeleteJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "jobs", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_JobService_CreateJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "jobs"}, "")) + pattern_JobService_GetJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "jobs", "id"}, "")) + pattern_JobService_ListJobs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "jobs"}, "")) + pattern_JobService_EnableJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "jobs", "id", "enable"}, "")) + pattern_JobService_DisableJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "jobs", "id", "disable"}, "")) + pattern_JobService_DeleteJob_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "jobs", "id"}, "")) ) var ( - forward_JobService_CreateJob_0 = runtime.ForwardResponseMessage - - forward_JobService_GetJob_0 = runtime.ForwardResponseMessage - - forward_JobService_ListJobs_0 = runtime.ForwardResponseMessage - - forward_JobService_EnableJob_0 = runtime.ForwardResponseMessage - + forward_JobService_CreateJob_0 = runtime.ForwardResponseMessage + forward_JobService_GetJob_0 = runtime.ForwardResponseMessage + forward_JobService_ListJobs_0 = runtime.ForwardResponseMessage + forward_JobService_EnableJob_0 = runtime.ForwardResponseMessage forward_JobService_DisableJob_0 = runtime.ForwardResponseMessage - - forward_JobService_DeleteJob_0 = runtime.ForwardResponseMessage + forward_JobService_DeleteJob_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v1beta1/go_client/job_grpc.pb.go b/backend/api/v1beta1/go_client/job_grpc.pb.go new file mode 100644 index 00000000000..22538386cb9 --- /dev/null +++ b/backend/api/v1beta1/go_client/job_grpc.pb.go @@ -0,0 +1,338 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/job.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + JobService_CreateJob_FullMethodName = "/api.JobService/CreateJob" + JobService_GetJob_FullMethodName = "/api.JobService/GetJob" + JobService_ListJobs_FullMethodName = "/api.JobService/ListJobs" + JobService_EnableJob_FullMethodName = "/api.JobService/EnableJob" + JobService_DisableJob_FullMethodName = "/api.JobService/DisableJob" + JobService_DeleteJob_FullMethodName = "/api.JobService/DeleteJob" +) + +// JobServiceClient is the client API for JobService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type JobServiceClient interface { + // Creates a new job. + CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) + // Finds a specific job by ID. + GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) + // Finds all jobs. + ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) + // Restarts a job that was previously stopped. All runs associated with the job will continue. + EnableJob(ctx context.Context, in *EnableJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Stops a job and all its associated runs. The job is not deleted. + DisableJob(ctx context.Context, in *DisableJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deletes a job. + DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type jobServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewJobServiceClient(cc grpc.ClientConnInterface) JobServiceClient { + return &jobServiceClient{cc} +} + +func (c *jobServiceClient) CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Job) + err := c.cc.Invoke(ctx, JobService_CreateJob_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Job) + err := c.cc.Invoke(ctx, JobService_GetJob_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListJobsResponse) + err := c.cc.Invoke(ctx, JobService_ListJobs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) EnableJob(ctx context.Context, in *EnableJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, JobService_EnableJob_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) DisableJob(ctx context.Context, in *DisableJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, JobService_DisableJob_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *jobServiceClient) DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, JobService_DeleteJob_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// JobServiceServer is the server API for JobService service. +// All implementations must embed UnimplementedJobServiceServer +// for forward compatibility. +type JobServiceServer interface { + // Creates a new job. + CreateJob(context.Context, *CreateJobRequest) (*Job, error) + // Finds a specific job by ID. + GetJob(context.Context, *GetJobRequest) (*Job, error) + // Finds all jobs. + ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) + // Restarts a job that was previously stopped. All runs associated with the job will continue. + EnableJob(context.Context, *EnableJobRequest) (*emptypb.Empty, error) + // Stops a job and all its associated runs. The job is not deleted. + DisableJob(context.Context, *DisableJobRequest) (*emptypb.Empty, error) + // Deletes a job. + DeleteJob(context.Context, *DeleteJobRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedJobServiceServer() +} + +// UnimplementedJobServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedJobServiceServer struct{} + +func (UnimplementedJobServiceServer) CreateJob(context.Context, *CreateJobRequest) (*Job, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateJob not implemented") +} +func (UnimplementedJobServiceServer) GetJob(context.Context, *GetJobRequest) (*Job, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented") +} +func (UnimplementedJobServiceServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") +} +func (UnimplementedJobServiceServer) EnableJob(context.Context, *EnableJobRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnableJob not implemented") +} +func (UnimplementedJobServiceServer) DisableJob(context.Context, *DisableJobRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisableJob not implemented") +} +func (UnimplementedJobServiceServer) DeleteJob(context.Context, *DeleteJobRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteJob not implemented") +} +func (UnimplementedJobServiceServer) mustEmbedUnimplementedJobServiceServer() {} +func (UnimplementedJobServiceServer) testEmbeddedByValue() {} + +// UnsafeJobServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to JobServiceServer will +// result in compilation errors. +type UnsafeJobServiceServer interface { + mustEmbedUnimplementedJobServiceServer() +} + +func RegisterJobServiceServer(s grpc.ServiceRegistrar, srv JobServiceServer) { + // If the following call pancis, it indicates UnimplementedJobServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&JobService_ServiceDesc, srv) +} + +func _JobService_CreateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).CreateJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_CreateJob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).CreateJob(ctx, req.(*CreateJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_GetJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).GetJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_GetJob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).GetJob(ctx, req.(*GetJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).ListJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_ListJobs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).ListJobs(ctx, req.(*ListJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_EnableJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnableJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).EnableJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_EnableJob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).EnableJob(ctx, req.(*EnableJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_DisableJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DisableJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).DisableJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_DisableJob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).DisableJob(ctx, req.(*DisableJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _JobService_DeleteJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobServiceServer).DeleteJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: JobService_DeleteJob_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobServiceServer).DeleteJob(ctx, req.(*DeleteJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// JobService_ServiceDesc is the grpc.ServiceDesc for JobService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var JobService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.JobService", + HandlerType: (*JobServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateJob", + Handler: _JobService_CreateJob_Handler, + }, + { + MethodName: "GetJob", + Handler: _JobService_GetJob_Handler, + }, + { + MethodName: "ListJobs", + Handler: _JobService_ListJobs_Handler, + }, + { + MethodName: "EnableJob", + Handler: _JobService_EnableJob_Handler, + }, + { + MethodName: "DisableJob", + Handler: _JobService_DisableJob_Handler, + }, + { + MethodName: "DeleteJob", + Handler: _JobService_DeleteJob_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/job.proto", +} diff --git a/backend/api/v1beta1/go_client/parameter.pb.go b/backend/api/v1beta1/go_client/parameter.pb.go index 5ca605e7717..8af3cd68936 100644 --- a/backend/api/v1beta1/go_client/parameter.pb.go +++ b/backend/api/v1beta1/go_client/parameter.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/parameter.proto package go_client @@ -25,6 +25,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -35,21 +36,18 @@ const ( ) type Parameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Parameter) Reset() { *x = Parameter{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_parameter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_parameter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Parameter) String() string { @@ -60,7 +58,7 @@ func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_parameter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -91,34 +89,27 @@ func (x *Parameter) GetValue() string { var File_backend_api_v1beta1_parameter_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_parameter_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x22, 0x35, 0x0a, 0x09, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_parameter_proto_rawDesc = "" + + "\n" + + "#backend/api/v1beta1/parameter.proto\x12\x03api\"5\n" + + "\tParameter\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05valueB=Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_parameter_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_parameter_proto_rawDescData = file_backend_api_v1beta1_parameter_proto_rawDesc + file_backend_api_v1beta1_parameter_proto_rawDescData []byte ) func file_backend_api_v1beta1_parameter_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_parameter_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_parameter_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_parameter_proto_rawDescData) + file_backend_api_v1beta1_parameter_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_parameter_proto_rawDesc), len(file_backend_api_v1beta1_parameter_proto_rawDesc))) }) return file_backend_api_v1beta1_parameter_proto_rawDescData } var file_backend_api_v1beta1_parameter_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_backend_api_v1beta1_parameter_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_parameter_proto_goTypes = []any{ (*Parameter)(nil), // 0: api.Parameter } var file_backend_api_v1beta1_parameter_proto_depIdxs = []int32{ @@ -134,25 +125,11 @@ func file_backend_api_v1beta1_parameter_proto_init() { if File_backend_api_v1beta1_parameter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_parameter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Parameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_parameter_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_parameter_proto_rawDesc), len(file_backend_api_v1beta1_parameter_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -163,7 +140,6 @@ func file_backend_api_v1beta1_parameter_proto_init() { MessageInfos: file_backend_api_v1beta1_parameter_proto_msgTypes, }.Build() File_backend_api_v1beta1_parameter_proto = out.File - file_backend_api_v1beta1_parameter_proto_rawDesc = nil file_backend_api_v1beta1_parameter_proto_goTypes = nil file_backend_api_v1beta1_parameter_proto_depIdxs = nil } diff --git a/backend/api/v1beta1/go_client/pipeline.pb.go b/backend/api/v1beta1/go_client/pipeline.pb.go index 4869f9d48fd..b298f225507 100644 --- a/backend/api/v1beta1/go_client/pipeline.pb.go +++ b/backend/api/v1beta1/go_client/pipeline.pb.go @@ -14,25 +14,22 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/pipeline.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -43,21 +40,18 @@ const ( ) type Url struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // URL of the pipeline definition or the pipeline version definition. - PipelineUrl string `protobuf:"bytes,1,opt,name=pipeline_url,json=pipelineUrl,proto3" json:"pipeline_url,omitempty"` + PipelineUrl string `protobuf:"bytes,1,opt,name=pipeline_url,json=pipelineUrl,proto3" json:"pipeline_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Url) Reset() { *x = Url{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Url) String() string { @@ -68,7 +62,7 @@ func (*Url) ProtoMessage() {} func (x *Url) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -94,20 +88,17 @@ func (x *Url) GetPipelineUrl() string { // and optionally a pipeline name. If name is not provided, file name is used as // pipeline name by default. Maximum size of 32MB is supported. type CreatePipelineRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Pipeline *Pipeline `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"` unknownFields protoimpl.UnknownFields - - Pipeline *Pipeline `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreatePipelineRequest) Reset() { *x = CreatePipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePipelineRequest) String() string { @@ -118,7 +109,7 @@ func (*CreatePipelineRequest) ProtoMessage() {} func (x *CreatePipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141,23 +132,20 @@ func (x *CreatePipelineRequest) GetPipeline() *Pipeline { } type UpdatePipelineDefaultVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the pipeline to be updated. PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` // The ID of the default version. - VersionId string `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + VersionId string `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UpdatePipelineDefaultVersionRequest) Reset() { *x = UpdatePipelineDefaultVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdatePipelineDefaultVersionRequest) String() string { @@ -168,7 +156,7 @@ func (*UpdatePipelineDefaultVersionRequest) ProtoMessage() {} func (x *UpdatePipelineDefaultVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,21 +186,18 @@ func (x *UpdatePipelineDefaultVersionRequest) GetVersionId() string { } type GetPipelineRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the pipeline to be retrieved. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPipelineRequest) Reset() { *x = GetPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineRequest) String() string { @@ -223,7 +208,7 @@ func (*GetPipelineRequest) ProtoMessage() {} func (x *GetPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,10 +231,7 @@ func (x *GetPipelineRequest) GetId() string { } type ListPipelinesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListPipelines call. @@ -268,15 +250,15 @@ type ListPipelinesRequest struct { // For Pipeline, the only valid resource type is Namespace. An sample query string could be // resource_reference_key.type=NAMESPACE&resource_reference_key.id=ns1 ResourceReferenceKey *ResourceKey `protobuf:"bytes,5,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPipelinesRequest) Reset() { *x = ListPipelinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelinesRequest) String() string { @@ -287,7 +269,7 @@ func (*ListPipelinesRequest) ProtoMessage() {} func (x *ListPipelinesRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,24 +320,21 @@ func (x *ListPipelinesRequest) GetResourceReferenceKey() *ResourceKey { } type ListPipelinesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pipelines []*Pipeline `protobuf:"bytes,1,rep,name=pipelines,proto3" json:"pipelines,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Pipelines []*Pipeline `protobuf:"bytes,1,rep,name=pipelines,proto3" json:"pipelines,omitempty"` // The total number of pipelines for the given query. TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` // The token to list the next page of pipelines. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPipelinesResponse) Reset() { *x = ListPipelinesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelinesResponse) String() string { @@ -366,7 +345,7 @@ func (*ListPipelinesResponse) ProtoMessage() {} func (x *ListPipelinesResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,26 +382,23 @@ func (x *ListPipelinesResponse) GetNextPageToken() string { } type GetPipelineByNameRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The Name of the pipeline to be retrieved. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The Namespace the pipeline belongs to. // In the case of shared pipelines and KFPipeline standalone installation, // the pipeline name is the only needed field for unique resource lookup (namespace is not required). // In those case, please provide hyphen (dash character, "-"). - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPipelineByNameRequest) Reset() { *x = GetPipelineByNameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineByNameRequest) String() string { @@ -433,7 +409,7 @@ func (*GetPipelineByNameRequest) ProtoMessage() {} func (x *GetPipelineByNameRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -463,21 +439,18 @@ func (x *GetPipelineByNameRequest) GetNamespace() string { } type DeletePipelineRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the pipeline to be deleted. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeletePipelineRequest) Reset() { *x = DeletePipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePipelineRequest) String() string { @@ -488,7 +461,7 @@ func (*DeletePipelineRequest) ProtoMessage() {} func (x *DeletePipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -511,21 +484,18 @@ func (x *DeletePipelineRequest) GetId() string { } type GetTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the pipeline whose template is to be retrieved. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetTemplateRequest) Reset() { *x = GetTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTemplateRequest) String() string { @@ -536,7 +506,7 @@ func (*GetTemplateRequest) ProtoMessage() {} func (x *GetTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -559,22 +529,19 @@ func (x *GetTemplateRequest) GetId() string { } type GetTemplateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The template of the pipeline specified in a GetTemplate request, or of a // pipeline version specified in a GetPipelinesVersionTemplate request. - Template string `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` + Template string `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetTemplateResponse) Reset() { *x = GetTemplateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTemplateResponse) String() string { @@ -585,7 +552,7 @@ func (*GetTemplateResponse) ProtoMessage() {} func (x *GetTemplateResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,21 +575,18 @@ func (x *GetTemplateResponse) GetTemplate() string { } type GetPipelineVersionTemplateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the pipeline version whose template is to be retrieved. - VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPipelineVersionTemplateRequest) Reset() { *x = GetPipelineVersionTemplateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineVersionTemplateRequest) String() string { @@ -633,7 +597,7 @@ func (*GetPipelineVersionTemplateRequest) ProtoMessage() {} func (x *GetPipelineVersionTemplateRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -656,22 +620,19 @@ func (x *GetPipelineVersionTemplateRequest) GetVersionId() string { } type CreatePipelineVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // ResourceReference inside PipelineVersion specifies the pipeline that this // version belongs to. - Version *PipelineVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Version *PipelineVersion `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreatePipelineVersionRequest) Reset() { *x = CreatePipelineVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePipelineVersionRequest) String() string { @@ -682,7 +643,7 @@ func (*CreatePipelineVersionRequest) ProtoMessage() {} func (x *CreatePipelineVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -705,21 +666,18 @@ func (x *CreatePipelineVersionRequest) GetVersion() *PipelineVersion { } type GetPipelineVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the pipeline version to be retrieved. - VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPipelineVersionRequest) Reset() { *x = GetPipelineVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineVersionRequest) String() string { @@ -730,7 +688,7 @@ func (*GetPipelineVersionRequest) ProtoMessage() {} func (x *GetPipelineVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -753,10 +711,7 @@ func (x *GetPipelineVersionRequest) GetVersionId() string { } type ListPipelineVersionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // ResourceKey specifies the pipeline whose versions are to be listed. ResourceKey *ResourceKey `protobuf:"bytes,1,opt,name=resource_key,json=resourceKey,proto3" json:"resource_key,omitempty"` // The number of pipeline versions to be listed per page. If there are more @@ -772,16 +727,16 @@ type ListPipelineVersionsRequest struct { SortBy string `protobuf:"bytes,4,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` // A base-64 encoded, JSON-serialized Filter protocol buffer (see // filter.proto). - Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPipelineVersionsRequest) Reset() { *x = ListPipelineVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelineVersionsRequest) String() string { @@ -792,7 +747,7 @@ func (*ListPipelineVersionsRequest) ProtoMessage() {} func (x *ListPipelineVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,24 +798,21 @@ func (x *ListPipelineVersionsRequest) GetFilter() string { } type ListPipelineVersionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Versions []*PipelineVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Versions []*PipelineVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions,omitempty"` // The token to list the next page of pipeline versions. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // The total number of pipeline versions for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPipelineVersionsResponse) Reset() { *x = ListPipelineVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelineVersionsResponse) String() string { @@ -871,7 +823,7 @@ func (*ListPipelineVersionsResponse) ProtoMessage() {} func (x *ListPipelineVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -908,21 +860,18 @@ func (x *ListPipelineVersionsResponse) GetTotalSize() int32 { } type DeletePipelineVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the pipeline version to be deleted. - VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + VersionId string `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeletePipelineVersionRequest) Reset() { *x = DeletePipelineVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePipelineVersionRequest) String() string { @@ -933,7 +882,7 @@ func (*DeletePipelineVersionRequest) ProtoMessage() {} func (x *DeletePipelineVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -956,10 +905,7 @@ func (x *DeletePipelineVersionRequest) GetVersionId() string { } type Pipeline struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique pipeline ID. Generated by API server. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Output. The time this pipeline is created. @@ -988,15 +934,15 @@ type Pipeline struct { // Input field. Specify which resource this pipeline belongs to. // For Pipeline, the only valid resource reference is a single Namespace. ResourceReferences []*ResourceReference `protobuf:"bytes,9,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Pipeline) Reset() { *x = Pipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline) String() string { @@ -1007,7 +953,7 @@ func (*Pipeline) ProtoMessage() {} func (x *Pipeline) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,10 +1032,7 @@ func (x *Pipeline) GetResourceReferences() []*ResourceReference { } type PipelineVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique version ID. Generated by API server. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Optional input field. Version name provided by user. @@ -1111,16 +1054,16 @@ type PipelineVersion struct { // For Experiment, the only valid resource reference is a single Namespace. ResourceReferences []*ResourceReference `protobuf:"bytes,7,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references,omitempty"` // Input. Optional. Description for the pipeline version. - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineVersion) Reset() { *x = PipelineVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineVersion) String() string { @@ -1131,7 +1074,7 @@ func (*PipelineVersion) ProtoMessage() {} func (x *PipelineVersion) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1204,284 +1147,125 @@ func (x *PipelineVersion) GetDescription() string { var File_backend_api_v1beta1_pipeline_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_pipeline_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x72, - 0x6c, 0x22, 0x42, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x65, 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0xcb, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, - 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, - 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, - 0x22, 0x8b, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x4c, - 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x79, 0x4e, - 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x27, 0x0a, 0x15, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x47, - 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x42, - 0x0a, 0x21, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xbf, - 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, - 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x22, 0x97, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x30, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, - 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x3d, 0x0a, 0x1c, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xf5, 0x02, 0x0a, 0x08, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x72, 0x6c, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3d, 0x0a, 0x0f, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x73, 0x22, 0xde, 0x02, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, - 0x6f, 0x64, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x29, 0x0a, 0x0b, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x72, 0x6c, 0x52, 0x0a, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x32, 0x9e, 0x0c, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x31, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x08, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x12, 0x5d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, - 0x31, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, - 0x82, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x42, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x56, 0x31, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x7d, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x69, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x56, 0x31, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, - 0x6c, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x56, 0x31, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, - 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x70, 0x0a, - 0x0b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, - 0x84, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x21, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, - 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x16, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x31, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x31, - 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x34, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2e, 0x2a, 0x2c, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0x9e, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x12, 0xae, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x22, - 0x42, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x7d, 0x42, 0x91, 0x01, 0x92, 0x41, 0x51, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x1c, 0x0a, - 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, - 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, - 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, - 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_pipeline_proto_rawDesc = "" + + "\n" + + "\"backend/api/v1beta1/pipeline.proto\x12\x03api\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a#backend/api/v1beta1/parameter.proto\x1a,backend/api/v1beta1/resource_reference.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"(\n" + + "\x03Url\x12!\n" + + "\fpipeline_url\x18\x01 \x01(\tR\vpipelineUrl\"B\n" + + "\x15CreatePipelineRequest\x12)\n" + + "\bpipeline\x18\x01 \x01(\v2\r.api.PipelineR\bpipeline\"e\n" + + "#UpdatePipelineDefaultVersionRequest\x12\x1f\n" + + "\vpipeline_id\x18\x01 \x01(\tR\n" + + "pipelineId\x12\x1d\n" + + "\n" + + "version_id\x18\x02 \x01(\tR\tversionId\"$\n" + + "\x12GetPipelineRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\xcb\x01\n" + + "\x14ListPipelinesRequest\x12\x1d\n" + + "\n" + + "page_token\x18\x01 \x01(\tR\tpageToken\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x17\n" + + "\asort_by\x18\x03 \x01(\tR\x06sortBy\x12\x16\n" + + "\x06filter\x18\x04 \x01(\tR\x06filter\x12F\n" + + "\x16resource_reference_key\x18\x05 \x01(\v2\x10.api.ResourceKeyR\x14resourceReferenceKey\"\x8b\x01\n" + + "\x15ListPipelinesResponse\x12+\n" + + "\tpipelines\x18\x01 \x03(\v2\r.api.PipelineR\tpipelines\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"L\n" + + "\x18GetPipelineByNameRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\"'\n" + + "\x15DeletePipelineRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"$\n" + + "\x12GetTemplateRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"1\n" + + "\x13GetTemplateResponse\x12\x1a\n" + + "\btemplate\x18\x01 \x01(\tR\btemplate\"B\n" + + "!GetPipelineVersionTemplateRequest\x12\x1d\n" + + "\n" + + "version_id\x18\x01 \x01(\tR\tversionId\"N\n" + + "\x1cCreatePipelineVersionRequest\x12.\n" + + "\aversion\x18\x01 \x01(\v2\x14.api.PipelineVersionR\aversion\":\n" + + "\x19GetPipelineVersionRequest\x12\x1d\n" + + "\n" + + "version_id\x18\x01 \x01(\tR\tversionId\"\xbf\x01\n" + + "\x1bListPipelineVersionsRequest\x123\n" + + "\fresource_key\x18\x01 \x01(\v2\x10.api.ResourceKeyR\vresourceKey\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x03 \x01(\tR\tpageToken\x12\x17\n" + + "\asort_by\x18\x04 \x01(\tR\x06sortBy\x12\x16\n" + + "\x06filter\x18\x05 \x01(\tR\x06filter\"\x97\x01\n" + + "\x1cListPipelineVersionsResponse\x120\n" + + "\bversions\x18\x01 \x03(\v2\x14.api.PipelineVersionR\bversions\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\"=\n" + + "\x1cDeletePipelineVersionRequest\x12\x1d\n" + + "\n" + + "version_id\x18\x01 \x01(\tR\tversionId\"\xf5\x02\n" + + "\bPipeline\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x129\n" + + "\n" + + "created_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12.\n" + + "\n" + + "parameters\x18\x05 \x03(\v2\x0e.api.ParameterR\n" + + "parameters\x12\x1a\n" + + "\x03url\x18\a \x01(\v2\b.api.UrlR\x03url\x12\x14\n" + + "\x05error\x18\x06 \x01(\tR\x05error\x12=\n" + + "\x0fdefault_version\x18\b \x01(\v2\x14.api.PipelineVersionR\x0edefaultVersion\x12G\n" + + "\x13resource_references\x18\t \x03(\v2\x16.api.ResourceReferenceR\x12resourceReferences\"\xde\x02\n" + + "\x0fPipelineVersion\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x129\n" + + "\n" + + "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12.\n" + + "\n" + + "parameters\x18\x04 \x03(\v2\x0e.api.ParameterR\n" + + "parameters\x12&\n" + + "\x0fcode_source_url\x18\x05 \x01(\tR\rcodeSourceUrl\x12)\n" + + "\vpackage_url\x18\x06 \x01(\v2\b.api.UrlR\n" + + "packageUrl\x12G\n" + + "\x13resource_references\x18\a \x03(\v2\x16.api.ResourceReferenceR\x12resourceReferences\x12 \n" + + "\vdescription\x18\b \x01(\tR\vdescription2\x9e\f\n" + + "\x0fPipelineService\x12h\n" + + "\x10CreatePipelineV1\x12\x1a.api.CreatePipelineRequest\x1a\r.api.Pipeline\")\x82\xd3\xe4\x93\x02#:\bpipeline\"\x17/apis/v1beta1/pipelines\x12]\n" + + "\rGetPipelineV1\x12\x17.api.GetPipelineRequest\x1a\r.api.Pipeline\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/apis/v1beta1/pipelines/{id}\x12\x82\x01\n" + + "\x13GetPipelineByNameV1\x12\x1d.api.GetPipelineByNameRequest\x1a\r.api.Pipeline\"=\x82\xd3\xe4\x93\x027\x125/apis/v1beta1/namespaces/{namespace}/pipelines/{name}\x12i\n" + + "\x0fListPipelinesV1\x12\x19.api.ListPipelinesRequest\x1a\x1a.api.ListPipelinesResponse\"\x1f\x82\xd3\xe4\x93\x02\x19\x12\x17/apis/v1beta1/pipelines\x12l\n" + + "\x10DeletePipelineV1\x12\x1a.api.DeletePipelineRequest\x1a\x16.google.protobuf.Empty\"$\x82\xd3\xe4\x93\x02\x1e*\x1c/apis/v1beta1/pipelines/{id}\x12p\n" + + "\vGetTemplate\x12\x17.api.GetTemplateRequest\x1a\x18.api.GetTemplateResponse\".\x82\xd3\xe4\x93\x02(\x12&/apis/v1beta1/pipelines/{id}/templates\x12\x84\x01\n" + + "\x17CreatePipelineVersionV1\x12!.api.CreatePipelineVersionRequest\x1a\x14.api.PipelineVersion\"0\x82\xd3\xe4\x93\x02*:\aversion\"\x1f/apis/v1beta1/pipeline_versions\x12\x82\x01\n" + + "\x14GetPipelineVersionV1\x12\x1e.api.GetPipelineVersionRequest\x1a\x14.api.PipelineVersion\"4\x82\xd3\xe4\x93\x02.\x12,/apis/v1beta1/pipeline_versions/{version_id}\x12\x86\x01\n" + + "\x16ListPipelineVersionsV1\x12 .api.ListPipelineVersionsRequest\x1a!.api.ListPipelineVersionsResponse\"'\x82\xd3\xe4\x93\x02!\x12\x1f/apis/v1beta1/pipeline_versions\x12\x8a\x01\n" + + "\x17DeletePipelineVersionV1\x12!.api.DeletePipelineVersionRequest\x1a\x16.google.protobuf.Empty\"4\x82\xd3\xe4\x93\x02.*,/apis/v1beta1/pipeline_versions/{version_id}\x12\x9e\x01\n" + + "\x1aGetPipelineVersionTemplate\x12&.api.GetPipelineVersionTemplateRequest\x1a\x18.api.GetTemplateResponse\">\x82\xd3\xe4\x93\x028\x126/apis/v1beta1/pipeline_versions/{version_id}/templates\x12\xae\x01\n" + + "\x1eUpdatePipelineDefaultVersionV1\x12(.api.UpdatePipelineDefaultVersionRequest\x1a\x16.google.protobuf.Empty\"J\x82\xd3\xe4\x93\x02D\"B/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}B\x91\x01\x92AQ*\x02\x01\x02R\x1c\n" + + "\adefault\x12\x11\x12\x0f\n" + + "\r\x1a\v.api.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_pipeline_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_pipeline_proto_rawDescData = file_backend_api_v1beta1_pipeline_proto_rawDesc + file_backend_api_v1beta1_pipeline_proto_rawDescData []byte ) func file_backend_api_v1beta1_pipeline_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_pipeline_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_pipeline_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_pipeline_proto_rawDescData) + file_backend_api_v1beta1_pipeline_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_pipeline_proto_rawDesc), len(file_backend_api_v1beta1_pipeline_proto_rawDesc))) }) return file_backend_api_v1beta1_pipeline_proto_rawDescData } var file_backend_api_v1beta1_pipeline_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_backend_api_v1beta1_pipeline_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_pipeline_proto_goTypes = []any{ (*Url)(nil), // 0: api.Url (*CreatePipelineRequest)(nil), // 1: api.CreatePipelineRequest (*UpdatePipelineDefaultVersionRequest)(nil), // 2: api.UpdatePipelineDefaultVersionRequest @@ -1558,232 +1342,13 @@ func file_backend_api_v1beta1_pipeline_proto_init() { if File_backend_api_v1beta1_pipeline_proto != nil { return } - file_backend_api_v1beta1_error_proto_init() file_backend_api_v1beta1_parameter_proto_init() file_backend_api_v1beta1_resource_reference_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_pipeline_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Url); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePipelineDefaultVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelinesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineByNameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTemplateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineVersionTemplateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePipelineVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelineVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelineVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePipelineVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_pipeline_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_pipeline_proto_rawDesc), len(file_backend_api_v1beta1_pipeline_proto_rawDesc)), NumEnums: 0, NumMessages: 18, NumExtensions: 0, @@ -1794,517 +1359,6 @@ func file_backend_api_v1beta1_pipeline_proto_init() { MessageInfos: file_backend_api_v1beta1_pipeline_proto_msgTypes, }.Build() File_backend_api_v1beta1_pipeline_proto = out.File - file_backend_api_v1beta1_pipeline_proto_rawDesc = nil file_backend_api_v1beta1_pipeline_proto_goTypes = nil file_backend_api_v1beta1_pipeline_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// PipelineServiceClient is the client API for PipelineService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PipelineServiceClient interface { - // Creates a pipeline. - CreatePipelineV1(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) - // Finds a specific pipeline by ID. - GetPipelineV1(ctx context.Context, in *GetPipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) - // Finds a pipeline by Name (and namespace) - GetPipelineByNameV1(ctx context.Context, in *GetPipelineByNameRequest, opts ...grpc.CallOption) (*Pipeline, error) - // Finds all pipelines. - ListPipelinesV1(ctx context.Context, in *ListPipelinesRequest, opts ...grpc.CallOption) (*ListPipelinesResponse, error) - // Deletes a pipeline and its pipeline versions. - DeletePipelineV1(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. - GetTemplate(ctx context.Context, in *GetTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) - // Adds a pipeline version to the specified pipeline. - CreatePipelineVersionV1(ctx context.Context, in *CreatePipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) - // Gets a pipeline version by pipeline version ID. - GetPipelineVersionV1(ctx context.Context, in *GetPipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) - // Lists all pipeline versions of a given pipeline. - ListPipelineVersionsV1(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) - // Deletes a pipeline version by pipeline version ID. If the deleted pipeline - // version is the default pipeline version, the pipeline's default version - // changes to the pipeline's most recent pipeline version. If there are no - // remaining pipeline versions, the pipeline will have no default version. - // Examines the run_service_api.ipynb notebook to learn more about creating a - // run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). - DeletePipelineVersionV1(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. - GetPipelineVersionTemplate(ctx context.Context, in *GetPipelineVersionTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) - // Update the default pipeline version of a specific pipeline. - UpdatePipelineDefaultVersionV1(ctx context.Context, in *UpdatePipelineDefaultVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type pipelineServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPipelineServiceClient(cc grpc.ClientConnInterface) PipelineServiceClient { - return &pipelineServiceClient{cc} -} - -func (c *pipelineServiceClient) CreatePipelineV1(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) { - out := new(Pipeline) - err := c.cc.Invoke(ctx, "/api.PipelineService/CreatePipelineV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) GetPipelineV1(ctx context.Context, in *GetPipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) { - out := new(Pipeline) - err := c.cc.Invoke(ctx, "/api.PipelineService/GetPipelineV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) GetPipelineByNameV1(ctx context.Context, in *GetPipelineByNameRequest, opts ...grpc.CallOption) (*Pipeline, error) { - out := new(Pipeline) - err := c.cc.Invoke(ctx, "/api.PipelineService/GetPipelineByNameV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) ListPipelinesV1(ctx context.Context, in *ListPipelinesRequest, opts ...grpc.CallOption) (*ListPipelinesResponse, error) { - out := new(ListPipelinesResponse) - err := c.cc.Invoke(ctx, "/api.PipelineService/ListPipelinesV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) DeletePipelineV1(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.PipelineService/DeletePipelineV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) GetTemplate(ctx context.Context, in *GetTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) { - out := new(GetTemplateResponse) - err := c.cc.Invoke(ctx, "/api.PipelineService/GetTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) CreatePipelineVersionV1(ctx context.Context, in *CreatePipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) { - out := new(PipelineVersion) - err := c.cc.Invoke(ctx, "/api.PipelineService/CreatePipelineVersionV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) GetPipelineVersionV1(ctx context.Context, in *GetPipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) { - out := new(PipelineVersion) - err := c.cc.Invoke(ctx, "/api.PipelineService/GetPipelineVersionV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) ListPipelineVersionsV1(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) { - out := new(ListPipelineVersionsResponse) - err := c.cc.Invoke(ctx, "/api.PipelineService/ListPipelineVersionsV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) DeletePipelineVersionV1(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.PipelineService/DeletePipelineVersionV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) GetPipelineVersionTemplate(ctx context.Context, in *GetPipelineVersionTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) { - out := new(GetTemplateResponse) - err := c.cc.Invoke(ctx, "/api.PipelineService/GetPipelineVersionTemplate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) UpdatePipelineDefaultVersionV1(ctx context.Context, in *UpdatePipelineDefaultVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.PipelineService/UpdatePipelineDefaultVersionV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PipelineServiceServer is the server API for PipelineService service. -type PipelineServiceServer interface { - // Creates a pipeline. - CreatePipelineV1(context.Context, *CreatePipelineRequest) (*Pipeline, error) - // Finds a specific pipeline by ID. - GetPipelineV1(context.Context, *GetPipelineRequest) (*Pipeline, error) - // Finds a pipeline by Name (and namespace) - GetPipelineByNameV1(context.Context, *GetPipelineByNameRequest) (*Pipeline, error) - // Finds all pipelines. - ListPipelinesV1(context.Context, *ListPipelinesRequest) (*ListPipelinesResponse, error) - // Deletes a pipeline and its pipeline versions. - DeletePipelineV1(context.Context, *DeletePipelineRequest) (*emptypb.Empty, error) - // Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. - GetTemplate(context.Context, *GetTemplateRequest) (*GetTemplateResponse, error) - // Adds a pipeline version to the specified pipeline. - CreatePipelineVersionV1(context.Context, *CreatePipelineVersionRequest) (*PipelineVersion, error) - // Gets a pipeline version by pipeline version ID. - GetPipelineVersionV1(context.Context, *GetPipelineVersionRequest) (*PipelineVersion, error) - // Lists all pipeline versions of a given pipeline. - ListPipelineVersionsV1(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) - // Deletes a pipeline version by pipeline version ID. If the deleted pipeline - // version is the default pipeline version, the pipeline's default version - // changes to the pipeline's most recent pipeline version. If there are no - // remaining pipeline versions, the pipeline will have no default version. - // Examines the run_service_api.ipynb notebook to learn more about creating a - // run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). - DeletePipelineVersionV1(context.Context, *DeletePipelineVersionRequest) (*emptypb.Empty, error) - // Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. - GetPipelineVersionTemplate(context.Context, *GetPipelineVersionTemplateRequest) (*GetTemplateResponse, error) - // Update the default pipeline version of a specific pipeline. - UpdatePipelineDefaultVersionV1(context.Context, *UpdatePipelineDefaultVersionRequest) (*emptypb.Empty, error) -} - -// UnimplementedPipelineServiceServer can be embedded to have forward compatible implementations. -type UnimplementedPipelineServiceServer struct { -} - -func (*UnimplementedPipelineServiceServer) CreatePipelineV1(context.Context, *CreatePipelineRequest) (*Pipeline, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePipelineV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) GetPipelineV1(context.Context, *GetPipelineRequest) (*Pipeline, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPipelineV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) GetPipelineByNameV1(context.Context, *GetPipelineByNameRequest) (*Pipeline, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPipelineByNameV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) ListPipelinesV1(context.Context, *ListPipelinesRequest) (*ListPipelinesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPipelinesV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) DeletePipelineV1(context.Context, *DeletePipelineRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePipelineV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) GetTemplate(context.Context, *GetTemplateRequest) (*GetTemplateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTemplate not implemented") -} -func (*UnimplementedPipelineServiceServer) CreatePipelineVersionV1(context.Context, *CreatePipelineVersionRequest) (*PipelineVersion, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePipelineVersionV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) GetPipelineVersionV1(context.Context, *GetPipelineVersionRequest) (*PipelineVersion, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPipelineVersionV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) ListPipelineVersionsV1(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPipelineVersionsV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) DeletePipelineVersionV1(context.Context, *DeletePipelineVersionRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePipelineVersionV1 not implemented") -} -func (*UnimplementedPipelineServiceServer) GetPipelineVersionTemplate(context.Context, *GetPipelineVersionTemplateRequest) (*GetTemplateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPipelineVersionTemplate not implemented") -} -func (*UnimplementedPipelineServiceServer) UpdatePipelineDefaultVersionV1(context.Context, *UpdatePipelineDefaultVersionRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdatePipelineDefaultVersionV1 not implemented") -} - -func RegisterPipelineServiceServer(s *grpc.Server, srv PipelineServiceServer) { - s.RegisterService(&_PipelineService_serviceDesc, srv) -} - -func _PipelineService_CreatePipelineV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePipelineRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).CreatePipelineV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/CreatePipelineV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).CreatePipelineV1(ctx, req.(*CreatePipelineRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_GetPipelineV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPipelineRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).GetPipelineV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/GetPipelineV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).GetPipelineV1(ctx, req.(*GetPipelineRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_GetPipelineByNameV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPipelineByNameRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).GetPipelineByNameV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/GetPipelineByNameV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).GetPipelineByNameV1(ctx, req.(*GetPipelineByNameRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_ListPipelinesV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPipelinesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).ListPipelinesV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/ListPipelinesV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).ListPipelinesV1(ctx, req.(*ListPipelinesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_DeletePipelineV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePipelineRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).DeletePipelineV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/DeletePipelineV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).DeletePipelineV1(ctx, req.(*DeletePipelineRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_GetTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).GetTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/GetTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).GetTemplate(ctx, req.(*GetTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_CreatePipelineVersionV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePipelineVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).CreatePipelineVersionV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/CreatePipelineVersionV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).CreatePipelineVersionV1(ctx, req.(*CreatePipelineVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_GetPipelineVersionV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPipelineVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).GetPipelineVersionV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/GetPipelineVersionV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).GetPipelineVersionV1(ctx, req.(*GetPipelineVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_ListPipelineVersionsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPipelineVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).ListPipelineVersionsV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/ListPipelineVersionsV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).ListPipelineVersionsV1(ctx, req.(*ListPipelineVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_DeletePipelineVersionV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePipelineVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).DeletePipelineVersionV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/DeletePipelineVersionV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).DeletePipelineVersionV1(ctx, req.(*DeletePipelineVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_GetPipelineVersionTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPipelineVersionTemplateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).GetPipelineVersionTemplate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/GetPipelineVersionTemplate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).GetPipelineVersionTemplate(ctx, req.(*GetPipelineVersionTemplateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_UpdatePipelineDefaultVersionV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdatePipelineDefaultVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).UpdatePipelineDefaultVersionV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.PipelineService/UpdatePipelineDefaultVersionV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).UpdatePipelineDefaultVersionV1(ctx, req.(*UpdatePipelineDefaultVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _PipelineService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.PipelineService", - HandlerType: (*PipelineServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreatePipelineV1", - Handler: _PipelineService_CreatePipelineV1_Handler, - }, - { - MethodName: "GetPipelineV1", - Handler: _PipelineService_GetPipelineV1_Handler, - }, - { - MethodName: "GetPipelineByNameV1", - Handler: _PipelineService_GetPipelineByNameV1_Handler, - }, - { - MethodName: "ListPipelinesV1", - Handler: _PipelineService_ListPipelinesV1_Handler, - }, - { - MethodName: "DeletePipelineV1", - Handler: _PipelineService_DeletePipelineV1_Handler, - }, - { - MethodName: "GetTemplate", - Handler: _PipelineService_GetTemplate_Handler, - }, - { - MethodName: "CreatePipelineVersionV1", - Handler: _PipelineService_CreatePipelineVersionV1_Handler, - }, - { - MethodName: "GetPipelineVersionV1", - Handler: _PipelineService_GetPipelineVersionV1_Handler, - }, - { - MethodName: "ListPipelineVersionsV1", - Handler: _PipelineService_ListPipelineVersionsV1_Handler, - }, - { - MethodName: "DeletePipelineVersionV1", - Handler: _PipelineService_DeletePipelineVersionV1_Handler, - }, - { - MethodName: "GetPipelineVersionTemplate", - Handler: _PipelineService_GetPipelineVersionTemplate_Handler, - }, - { - MethodName: "UpdatePipelineDefaultVersionV1", - Handler: _PipelineService_UpdatePipelineDefaultVersionV1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/pipeline.proto", -} diff --git a/backend/api/v1beta1/go_client/pipeline.pb.gw.go b/backend/api/v1beta1/go_client/pipeline.pb.gw.go index ceaccdc1bfa..3a430bd4550 100644 --- a/backend/api/v1beta1/go_client/pipeline.pb.gw.go +++ b/backend/api/v1beta1/go_client/pipeline.pb.gw.go @@ -10,925 +10,744 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_PipelineService_CreatePipelineV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Pipeline); err != nil && err != io.EOF { + var ( + protoReq CreatePipelineRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Pipeline); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreatePipelineV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_CreatePipelineV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Pipeline); err != nil && err != io.EOF { + var ( + protoReq CreatePipelineRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Pipeline); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreatePipelineV1(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_GetPipelineV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.GetPipelineV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_GetPipelineV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.GetPipelineV1(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_GetPipelineByNameV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineByNameRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineByNameRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["namespace"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } - protoReq.Namespace, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", 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.GetPipelineByNameV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_GetPipelineByNameV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineByNameRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineByNameRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["namespace"] + val, ok := pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } - protoReq.Namespace, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", 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 := server.GetPipelineByNameV1(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PipelineService_ListPipelinesV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_PipelineService_ListPipelinesV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_PipelineService_ListPipelinesV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPipelinesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListPipelinesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelinesV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListPipelinesV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_ListPipelinesV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPipelinesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListPipelinesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelinesV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListPipelinesV1(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_DeletePipelineV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePipelineRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePipelineRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.DeletePipelineV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_DeletePipelineV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePipelineRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePipelineRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.DeletePipelineV1(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_GetTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTemplateRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetTemplateRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.GetTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_GetTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTemplateRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetTemplateRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.GetTemplate(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_CreatePipelineVersionV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineVersionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Version); err != nil && err != io.EOF { + var ( + protoReq CreatePipelineVersionRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Version); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreatePipelineVersionV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_CreatePipelineVersionV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineVersionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Version); err != nil && err != io.EOF { + var ( + protoReq CreatePipelineVersionRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Version); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreatePipelineVersionV1(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_GetPipelineVersionV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["version_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") } - protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } - msg, err := client.GetPipelineVersionV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_GetPipelineVersionV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["version_id"] + val, ok := pathParams["version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") } - protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } - msg, err := server.GetPipelineVersionV1(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PipelineService_ListPipelineVersionsV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_PipelineService_ListPipelineVersionsV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_PipelineService_ListPipelineVersionsV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPipelineVersionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListPipelineVersionsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelineVersionsV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListPipelineVersionsV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_ListPipelineVersionsV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPipelineVersionsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListPipelineVersionsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelineVersionsV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListPipelineVersionsV1(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_DeletePipelineVersionV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePipelineVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["version_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") } - protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } - msg, err := client.DeletePipelineVersionV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_DeletePipelineVersionV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePipelineVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["version_id"] + val, ok := pathParams["version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") } - protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } - msg, err := server.DeletePipelineVersionV1(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_GetPipelineVersionTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineVersionTemplateRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineVersionTemplateRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["version_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") } - protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } - msg, err := client.GetPipelineVersionTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_GetPipelineVersionTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineVersionTemplateRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineVersionTemplateRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["version_id"] + val, ok := pathParams["version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") } - protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } - msg, err := server.GetPipelineVersionTemplate(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_UpdatePipelineDefaultVersionV1_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatePipelineDefaultVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UpdatePipelineDefaultVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - val, ok = pathParams["version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") } - protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } - msg, err := client.UpdatePipelineDefaultVersionV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_UpdatePipelineDefaultVersionV1_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdatePipelineDefaultVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UpdatePipelineDefaultVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - val, ok = pathParams["version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") } - protoReq.VersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) } - msg, err := server.UpdatePipelineDefaultVersionV1(ctx, &protoReq) return msg, metadata, err - } // RegisterPipelineServiceHandlerServer registers the http handlers for service PipelineService to "mux". // UnaryRPC :call PipelineServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPipelineServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPipelineServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PipelineServiceServer) error { - - mux.Handle("POST", pattern_PipelineService_CreatePipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/CreatePipelineV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_CreatePipelineV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_CreatePipelineV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipelineV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipelineV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/GetPipelineV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_GetPipelineV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_GetPipelineV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineByNameV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineByNameV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/GetPipelineByNameV1", runtime.WithHTTPPathPattern("/apis/v1beta1/namespaces/{namespace}/pipelines/{name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_GetPipelineByNameV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_GetPipelineByNameV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineByNameV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineByNameV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_ListPipelinesV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_ListPipelinesV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/ListPipelinesV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_ListPipelinesV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_ListPipelinesV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_ListPipelinesV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_ListPipelinesV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_PipelineService_DeletePipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PipelineService_DeletePipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/DeletePipelineV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_DeletePipelineV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_DeletePipelineV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_DeletePipelineV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_DeletePipelineV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/GetTemplate", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines/{id}/templates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_GetTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_GetTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_PipelineService_CreatePipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/CreatePipelineVersionV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_CreatePipelineVersionV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_CreatePipelineVersionV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipelineVersionV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipelineVersionV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/GetPipelineVersionV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_GetPipelineVersionV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_GetPipelineVersionV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineVersionV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineVersionV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_ListPipelineVersionsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_ListPipelineVersionsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/ListPipelineVersionsV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_ListPipelineVersionsV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_ListPipelineVersionsV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_ListPipelineVersionsV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_ListPipelineVersionsV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_PipelineService_DeletePipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PipelineService_DeletePipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/DeletePipelineVersionV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_DeletePipelineVersionV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_DeletePipelineVersionV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_DeletePipelineVersionV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_DeletePipelineVersionV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineVersionTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineVersionTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/GetPipelineVersionTemplate", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions/{version_id}/templates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_GetPipelineVersionTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_GetPipelineVersionTemplate_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineVersionTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineVersionTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_PipelineService_UpdatePipelineDefaultVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_UpdatePipelineDefaultVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.PipelineService/UpdatePipelineDefaultVersionV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_UpdatePipelineDefaultVersionV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_UpdatePipelineDefaultVersionV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_UpdatePipelineDefaultVersionV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_UpdatePipelineDefaultVersionV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -937,25 +756,24 @@ func RegisterPipelineServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterPipelineServiceHandlerFromEndpoint is same as RegisterPipelineServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPipelineServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterPipelineServiceHandler(ctx, mux, conn) } @@ -969,300 +787,241 @@ func RegisterPipelineServiceHandler(ctx context.Context, mux *runtime.ServeMux, // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PipelineServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PipelineServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PipelineServiceClient" to call the correct interceptors. +// "PipelineServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PipelineServiceClient) error { - - mux.Handle("POST", pattern_PipelineService_CreatePipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipelineV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/CreatePipelineV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_CreatePipelineV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_CreatePipelineV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipelineV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipelineV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/GetPipelineV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipelineV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipelineV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineByNameV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineByNameV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/GetPipelineByNameV1", runtime.WithHTTPPathPattern("/apis/v1beta1/namespaces/{namespace}/pipelines/{name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipelineByNameV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipelineByNameV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineByNameV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineByNameV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_ListPipelinesV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_ListPipelinesV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/ListPipelinesV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_ListPipelinesV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_ListPipelinesV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_ListPipelinesV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_ListPipelinesV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_PipelineService_DeletePipelineV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PipelineService_DeletePipelineV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/DeletePipelineV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_DeletePipelineV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_DeletePipelineV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_DeletePipelineV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_DeletePipelineV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetTemplate_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/GetTemplate", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines/{id}/templates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_PipelineService_CreatePipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipelineVersionV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/CreatePipelineVersionV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_CreatePipelineVersionV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_CreatePipelineVersionV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipelineVersionV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipelineVersionV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineVersionV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/GetPipelineVersionV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipelineVersionV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipelineVersionV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineVersionV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineVersionV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_ListPipelineVersionsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_ListPipelineVersionsV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/ListPipelineVersionsV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_ListPipelineVersionsV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_ListPipelineVersionsV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_ListPipelineVersionsV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_ListPipelineVersionsV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_PipelineService_DeletePipelineVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PipelineService_DeletePipelineVersionV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/DeletePipelineVersionV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_DeletePipelineVersionV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_DeletePipelineVersionV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_DeletePipelineVersionV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_DeletePipelineVersionV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineVersionTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineVersionTemplate_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/GetPipelineVersionTemplate", runtime.WithHTTPPathPattern("/apis/v1beta1/pipeline_versions/{version_id}/templates")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipelineVersionTemplate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipelineVersionTemplate_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineVersionTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineVersionTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_PipelineService_UpdatePipelineDefaultVersionV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_UpdatePipelineDefaultVersionV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.PipelineService/UpdatePipelineDefaultVersionV1", runtime.WithHTTPPathPattern("/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_UpdatePipelineDefaultVersionV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_UpdatePipelineDefaultVersionV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_UpdatePipelineDefaultVersionV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_UpdatePipelineDefaultVersionV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_PipelineService_CreatePipelineV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "pipelines"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_GetPipelineV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipelines", "id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_GetPipelineByNameV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta1", "namespaces", "namespace", "pipelines", "name"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_ListPipelinesV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "pipelines"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_DeletePipelineV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipelines", "id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_GetTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "pipelines", "id", "templates"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_CreatePipelineVersionV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "pipeline_versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_GetPipelineVersionV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipeline_versions", "version_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_ListPipelineVersionsV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "pipeline_versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_DeletePipelineVersionV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipeline_versions", "version_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_GetPipelineVersionTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "pipeline_versions", "version_id", "templates"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_UpdatePipelineDefaultVersionV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta1", "pipelines", "pipeline_id", "default_version", "version_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_PipelineService_CreatePipelineV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "pipelines"}, "")) + pattern_PipelineService_GetPipelineV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipelines", "id"}, "")) + pattern_PipelineService_GetPipelineByNameV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta1", "namespaces", "namespace", "pipelines", "name"}, "")) + pattern_PipelineService_ListPipelinesV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "pipelines"}, "")) + pattern_PipelineService_DeletePipelineV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipelines", "id"}, "")) + pattern_PipelineService_GetTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "pipelines", "id", "templates"}, "")) + pattern_PipelineService_CreatePipelineVersionV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "pipeline_versions"}, "")) + pattern_PipelineService_GetPipelineVersionV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipeline_versions", "version_id"}, "")) + pattern_PipelineService_ListPipelineVersionsV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "pipeline_versions"}, "")) + pattern_PipelineService_DeletePipelineVersionV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "pipeline_versions", "version_id"}, "")) + pattern_PipelineService_GetPipelineVersionTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "pipeline_versions", "version_id", "templates"}, "")) + pattern_PipelineService_UpdatePipelineDefaultVersionV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta1", "pipelines", "pipeline_id", "default_version", "version_id"}, "")) ) var ( - forward_PipelineService_CreatePipelineV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_GetPipelineV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_GetPipelineByNameV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_ListPipelinesV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_DeletePipelineV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_GetTemplate_0 = runtime.ForwardResponseMessage - - forward_PipelineService_CreatePipelineVersionV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_GetPipelineVersionV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_ListPipelineVersionsV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_DeletePipelineVersionV1_0 = runtime.ForwardResponseMessage - - forward_PipelineService_GetPipelineVersionTemplate_0 = runtime.ForwardResponseMessage - + forward_PipelineService_CreatePipelineV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_GetPipelineV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_GetPipelineByNameV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_ListPipelinesV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_DeletePipelineV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_GetTemplate_0 = runtime.ForwardResponseMessage + forward_PipelineService_CreatePipelineVersionV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_GetPipelineVersionV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_ListPipelineVersionsV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_DeletePipelineVersionV1_0 = runtime.ForwardResponseMessage + forward_PipelineService_GetPipelineVersionTemplate_0 = runtime.ForwardResponseMessage forward_PipelineService_UpdatePipelineDefaultVersionV1_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v1beta1/go_client/pipeline_grpc.pb.go b/backend/api/v1beta1/go_client/pipeline_grpc.pb.go new file mode 100644 index 00000000000..87f741fe09c --- /dev/null +++ b/backend/api/v1beta1/go_client/pipeline_grpc.pb.go @@ -0,0 +1,588 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/pipeline.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + PipelineService_CreatePipelineV1_FullMethodName = "/api.PipelineService/CreatePipelineV1" + PipelineService_GetPipelineV1_FullMethodName = "/api.PipelineService/GetPipelineV1" + PipelineService_GetPipelineByNameV1_FullMethodName = "/api.PipelineService/GetPipelineByNameV1" + PipelineService_ListPipelinesV1_FullMethodName = "/api.PipelineService/ListPipelinesV1" + PipelineService_DeletePipelineV1_FullMethodName = "/api.PipelineService/DeletePipelineV1" + PipelineService_GetTemplate_FullMethodName = "/api.PipelineService/GetTemplate" + PipelineService_CreatePipelineVersionV1_FullMethodName = "/api.PipelineService/CreatePipelineVersionV1" + PipelineService_GetPipelineVersionV1_FullMethodName = "/api.PipelineService/GetPipelineVersionV1" + PipelineService_ListPipelineVersionsV1_FullMethodName = "/api.PipelineService/ListPipelineVersionsV1" + PipelineService_DeletePipelineVersionV1_FullMethodName = "/api.PipelineService/DeletePipelineVersionV1" + PipelineService_GetPipelineVersionTemplate_FullMethodName = "/api.PipelineService/GetPipelineVersionTemplate" + PipelineService_UpdatePipelineDefaultVersionV1_FullMethodName = "/api.PipelineService/UpdatePipelineDefaultVersionV1" +) + +// PipelineServiceClient is the client API for PipelineService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PipelineServiceClient interface { + // Creates a pipeline. + CreatePipelineV1(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) + // Finds a specific pipeline by ID. + GetPipelineV1(ctx context.Context, in *GetPipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) + // Finds a pipeline by Name (and namespace) + GetPipelineByNameV1(ctx context.Context, in *GetPipelineByNameRequest, opts ...grpc.CallOption) (*Pipeline, error) + // Finds all pipelines. + ListPipelinesV1(ctx context.Context, in *ListPipelinesRequest, opts ...grpc.CallOption) (*ListPipelinesResponse, error) + // Deletes a pipeline and its pipeline versions. + DeletePipelineV1(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. + GetTemplate(ctx context.Context, in *GetTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) + // Adds a pipeline version to the specified pipeline. + CreatePipelineVersionV1(ctx context.Context, in *CreatePipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) + // Gets a pipeline version by pipeline version ID. + GetPipelineVersionV1(ctx context.Context, in *GetPipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) + // Lists all pipeline versions of a given pipeline. + ListPipelineVersionsV1(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) + // Deletes a pipeline version by pipeline version ID. If the deleted pipeline + // version is the default pipeline version, the pipeline's default version + // changes to the pipeline's most recent pipeline version. If there are no + // remaining pipeline versions, the pipeline will have no default version. + // Examines the run_service_api.ipynb notebook to learn more about creating a + // run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). + DeletePipelineVersionV1(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. + GetPipelineVersionTemplate(ctx context.Context, in *GetPipelineVersionTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) + // Update the default pipeline version of a specific pipeline. + UpdatePipelineDefaultVersionV1(ctx context.Context, in *UpdatePipelineDefaultVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type pipelineServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPipelineServiceClient(cc grpc.ClientConnInterface) PipelineServiceClient { + return &pipelineServiceClient{cc} +} + +func (c *pipelineServiceClient) CreatePipelineV1(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Pipeline) + err := c.cc.Invoke(ctx, PipelineService_CreatePipelineV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetPipelineV1(ctx context.Context, in *GetPipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Pipeline) + err := c.cc.Invoke(ctx, PipelineService_GetPipelineV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetPipelineByNameV1(ctx context.Context, in *GetPipelineByNameRequest, opts ...grpc.CallOption) (*Pipeline, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Pipeline) + err := c.cc.Invoke(ctx, PipelineService_GetPipelineByNameV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListPipelinesV1(ctx context.Context, in *ListPipelinesRequest, opts ...grpc.CallOption) (*ListPipelinesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPipelinesResponse) + err := c.cc.Invoke(ctx, PipelineService_ListPipelinesV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) DeletePipelineV1(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, PipelineService_DeletePipelineV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetTemplate(ctx context.Context, in *GetTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetTemplateResponse) + err := c.cc.Invoke(ctx, PipelineService_GetTemplate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) CreatePipelineVersionV1(ctx context.Context, in *CreatePipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PipelineVersion) + err := c.cc.Invoke(ctx, PipelineService_CreatePipelineVersionV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetPipelineVersionV1(ctx context.Context, in *GetPipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PipelineVersion) + err := c.cc.Invoke(ctx, PipelineService_GetPipelineVersionV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListPipelineVersionsV1(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPipelineVersionsResponse) + err := c.cc.Invoke(ctx, PipelineService_ListPipelineVersionsV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) DeletePipelineVersionV1(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, PipelineService_DeletePipelineVersionV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetPipelineVersionTemplate(ctx context.Context, in *GetPipelineVersionTemplateRequest, opts ...grpc.CallOption) (*GetTemplateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetTemplateResponse) + err := c.cc.Invoke(ctx, PipelineService_GetPipelineVersionTemplate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) UpdatePipelineDefaultVersionV1(ctx context.Context, in *UpdatePipelineDefaultVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, PipelineService_UpdatePipelineDefaultVersionV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PipelineServiceServer is the server API for PipelineService service. +// All implementations must embed UnimplementedPipelineServiceServer +// for forward compatibility. +type PipelineServiceServer interface { + // Creates a pipeline. + CreatePipelineV1(context.Context, *CreatePipelineRequest) (*Pipeline, error) + // Finds a specific pipeline by ID. + GetPipelineV1(context.Context, *GetPipelineRequest) (*Pipeline, error) + // Finds a pipeline by Name (and namespace) + GetPipelineByNameV1(context.Context, *GetPipelineByNameRequest) (*Pipeline, error) + // Finds all pipelines. + ListPipelinesV1(context.Context, *ListPipelinesRequest) (*ListPipelinesResponse, error) + // Deletes a pipeline and its pipeline versions. + DeletePipelineV1(context.Context, *DeletePipelineRequest) (*emptypb.Empty, error) + // Returns a single YAML template that contains the description, parameters, and metadata associated with the pipeline provided. + GetTemplate(context.Context, *GetTemplateRequest) (*GetTemplateResponse, error) + // Adds a pipeline version to the specified pipeline. + CreatePipelineVersionV1(context.Context, *CreatePipelineVersionRequest) (*PipelineVersion, error) + // Gets a pipeline version by pipeline version ID. + GetPipelineVersionV1(context.Context, *GetPipelineVersionRequest) (*PipelineVersion, error) + // Lists all pipeline versions of a given pipeline. + ListPipelineVersionsV1(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) + // Deletes a pipeline version by pipeline version ID. If the deleted pipeline + // version is the default pipeline version, the pipeline's default version + // changes to the pipeline's most recent pipeline version. If there are no + // remaining pipeline versions, the pipeline will have no default version. + // Examines the run_service_api.ipynb notebook to learn more about creating a + // run using a pipeline version (https://github.com/kubeflow/pipelines/blob/master/tools/benchmarks/run_service_api.ipynb). + DeletePipelineVersionV1(context.Context, *DeletePipelineVersionRequest) (*emptypb.Empty, error) + // Returns a YAML template that contains the specified pipeline version's description, parameters and metadata. + GetPipelineVersionTemplate(context.Context, *GetPipelineVersionTemplateRequest) (*GetTemplateResponse, error) + // Update the default pipeline version of a specific pipeline. + UpdatePipelineDefaultVersionV1(context.Context, *UpdatePipelineDefaultVersionRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedPipelineServiceServer() +} + +// UnimplementedPipelineServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPipelineServiceServer struct{} + +func (UnimplementedPipelineServiceServer) CreatePipelineV1(context.Context, *CreatePipelineRequest) (*Pipeline, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePipelineV1 not implemented") +} +func (UnimplementedPipelineServiceServer) GetPipelineV1(context.Context, *GetPipelineRequest) (*Pipeline, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipelineV1 not implemented") +} +func (UnimplementedPipelineServiceServer) GetPipelineByNameV1(context.Context, *GetPipelineByNameRequest) (*Pipeline, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipelineByNameV1 not implemented") +} +func (UnimplementedPipelineServiceServer) ListPipelinesV1(context.Context, *ListPipelinesRequest) (*ListPipelinesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPipelinesV1 not implemented") +} +func (UnimplementedPipelineServiceServer) DeletePipelineV1(context.Context, *DeletePipelineRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePipelineV1 not implemented") +} +func (UnimplementedPipelineServiceServer) GetTemplate(context.Context, *GetTemplateRequest) (*GetTemplateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTemplate not implemented") +} +func (UnimplementedPipelineServiceServer) CreatePipelineVersionV1(context.Context, *CreatePipelineVersionRequest) (*PipelineVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePipelineVersionV1 not implemented") +} +func (UnimplementedPipelineServiceServer) GetPipelineVersionV1(context.Context, *GetPipelineVersionRequest) (*PipelineVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipelineVersionV1 not implemented") +} +func (UnimplementedPipelineServiceServer) ListPipelineVersionsV1(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPipelineVersionsV1 not implemented") +} +func (UnimplementedPipelineServiceServer) DeletePipelineVersionV1(context.Context, *DeletePipelineVersionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePipelineVersionV1 not implemented") +} +func (UnimplementedPipelineServiceServer) GetPipelineVersionTemplate(context.Context, *GetPipelineVersionTemplateRequest) (*GetTemplateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipelineVersionTemplate not implemented") +} +func (UnimplementedPipelineServiceServer) UpdatePipelineDefaultVersionV1(context.Context, *UpdatePipelineDefaultVersionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePipelineDefaultVersionV1 not implemented") +} +func (UnimplementedPipelineServiceServer) mustEmbedUnimplementedPipelineServiceServer() {} +func (UnimplementedPipelineServiceServer) testEmbeddedByValue() {} + +// UnsafePipelineServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PipelineServiceServer will +// result in compilation errors. +type UnsafePipelineServiceServer interface { + mustEmbedUnimplementedPipelineServiceServer() +} + +func RegisterPipelineServiceServer(s grpc.ServiceRegistrar, srv PipelineServiceServer) { + // If the following call pancis, it indicates UnimplementedPipelineServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&PipelineService_ServiceDesc, srv) +} + +func _PipelineService_CreatePipelineV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePipelineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).CreatePipelineV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_CreatePipelineV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).CreatePipelineV1(ctx, req.(*CreatePipelineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetPipelineV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetPipelineV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetPipelineV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetPipelineV1(ctx, req.(*GetPipelineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetPipelineByNameV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetPipelineByNameV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetPipelineByNameV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetPipelineByNameV1(ctx, req.(*GetPipelineByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListPipelinesV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPipelinesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListPipelinesV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListPipelinesV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListPipelinesV1(ctx, req.(*ListPipelinesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_DeletePipelineV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePipelineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).DeletePipelineV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_DeletePipelineV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).DeletePipelineV1(ctx, req.(*DeletePipelineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetTemplate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetTemplate(ctx, req.(*GetTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_CreatePipelineVersionV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePipelineVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).CreatePipelineVersionV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_CreatePipelineVersionV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).CreatePipelineVersionV1(ctx, req.(*CreatePipelineVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetPipelineVersionV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetPipelineVersionV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetPipelineVersionV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetPipelineVersionV1(ctx, req.(*GetPipelineVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListPipelineVersionsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPipelineVersionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListPipelineVersionsV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListPipelineVersionsV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListPipelineVersionsV1(ctx, req.(*ListPipelineVersionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_DeletePipelineVersionV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePipelineVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).DeletePipelineVersionV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_DeletePipelineVersionV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).DeletePipelineVersionV1(ctx, req.(*DeletePipelineVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetPipelineVersionTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineVersionTemplateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetPipelineVersionTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetPipelineVersionTemplate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetPipelineVersionTemplate(ctx, req.(*GetPipelineVersionTemplateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_UpdatePipelineDefaultVersionV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePipelineDefaultVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).UpdatePipelineDefaultVersionV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_UpdatePipelineDefaultVersionV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).UpdatePipelineDefaultVersionV1(ctx, req.(*UpdatePipelineDefaultVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PipelineService_ServiceDesc is the grpc.ServiceDesc for PipelineService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PipelineService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.PipelineService", + HandlerType: (*PipelineServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreatePipelineV1", + Handler: _PipelineService_CreatePipelineV1_Handler, + }, + { + MethodName: "GetPipelineV1", + Handler: _PipelineService_GetPipelineV1_Handler, + }, + { + MethodName: "GetPipelineByNameV1", + Handler: _PipelineService_GetPipelineByNameV1_Handler, + }, + { + MethodName: "ListPipelinesV1", + Handler: _PipelineService_ListPipelinesV1_Handler, + }, + { + MethodName: "DeletePipelineV1", + Handler: _PipelineService_DeletePipelineV1_Handler, + }, + { + MethodName: "GetTemplate", + Handler: _PipelineService_GetTemplate_Handler, + }, + { + MethodName: "CreatePipelineVersionV1", + Handler: _PipelineService_CreatePipelineVersionV1_Handler, + }, + { + MethodName: "GetPipelineVersionV1", + Handler: _PipelineService_GetPipelineVersionV1_Handler, + }, + { + MethodName: "ListPipelineVersionsV1", + Handler: _PipelineService_ListPipelineVersionsV1_Handler, + }, + { + MethodName: "DeletePipelineVersionV1", + Handler: _PipelineService_DeletePipelineVersionV1_Handler, + }, + { + MethodName: "GetPipelineVersionTemplate", + Handler: _PipelineService_GetPipelineVersionTemplate_Handler, + }, + { + MethodName: "UpdatePipelineDefaultVersionV1", + Handler: _PipelineService_UpdatePipelineDefaultVersionV1_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/pipeline.proto", +} diff --git a/backend/api/v1beta1/go_client/pipeline_spec.pb.go b/backend/api/v1beta1/go_client/pipeline_spec.pb.go index 34762d99050..0faa3edada3 100644 --- a/backend/api/v1beta1/go_client/pipeline_spec.pb.go +++ b/backend/api/v1beta1/go_client/pipeline_spec.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/pipeline_spec.proto package go_client @@ -26,6 +26,7 @@ import ( structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -36,10 +37,7 @@ const ( ) type PipelineSpec struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Optional input field. The ID of the pipeline user uploaded before. PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` // Optional output field. The name of the pipeline. @@ -56,15 +54,15 @@ type PipelineSpec struct { Parameters []*Parameter `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"` // Runtime config of the pipeline. V2 only RuntimeConfig *PipelineSpec_RuntimeConfig `protobuf:"bytes,6,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineSpec) Reset() { *x = PipelineSpec{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_spec_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_spec_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineSpec) String() string { @@ -75,7 +73,7 @@ func (*PipelineSpec) ProtoMessage() {} func (x *PipelineSpec) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_spec_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -134,27 +132,24 @@ func (x *PipelineSpec) GetRuntimeConfig() *PipelineSpec_RuntimeConfig { // The runtime config of a PipelineSpec. type PipelineSpec_RuntimeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The runtime parameters of the PipelineSpec. The parameters will be // used to replace the placeholders // at runtime. - Parameters map[string]*structpb.Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*structpb.Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // A path in a object store bucket which will be treated as the root // output directory of the pipeline. It is used by the system to // generate the paths of output artifacts. Ref:(https://www.kubeflow.org/docs/components/pipelines/pipeline-root/) - PipelineRoot string `protobuf:"bytes,2,opt,name=pipeline_root,json=pipelineRoot,proto3" json:"pipeline_root,omitempty"` + PipelineRoot string `protobuf:"bytes,2,opt,name=pipeline_root,json=pipelineRoot,proto3" json:"pipeline_root,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineSpec_RuntimeConfig) Reset() { *x = PipelineSpec_RuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_pipeline_spec_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_pipeline_spec_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineSpec_RuntimeConfig) String() string { @@ -165,7 +160,7 @@ func (*PipelineSpec_RuntimeConfig) ProtoMessage() {} func (x *PipelineSpec_RuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_pipeline_spec_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,67 +191,42 @@ func (x *PipelineSpec_RuntimeConfig) GetPipelineRoot() string { var File_backend_api_v1beta1_pipeline_spec_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_pipeline_spec_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x23, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x85, 0x04, 0x0a, 0x0c, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, - 0x65, 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xdc, 0x01, 0x0a, 0x0d, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, - 0x70, 0x65, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x6f, - 0x6f, 0x74, 0x1a, 0x55, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, - 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_pipeline_spec_proto_rawDesc = "" + + "\n" + + "'backend/api/v1beta1/pipeline_spec.proto\x12\x03api\x1a#backend/api/v1beta1/parameter.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x85\x04\n" + + "\fPipelineSpec\x12\x1f\n" + + "\vpipeline_id\x18\x01 \x01(\tR\n" + + "pipelineId\x12#\n" + + "\rpipeline_name\x18\x05 \x01(\tR\fpipelineName\x12+\n" + + "\x11workflow_manifest\x18\x02 \x01(\tR\x10workflowManifest\x12+\n" + + "\x11pipeline_manifest\x18\x03 \x01(\tR\x10pipelineManifest\x12.\n" + + "\n" + + "parameters\x18\x04 \x03(\v2\x0e.api.ParameterR\n" + + "parameters\x12F\n" + + "\x0eruntime_config\x18\x06 \x01(\v2\x1f.api.PipelineSpec.RuntimeConfigR\rruntimeConfig\x1a\xdc\x01\n" + + "\rRuntimeConfig\x12O\n" + + "\n" + + "parameters\x18\x01 \x03(\v2/.api.PipelineSpec.RuntimeConfig.ParametersEntryR\n" + + "parameters\x12#\n" + + "\rpipeline_root\x18\x02 \x01(\tR\fpipelineRoot\x1aU\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01B=Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_pipeline_spec_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_pipeline_spec_proto_rawDescData = file_backend_api_v1beta1_pipeline_spec_proto_rawDesc + file_backend_api_v1beta1_pipeline_spec_proto_rawDescData []byte ) func file_backend_api_v1beta1_pipeline_spec_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_pipeline_spec_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_pipeline_spec_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_pipeline_spec_proto_rawDescData) + file_backend_api_v1beta1_pipeline_spec_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_pipeline_spec_proto_rawDesc), len(file_backend_api_v1beta1_pipeline_spec_proto_rawDesc))) }) return file_backend_api_v1beta1_pipeline_spec_proto_rawDescData } var file_backend_api_v1beta1_pipeline_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_backend_api_v1beta1_pipeline_spec_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_pipeline_spec_proto_goTypes = []any{ (*PipelineSpec)(nil), // 0: api.PipelineSpec (*PipelineSpec_RuntimeConfig)(nil), // 1: api.PipelineSpec.RuntimeConfig nil, // 2: api.PipelineSpec.RuntimeConfig.ParametersEntry @@ -281,37 +251,11 @@ func file_backend_api_v1beta1_pipeline_spec_proto_init() { return } file_backend_api_v1beta1_parameter_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_pipeline_spec_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineSpec); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_pipeline_spec_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineSpec_RuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_pipeline_spec_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_pipeline_spec_proto_rawDesc), len(file_backend_api_v1beta1_pipeline_spec_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, @@ -322,7 +266,6 @@ func file_backend_api_v1beta1_pipeline_spec_proto_init() { MessageInfos: file_backend_api_v1beta1_pipeline_spec_proto_msgTypes, }.Build() File_backend_api_v1beta1_pipeline_spec_proto = out.File - file_backend_api_v1beta1_pipeline_spec_proto_rawDesc = nil file_backend_api_v1beta1_pipeline_spec_proto_goTypes = nil file_backend_api_v1beta1_pipeline_spec_proto_depIdxs = nil } diff --git a/backend/api/v1beta1/go_client/report.pb.go b/backend/api/v1beta1/go_client/report.pb.go index fd2f8be385f..97fb8972f09 100644 --- a/backend/api/v1beta1/go_client/report.pb.go +++ b/backend/api/v1beta1/go_client/report.pb.go @@ -14,23 +14,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/report.proto package go_client import ( - context "context" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -41,21 +38,18 @@ const ( ) type ReportWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Workflow is a workflow custom resource marshalled into a json string. - Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` + Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportWorkflowRequest) Reset() { *x = ReportWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_report_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_report_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportWorkflowRequest) String() string { @@ -66,7 +60,7 @@ func (*ReportWorkflowRequest) ProtoMessage() {} func (x *ReportWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_report_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89,21 +83,18 @@ func (x *ReportWorkflowRequest) GetWorkflow() string { } type ReportScheduledWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string. ScheduledWorkflow string `protobuf:"bytes,1,opt,name=scheduled_workflow,json=scheduledWorkflow,proto3" json:"scheduled_workflow,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportScheduledWorkflowRequest) Reset() { *x = ReportScheduledWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_report_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_report_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportScheduledWorkflowRequest) String() string { @@ -114,7 +105,7 @@ func (*ReportScheduledWorkflowRequest) ProtoMessage() {} func (x *ReportScheduledWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_report_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,60 +129,31 @@ func (x *ReportScheduledWorkflowRequest) GetScheduledWorkflow() string { var File_backend_api_v1beta1_report_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_report_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x4f, 0x0a, 0x1e, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x73, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x32, 0x9b, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x31, 0x12, 0x1a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x08, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x96, 0x01, - 0x0a, 0x19, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x56, 0x31, 0x12, 0x23, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, - 0x3a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_report_proto_rawDesc = "" + + "\n" + + " backend/api/v1beta1/report.proto\x12\x03api\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\"3\n" + + "\x15ReportWorkflowRequest\x12\x1a\n" + + "\bworkflow\x18\x01 \x01(\tR\bworkflow\"O\n" + + "\x1eReportScheduledWorkflowRequest\x12-\n" + + "\x12scheduled_workflow\x18\x01 \x01(\tR\x11scheduledWorkflow2\x9b\x02\n" + + "\rReportService\x12q\n" + + "\x10ReportWorkflowV1\x12\x1a.api.ReportWorkflowRequest\x1a\x16.google.protobuf.Empty\")\x82\xd3\xe4\x93\x02#:\bworkflow\"\x17/apis/v1beta1/workflows\x12\x96\x01\n" + + "\x19ReportScheduledWorkflowV1\x12#.api.ReportScheduledWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\x82\xd3\xe4\x93\x026:\x12scheduled_workflow\" /apis/v1beta1/scheduledworkflowsB=Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_report_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_report_proto_rawDescData = file_backend_api_v1beta1_report_proto_rawDesc + file_backend_api_v1beta1_report_proto_rawDescData []byte ) func file_backend_api_v1beta1_report_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_report_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_report_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_report_proto_rawDescData) + file_backend_api_v1beta1_report_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_report_proto_rawDesc), len(file_backend_api_v1beta1_report_proto_rawDesc))) }) return file_backend_api_v1beta1_report_proto_rawDescData } var file_backend_api_v1beta1_report_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_backend_api_v1beta1_report_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_report_proto_goTypes = []any{ (*ReportWorkflowRequest)(nil), // 0: api.ReportWorkflowRequest (*ReportScheduledWorkflowRequest)(nil), // 1: api.ReportScheduledWorkflowRequest (*emptypb.Empty)(nil), // 2: google.protobuf.Empty @@ -213,37 +175,11 @@ func file_backend_api_v1beta1_report_proto_init() { if File_backend_api_v1beta1_report_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_report_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_report_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportScheduledWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_report_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_report_proto_rawDesc), len(file_backend_api_v1beta1_report_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -254,123 +190,6 @@ func file_backend_api_v1beta1_report_proto_init() { MessageInfos: file_backend_api_v1beta1_report_proto_msgTypes, }.Build() File_backend_api_v1beta1_report_proto = out.File - file_backend_api_v1beta1_report_proto_rawDesc = nil file_backend_api_v1beta1_report_proto_goTypes = nil file_backend_api_v1beta1_report_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ReportServiceClient is the client API for ReportService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ReportServiceClient interface { - ReportWorkflowV1(ctx context.Context, in *ReportWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - ReportScheduledWorkflowV1(ctx context.Context, in *ReportScheduledWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type reportServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewReportServiceClient(cc grpc.ClientConnInterface) ReportServiceClient { - return &reportServiceClient{cc} -} - -func (c *reportServiceClient) ReportWorkflowV1(ctx context.Context, in *ReportWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.ReportService/ReportWorkflowV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *reportServiceClient) ReportScheduledWorkflowV1(ctx context.Context, in *ReportScheduledWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.ReportService/ReportScheduledWorkflowV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ReportServiceServer is the server API for ReportService service. -type ReportServiceServer interface { - ReportWorkflowV1(context.Context, *ReportWorkflowRequest) (*emptypb.Empty, error) - ReportScheduledWorkflowV1(context.Context, *ReportScheduledWorkflowRequest) (*emptypb.Empty, error) -} - -// UnimplementedReportServiceServer can be embedded to have forward compatible implementations. -type UnimplementedReportServiceServer struct { -} - -func (*UnimplementedReportServiceServer) ReportWorkflowV1(context.Context, *ReportWorkflowRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportWorkflowV1 not implemented") -} -func (*UnimplementedReportServiceServer) ReportScheduledWorkflowV1(context.Context, *ReportScheduledWorkflowRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportScheduledWorkflowV1 not implemented") -} - -func RegisterReportServiceServer(s *grpc.Server, srv ReportServiceServer) { - s.RegisterService(&_ReportService_serviceDesc, srv) -} - -func _ReportService_ReportWorkflowV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReportWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReportServiceServer).ReportWorkflowV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ReportService/ReportWorkflowV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReportServiceServer).ReportWorkflowV1(ctx, req.(*ReportWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReportService_ReportScheduledWorkflowV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReportScheduledWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReportServiceServer).ReportScheduledWorkflowV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.ReportService/ReportScheduledWorkflowV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReportServiceServer).ReportScheduledWorkflowV1(ctx, req.(*ReportScheduledWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ReportService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.ReportService", - HandlerType: (*ReportServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ReportWorkflowV1", - Handler: _ReportService_ReportWorkflowV1_Handler, - }, - { - MethodName: "ReportScheduledWorkflowV1", - Handler: _ReportService_ReportScheduledWorkflowV1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/report.proto", -} diff --git a/backend/api/v1beta1/go_client/report.pb.gw.go b/backend/api/v1beta1/go_client/report.pb.gw.go index 5384e3cdf5e..ca8f61d6257 100644 --- a/backend/api/v1beta1/go_client/report.pb.gw.go +++ b/backend/api/v1beta1/go_client/report.pb.gw.go @@ -10,147 +10,130 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_ReportService_ReportWorkflowV1_0(ctx context.Context, marshaler runtime.Marshaler, client ReportServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Workflow); err != nil && err != io.EOF { + var ( + protoReq ReportWorkflowRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Workflow); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.ReportWorkflowV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ReportService_ReportWorkflowV1_0(ctx context.Context, marshaler runtime.Marshaler, server ReportServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Workflow); err != nil && err != io.EOF { + var ( + protoReq ReportWorkflowRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Workflow); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ReportWorkflowV1(ctx, &protoReq) return msg, metadata, err - } func request_ReportService_ReportScheduledWorkflowV1_0(ctx context.Context, marshaler runtime.Marshaler, client ReportServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportScheduledWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ScheduledWorkflow); err != nil && err != io.EOF { + var ( + protoReq ReportScheduledWorkflowRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.ScheduledWorkflow); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.ReportScheduledWorkflowV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ReportService_ReportScheduledWorkflowV1_0(ctx context.Context, marshaler runtime.Marshaler, server ReportServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportScheduledWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ScheduledWorkflow); err != nil && err != io.EOF { + var ( + protoReq ReportScheduledWorkflowRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.ScheduledWorkflow); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ReportScheduledWorkflowV1(ctx, &protoReq) return msg, metadata, err - } // RegisterReportServiceHandlerServer registers the http handlers for service ReportService to "mux". // UnaryRPC :call ReportServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterReportServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterReportServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReportServiceServer) error { - - mux.Handle("POST", pattern_ReportService_ReportWorkflowV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ReportService_ReportWorkflowV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ReportService/ReportWorkflowV1", runtime.WithHTTPPathPattern("/apis/v1beta1/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ReportService_ReportWorkflowV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ReportService_ReportWorkflowV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ReportService_ReportWorkflowV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ReportService_ReportWorkflowV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ReportService_ReportScheduledWorkflowV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ReportService_ReportScheduledWorkflowV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ReportService/ReportScheduledWorkflowV1", runtime.WithHTTPPathPattern("/apis/v1beta1/scheduledworkflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ReportService_ReportScheduledWorkflowV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ReportService_ReportScheduledWorkflowV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ReportService_ReportScheduledWorkflowV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ReportService_ReportScheduledWorkflowV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -159,25 +142,24 @@ func RegisterReportServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterReportServiceHandlerFromEndpoint is same as RegisterReportServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterReportServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterReportServiceHandler(ctx, mux, conn) } @@ -191,60 +173,51 @@ func RegisterReportServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ReportServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ReportServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ReportServiceClient" to call the correct interceptors. +// "ReportServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterReportServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReportServiceClient) error { - - mux.Handle("POST", pattern_ReportService_ReportWorkflowV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ReportService_ReportWorkflowV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.ReportService/ReportWorkflowV1", runtime.WithHTTPPathPattern("/apis/v1beta1/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ReportService_ReportWorkflowV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ReportService_ReportWorkflowV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ReportService_ReportWorkflowV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ReportService_ReportWorkflowV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ReportService_ReportScheduledWorkflowV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ReportService_ReportScheduledWorkflowV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.ReportService/ReportScheduledWorkflowV1", runtime.WithHTTPPathPattern("/apis/v1beta1/scheduledworkflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ReportService_ReportScheduledWorkflowV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ReportService_ReportScheduledWorkflowV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ReportService_ReportScheduledWorkflowV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ReportService_ReportScheduledWorkflowV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_ReportService_ReportWorkflowV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "workflows"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ReportService_ReportScheduledWorkflowV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "scheduledworkflows"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ReportService_ReportWorkflowV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "workflows"}, "")) + pattern_ReportService_ReportScheduledWorkflowV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "scheduledworkflows"}, "")) ) var ( - forward_ReportService_ReportWorkflowV1_0 = runtime.ForwardResponseMessage - + forward_ReportService_ReportWorkflowV1_0 = runtime.ForwardResponseMessage forward_ReportService_ReportScheduledWorkflowV1_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v1beta1/go_client/report_grpc.pb.go b/backend/api/v1beta1/go_client/report_grpc.pb.go new file mode 100644 index 00000000000..919c1c82cb6 --- /dev/null +++ b/backend/api/v1beta1/go_client/report_grpc.pb.go @@ -0,0 +1,174 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/report.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ReportService_ReportWorkflowV1_FullMethodName = "/api.ReportService/ReportWorkflowV1" + ReportService_ReportScheduledWorkflowV1_FullMethodName = "/api.ReportService/ReportScheduledWorkflowV1" +) + +// ReportServiceClient is the client API for ReportService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ReportServiceClient interface { + ReportWorkflowV1(ctx context.Context, in *ReportWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + ReportScheduledWorkflowV1(ctx context.Context, in *ReportScheduledWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type reportServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewReportServiceClient(cc grpc.ClientConnInterface) ReportServiceClient { + return &reportServiceClient{cc} +} + +func (c *reportServiceClient) ReportWorkflowV1(ctx context.Context, in *ReportWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ReportService_ReportWorkflowV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportServiceClient) ReportScheduledWorkflowV1(ctx context.Context, in *ReportScheduledWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ReportService_ReportScheduledWorkflowV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReportServiceServer is the server API for ReportService service. +// All implementations must embed UnimplementedReportServiceServer +// for forward compatibility. +type ReportServiceServer interface { + ReportWorkflowV1(context.Context, *ReportWorkflowRequest) (*emptypb.Empty, error) + ReportScheduledWorkflowV1(context.Context, *ReportScheduledWorkflowRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedReportServiceServer() +} + +// UnimplementedReportServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedReportServiceServer struct{} + +func (UnimplementedReportServiceServer) ReportWorkflowV1(context.Context, *ReportWorkflowRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReportWorkflowV1 not implemented") +} +func (UnimplementedReportServiceServer) ReportScheduledWorkflowV1(context.Context, *ReportScheduledWorkflowRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReportScheduledWorkflowV1 not implemented") +} +func (UnimplementedReportServiceServer) mustEmbedUnimplementedReportServiceServer() {} +func (UnimplementedReportServiceServer) testEmbeddedByValue() {} + +// UnsafeReportServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ReportServiceServer will +// result in compilation errors. +type UnsafeReportServiceServer interface { + mustEmbedUnimplementedReportServiceServer() +} + +func RegisterReportServiceServer(s grpc.ServiceRegistrar, srv ReportServiceServer) { + // If the following call pancis, it indicates UnimplementedReportServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ReportService_ServiceDesc, srv) +} + +func _ReportService_ReportWorkflowV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportServiceServer).ReportWorkflowV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ReportService_ReportWorkflowV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportServiceServer).ReportWorkflowV1(ctx, req.(*ReportWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportService_ReportScheduledWorkflowV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportScheduledWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportServiceServer).ReportScheduledWorkflowV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ReportService_ReportScheduledWorkflowV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportServiceServer).ReportScheduledWorkflowV1(ctx, req.(*ReportScheduledWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ReportService_ServiceDesc is the grpc.ServiceDesc for ReportService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ReportService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.ReportService", + HandlerType: (*ReportServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReportWorkflowV1", + Handler: _ReportService_ReportWorkflowV1_Handler, + }, + { + MethodName: "ReportScheduledWorkflowV1", + Handler: _ReportService_ReportScheduledWorkflowV1_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/report.proto", +} diff --git a/backend/api/v1beta1/go_client/resource_reference.pb.go b/backend/api/v1beta1/go_client/resource_reference.pb.go index a04bc537132..0103be135e6 100644 --- a/backend/api/v1beta1/go_client/resource_reference.pb.go +++ b/backend/api/v1beta1/go_client/resource_reference.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/resource_reference.proto package go_client @@ -25,6 +25,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -142,23 +143,20 @@ func (Relationship) EnumDescriptor() ([]byte, []int) { } type ResourceKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The type of the resource that referred to. Type ResourceType `protobuf:"varint,1,opt,name=type,proto3,enum=api.ResourceType" json:"type,omitempty"` // The ID of the resource that referred to. - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ResourceKey) Reset() { *x = ResourceKey{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_resource_reference_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_resource_reference_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceKey) String() string { @@ -169,7 +167,7 @@ func (*ResourceKey) ProtoMessage() {} func (x *ResourceKey) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_resource_reference_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -199,24 +197,21 @@ func (x *ResourceKey) GetId() string { } type ResourceReference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key *ResourceKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Key *ResourceKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The name of the resource that referred to. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship Relationship `protobuf:"varint,2,opt,name=relationship,proto3,enum=api.Relationship" json:"relationship,omitempty"` + Relationship Relationship `protobuf:"varint,2,opt,name=relationship,proto3,enum=api.Relationship" json:"relationship,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ResourceReference) Reset() { *x = ResourceReference{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_resource_reference_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_resource_reference_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ResourceReference) String() string { @@ -227,7 +222,7 @@ func (*ResourceReference) ProtoMessage() {} func (x *ResourceReference) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_resource_reference_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,56 +260,44 @@ func (x *ResourceReference) GetRelationship() Relationship { var File_backend_api_v1beta1_resource_reference_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_resource_reference_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, - 0x61, 0x70, 0x69, 0x22, 0x44, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x22, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, - 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x75, - 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, - 0x0a, 0x15, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, - 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x58, 0x50, - 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x4f, 0x42, - 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x03, - 0x12, 0x14, 0x0a, 0x10, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x56, 0x45, 0x52, - 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, - 0x41, 0x43, 0x45, 0x10, 0x05, 0x2a, 0x40, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_resource_reference_proto_rawDesc = "" + + "\n" + + ",backend/api/v1beta1/resource_reference.proto\x12\x03api\"D\n" + + "\vResourceKey\x12%\n" + + "\x04type\x18\x01 \x01(\x0e2\x11.api.ResourceTypeR\x04type\x12\x0e\n" + + "\x02id\x18\x02 \x01(\tR\x02id\"\x82\x01\n" + + "\x11ResourceReference\x12\"\n" + + "\x03key\x18\x01 \x01(\v2\x10.api.ResourceKeyR\x03key\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x125\n" + + "\frelationship\x18\x02 \x01(\x0e2\x11.api.RelationshipR\frelationship*u\n" + + "\fResourceType\x12\x19\n" + + "\x15UNKNOWN_RESOURCE_TYPE\x10\x00\x12\x0e\n" + + "\n" + + "EXPERIMENT\x10\x01\x12\a\n" + + "\x03JOB\x10\x02\x12\f\n" + + "\bPIPELINE\x10\x03\x12\x14\n" + + "\x10PIPELINE_VERSION\x10\x04\x12\r\n" + + "\tNAMESPACE\x10\x05*@\n" + + "\fRelationship\x12\x18\n" + + "\x14UNKNOWN_RELATIONSHIP\x10\x00\x12\t\n" + + "\x05OWNER\x10\x01\x12\v\n" + + "\aCREATOR\x10\x02B=Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_resource_reference_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_resource_reference_proto_rawDescData = file_backend_api_v1beta1_resource_reference_proto_rawDesc + file_backend_api_v1beta1_resource_reference_proto_rawDescData []byte ) func file_backend_api_v1beta1_resource_reference_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_resource_reference_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_resource_reference_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_resource_reference_proto_rawDescData) + file_backend_api_v1beta1_resource_reference_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_resource_reference_proto_rawDesc), len(file_backend_api_v1beta1_resource_reference_proto_rawDesc))) }) return file_backend_api_v1beta1_resource_reference_proto_rawDescData } var file_backend_api_v1beta1_resource_reference_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_backend_api_v1beta1_resource_reference_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_backend_api_v1beta1_resource_reference_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_resource_reference_proto_goTypes = []any{ (ResourceType)(0), // 0: api.ResourceType (Relationship)(0), // 1: api.Relationship (*ResourceKey)(nil), // 2: api.ResourceKey @@ -336,37 +319,11 @@ func file_backend_api_v1beta1_resource_reference_proto_init() { if File_backend_api_v1beta1_resource_reference_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_resource_reference_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_resource_reference_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_resource_reference_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_resource_reference_proto_rawDesc), len(file_backend_api_v1beta1_resource_reference_proto_rawDesc)), NumEnums: 2, NumMessages: 2, NumExtensions: 0, @@ -378,7 +335,6 @@ func file_backend_api_v1beta1_resource_reference_proto_init() { MessageInfos: file_backend_api_v1beta1_resource_reference_proto_msgTypes, }.Build() File_backend_api_v1beta1_resource_reference_proto = out.File - file_backend_api_v1beta1_resource_reference_proto_rawDesc = nil file_backend_api_v1beta1_resource_reference_proto_goTypes = nil file_backend_api_v1beta1_resource_reference_proto_depIdxs = nil } diff --git a/backend/api/v1beta1/go_client/run.pb.go b/backend/api/v1beta1/go_client/run.pb.go index 5186e3300ca..65922b620a6 100644 --- a/backend/api/v1beta1/go_client/run.pb.go +++ b/backend/api/v1beta1/go_client/run.pb.go @@ -14,25 +14,22 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/run.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -201,20 +198,17 @@ func (ReportRunMetricsResponse_ReportRunMetricResult_Status) EnumDescriptor() ([ } type CreateRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` unknownFields protoimpl.UnknownFields - - Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateRunRequest) Reset() { *x = CreateRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRunRequest) String() string { @@ -225,7 +219,7 @@ func (*CreateRunRequest) ProtoMessage() {} func (x *CreateRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,21 +242,18 @@ func (x *CreateRunRequest) GetRun() *Run { } type GetRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the run to be retrieved. - RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetRunRequest) Reset() { *x = GetRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRunRequest) String() string { @@ -273,7 +264,7 @@ func (*GetRunRequest) ProtoMessage() {} func (x *GetRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -296,10 +287,7 @@ func (x *GetRunRequest) GetRunId() string { } type ListRunsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListRuns call or can be omitted when fetching the first page. @@ -317,16 +305,16 @@ type ListRunsRequest struct { ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). - Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRunsRequest) Reset() { *x = ListRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRunsRequest) String() string { @@ -337,7 +325,7 @@ func (*ListRunsRequest) ProtoMessage() {} func (x *ListRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -388,21 +376,18 @@ func (x *ListRunsRequest) GetFilter() string { } type TerminateRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the run to be terminated. - RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TerminateRunRequest) Reset() { *x = TerminateRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerminateRunRequest) String() string { @@ -413,7 +398,7 @@ func (*TerminateRunRequest) ProtoMessage() {} func (x *TerminateRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,21 +421,18 @@ func (x *TerminateRunRequest) GetRunId() string { } type RetryRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the run to be retried. - RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RetryRunRequest) Reset() { *x = RetryRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryRunRequest) String() string { @@ -461,7 +443,7 @@ func (*RetryRunRequest) ProtoMessage() {} func (x *RetryRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -484,24 +466,21 @@ func (x *RetryRunRequest) GetRunId() string { } type ListRunsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Runs []*Run `protobuf:"bytes,1,rep,name=runs,proto3" json:"runs,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Runs []*Run `protobuf:"bytes,1,rep,name=runs,proto3" json:"runs,omitempty"` // The total number of runs for the given query. TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` // The token to list the next page of runs. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRunsResponse) Reset() { *x = ListRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRunsResponse) String() string { @@ -512,7 +491,7 @@ func (*ListRunsResponse) ProtoMessage() {} func (x *ListRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,21 +528,18 @@ func (x *ListRunsResponse) GetNextPageToken() string { } type ArchiveRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the run to be archived. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArchiveRunRequest) Reset() { *x = ArchiveRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArchiveRunRequest) String() string { @@ -574,7 +550,7 @@ func (*ArchiveRunRequest) ProtoMessage() {} func (x *ArchiveRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -597,21 +573,18 @@ func (x *ArchiveRunRequest) GetId() string { } type UnarchiveRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the run to be restored. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UnarchiveRunRequest) Reset() { *x = UnarchiveRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnarchiveRunRequest) String() string { @@ -622,7 +595,7 @@ func (*UnarchiveRunRequest) ProtoMessage() {} func (x *UnarchiveRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,21 +618,18 @@ func (x *UnarchiveRunRequest) GetId() string { } type DeleteRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the run to be deleted. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteRunRequest) Reset() { *x = DeleteRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRunRequest) String() string { @@ -670,7 +640,7 @@ func (*DeleteRunRequest) ProtoMessage() {} func (x *DeleteRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -693,10 +663,7 @@ func (x *DeleteRunRequest) GetId() string { } type Run struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique run ID. Generated by API server. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Required input field. Name provided by user, @@ -733,16 +700,16 @@ type Run struct { Error string `protobuf:"bytes,12,opt,name=error,proto3" json:"error,omitempty"` // Output. The metrics of the run. The metrics are reported by ReportMetrics // API. - Metrics []*RunMetric `protobuf:"bytes,9,rep,name=metrics,proto3" json:"metrics,omitempty"` + Metrics []*RunMetric `protobuf:"bytes,9,rep,name=metrics,proto3" json:"metrics,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Run) Reset() { *x = Run{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Run) String() string { @@ -753,7 +720,7 @@ func (*Run) ProtoMessage() {} func (x *Run) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -860,25 +827,22 @@ func (x *Run) GetMetrics() []*RunMetric { } type PipelineRuntime struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. The runtime JSON manifest of the pipeline, including the status // of pipeline steps and fields need for UI visualization etc. PipelineManifest string `protobuf:"bytes,10,opt,name=pipeline_manifest,json=pipelineManifest,proto3" json:"pipeline_manifest,omitempty"` // Output. The runtime JSON manifest of the argo workflow. // This is deprecated after pipeline_runtime_manifest is in use. WorkflowManifest string `protobuf:"bytes,11,opt,name=workflow_manifest,json=workflowManifest,proto3" json:"workflow_manifest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineRuntime) Reset() { *x = PipelineRuntime{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineRuntime) String() string { @@ -889,7 +853,7 @@ func (*PipelineRuntime) ProtoMessage() {} func (x *PipelineRuntime) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -919,21 +883,18 @@ func (x *PipelineRuntime) GetWorkflowManifest() string { } type RunDetail struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` - PipelineRuntime *PipelineRuntime `protobuf:"bytes,2,opt,name=pipeline_runtime,json=pipelineRuntime,proto3" json:"pipeline_runtime,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Run *Run `protobuf:"bytes,1,opt,name=run,proto3" json:"run,omitempty"` + PipelineRuntime *PipelineRuntime `protobuf:"bytes,2,opt,name=pipeline_runtime,json=pipelineRuntime,proto3" json:"pipeline_runtime,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RunDetail) Reset() { *x = RunDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunDetail) String() string { @@ -944,7 +905,7 @@ func (*RunDetail) ProtoMessage() {} func (x *RunDetail) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -974,10 +935,7 @@ func (x *RunDetail) GetPipelineRuntime() *PipelineRuntime { } type RunMetric struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required. The user defined name of the metric. It must between 1 and 63 // characters long and must conform to the following regular expression: // `[a-z]([-a-z0-9]*[a-z0-9])?`. @@ -987,21 +945,21 @@ type RunMetric struct { // are considerd as duplicate. Only the first reporting will be recorded. Max // length is 128. NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // Types that are assignable to Value: + // Types that are valid to be assigned to Value: // // *RunMetric_NumberValue Value isRunMetric_Value `protobuf_oneof:"value"` // The display format of metric. - Format RunMetric_Format `protobuf:"varint,4,opt,name=format,proto3,enum=api.RunMetric_Format" json:"format,omitempty"` + Format RunMetric_Format `protobuf:"varint,4,opt,name=format,proto3,enum=api.RunMetric_Format" json:"format,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RunMetric) Reset() { *x = RunMetric{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunMetric) String() string { @@ -1012,7 +970,7 @@ func (*RunMetric) ProtoMessage() {} func (x *RunMetric) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1041,16 +999,18 @@ func (x *RunMetric) GetNodeId() string { return "" } -func (m *RunMetric) GetValue() isRunMetric_Value { - if m != nil { - return m.Value +func (x *RunMetric) GetValue() isRunMetric_Value { + if x != nil { + return x.Value } return nil } func (x *RunMetric) GetNumberValue() float64 { - if x, ok := x.GetValue().(*RunMetric_NumberValue); ok { - return x.NumberValue + if x != nil { + if x, ok := x.Value.(*RunMetric_NumberValue); ok { + return x.NumberValue + } } return 0 } @@ -1074,23 +1034,20 @@ type RunMetric_NumberValue struct { func (*RunMetric_NumberValue) isRunMetric_Value() {} type ReportRunMetricsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required. The parent run ID of the metric. RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` // List of metrics to report. - Metrics []*RunMetric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` + Metrics []*RunMetric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportRunMetricsRequest) Reset() { *x = ReportRunMetricsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportRunMetricsRequest) String() string { @@ -1101,7 +1058,7 @@ func (*ReportRunMetricsRequest) ProtoMessage() {} func (x *ReportRunMetricsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1131,20 +1088,17 @@ func (x *ReportRunMetricsRequest) GetMetrics() []*RunMetric { } type ReportRunMetricsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Results []*ReportRunMetricsResponse_ReportRunMetricResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` unknownFields protoimpl.UnknownFields - - Results []*ReportRunMetricsResponse_ReportRunMetricResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ReportRunMetricsResponse) Reset() { *x = ReportRunMetricsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportRunMetricsResponse) String() string { @@ -1155,7 +1109,7 @@ func (*ReportRunMetricsResponse) ProtoMessage() {} func (x *ReportRunMetricsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1178,25 +1132,22 @@ func (x *ReportRunMetricsResponse) GetResults() []*ReportRunMetricsResponse_Repo } type ReadArtifactRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the run. RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` // The ID of the running node. NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // The name of the artifact. - ArtifactName string `protobuf:"bytes,3,opt,name=artifact_name,json=artifactName,proto3" json:"artifact_name,omitempty"` + ArtifactName string `protobuf:"bytes,3,opt,name=artifact_name,json=artifactName,proto3" json:"artifact_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReadArtifactRequest) Reset() { *x = ReadArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadArtifactRequest) String() string { @@ -1207,7 +1158,7 @@ func (*ReadArtifactRequest) ProtoMessage() {} func (x *ReadArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1244,21 +1195,18 @@ func (x *ReadArtifactRequest) GetArtifactName() string { } type ReadArtifactResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The bytes of the artifact content. - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReadArtifactResponse) Reset() { *x = ReadArtifactResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadArtifactResponse) String() string { @@ -1269,7 +1217,7 @@ func (*ReadArtifactResponse) ProtoMessage() {} func (x *ReadArtifactResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1292,10 +1240,7 @@ func (x *ReadArtifactResponse) GetData() []byte { } type ReportRunMetricsResponse_ReportRunMetricResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. The name of the metric. MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` // Output. The ID of the node which reports the metric. @@ -1303,16 +1248,16 @@ type ReportRunMetricsResponse_ReportRunMetricResult struct { // Output. The status of the metric reporting. Status ReportRunMetricsResponse_ReportRunMetricResult_Status `protobuf:"varint,3,opt,name=status,proto3,enum=api.ReportRunMetricsResponse_ReportRunMetricResult_Status" json:"status,omitempty"` // Output. The detailed message of the error of the reporting. - Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportRunMetricsResponse_ReportRunMetricResult) Reset() { *x = ReportRunMetricsResponse_ReportRunMetricResult{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_run_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_run_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportRunMetricsResponse_ReportRunMetricResult) String() string { @@ -1323,7 +1268,7 @@ func (*ReportRunMetricsResponse_ReportRunMetricResult) ProtoMessage() {} func (x *ReportRunMetricsResponse_ReportRunMetricResult) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_run_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1368,267 +1313,133 @@ func (x *ReportRunMetricsResponse_ReportRunMetricResult) GetMessage() string { var File_backend_api_v1beta1_run_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_run_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, - 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x72, 0x75, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, - 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x26, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0xc6, - 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, - 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x46, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x13, 0x54, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, - 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x28, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, - 0x77, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x72, 0x75, 0x6e, - 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, - 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x23, 0x0a, 0x11, 0x41, 0x72, 0x63, 0x68, - 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x25, 0x0a, - 0x13, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x87, 0x05, 0x0a, 0x03, 0x52, 0x75, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0c, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x47, 0x0a, 0x13, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, - 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x28, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0x45, 0x0a, 0x0c, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x53, - 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x56, 0x41, 0x49, - 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x4f, 0x52, 0x41, - 0x47, 0x45, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, - 0x10, 0x01, 0x22, 0x6b, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x22, - 0x68, 0x0a, 0x09, 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x03, - 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x12, 0x3f, 0x0a, 0x10, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x09, 0x52, 0x75, - 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, - 0x64, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x32, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x41, 0x57, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, - 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x41, 0x47, 0x45, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5a, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, - 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, - 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x22, 0x9e, 0x03, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, - 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0xb2, 0x02, - 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x52, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x64, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, - 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, - 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, - 0x54, 0x45, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x12, - 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x04, 0x22, 0x6a, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, - 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2a, - 0x0a, 0x14, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xc6, 0x08, 0x0a, 0x0a, 0x52, - 0x75, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0b, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x56, 0x31, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, - 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x12, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, - 0x12, 0x53, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x56, 0x31, 0x12, 0x12, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, - 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, - 0x73, 0x56, 0x31, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x0c, - 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x56, 0x31, 0x12, 0x16, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x27, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x72, - 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x6d, 0x0a, 0x0e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, - 0x76, 0x65, 0x52, 0x75, 0x6e, 0x56, 0x31, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x6e, - 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x23, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x75, 0x6e, 0x61, 0x72, 0x63, - 0x68, 0x69, 0x76, 0x65, 0x12, 0x5d, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, - 0x6e, 0x56, 0x31, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, - 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x56, 0x31, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x75, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, - 0x01, 0x2a, 0x22, 0x29, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x3a, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x99, 0x01, - 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x56, 0x31, - 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x12, 0x4a, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, - 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x72, 0x65, 0x61, 0x64, 0x12, 0x71, 0x0a, 0x0e, 0x54, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x56, 0x31, 0x12, 0x18, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x25, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x65, 0x0a, 0x0a, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x56, 0x31, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x42, 0x91, 0x01, 0x92, 0x41, 0x51, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x1c, 0x0a, - 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, - 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, - 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, - 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_run_proto_rawDesc = "" + + "\n" + + "\x1dbackend/api/v1beta1/run.proto\x12\x03api\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a'backend/api/v1beta1/pipeline_spec.proto\x1a,backend/api/v1beta1/resource_reference.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\".\n" + + "\x10CreateRunRequest\x12\x1a\n" + + "\x03run\x18\x01 \x01(\v2\b.api.RunR\x03run\"&\n" + + "\rGetRunRequest\x12\x15\n" + + "\x06run_id\x18\x01 \x01(\tR\x05runId\"\xc6\x01\n" + + "\x0fListRunsRequest\x12\x1d\n" + + "\n" + + "page_token\x18\x01 \x01(\tR\tpageToken\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x17\n" + + "\asort_by\x18\x03 \x01(\tR\x06sortBy\x12F\n" + + "\x16resource_reference_key\x18\x04 \x01(\v2\x10.api.ResourceKeyR\x14resourceReferenceKey\x12\x16\n" + + "\x06filter\x18\x05 \x01(\tR\x06filter\",\n" + + "\x13TerminateRunRequest\x12\x15\n" + + "\x06run_id\x18\x01 \x01(\tR\x05runId\"(\n" + + "\x0fRetryRunRequest\x12\x15\n" + + "\x06run_id\x18\x01 \x01(\tR\x05runId\"w\n" + + "\x10ListRunsResponse\x12\x1c\n" + + "\x04runs\x18\x01 \x03(\v2\b.api.RunR\x04runs\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"#\n" + + "\x11ArchiveRunRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"%\n" + + "\x13UnarchiveRunRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\"\n" + + "\x10DeleteRunRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x87\x05\n" + + "\x03Run\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12:\n" + + "\rstorage_state\x18\n" + + " \x01(\x0e2\x15.api.Run.StorageStateR\fstorageState\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x126\n" + + "\rpipeline_spec\x18\x04 \x01(\v2\x11.api.PipelineSpecR\fpipelineSpec\x12G\n" + + "\x13resource_references\x18\x05 \x03(\v2\x16.api.ResourceReferenceR\x12resourceReferences\x12'\n" + + "\x0fservice_account\x18\x0e \x01(\tR\x0eserviceAccount\x129\n" + + "\n" + + "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12=\n" + + "\fscheduled_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\vscheduledAt\x12;\n" + + "\vfinished_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "finishedAt\x12\x16\n" + + "\x06status\x18\b \x01(\tR\x06status\x12\x14\n" + + "\x05error\x18\f \x01(\tR\x05error\x12(\n" + + "\ametrics\x18\t \x03(\v2\x0e.api.RunMetricR\ametrics\"E\n" + + "\fStorageState\x12\x1a\n" + + "\x16STORAGESTATE_AVAILABLE\x10\x00\x12\x19\n" + + "\x15STORAGESTATE_ARCHIVED\x10\x01\"k\n" + + "\x0fPipelineRuntime\x12+\n" + + "\x11pipeline_manifest\x18\n" + + " \x01(\tR\x10pipelineManifest\x12+\n" + + "\x11workflow_manifest\x18\v \x01(\tR\x10workflowManifest\"h\n" + + "\tRunDetail\x12\x1a\n" + + "\x03run\x18\x01 \x01(\v2\b.api.RunR\x03run\x12?\n" + + "\x10pipeline_runtime\x18\x02 \x01(\v2\x14.api.PipelineRuntimeR\x0fpipelineRuntime\"\xc9\x01\n" + + "\tRunMetric\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x17\n" + + "\anode_id\x18\x02 \x01(\tR\x06nodeId\x12#\n" + + "\fnumber_value\x18\x03 \x01(\x01H\x00R\vnumberValue\x12-\n" + + "\x06format\x18\x04 \x01(\x0e2\x15.api.RunMetric.FormatR\x06format\"2\n" + + "\x06Format\x12\x0f\n" + + "\vUNSPECIFIED\x10\x00\x12\a\n" + + "\x03RAW\x10\x01\x12\x0e\n" + + "\n" + + "PERCENTAGE\x10\x02B\a\n" + + "\x05value\"Z\n" + + "\x17ReportRunMetricsRequest\x12\x15\n" + + "\x06run_id\x18\x01 \x01(\tR\x05runId\x12(\n" + + "\ametrics\x18\x02 \x03(\v2\x0e.api.RunMetricR\ametrics\"\x9e\x03\n" + + "\x18ReportRunMetricsResponse\x12M\n" + + "\aresults\x18\x01 \x03(\v23.api.ReportRunMetricsResponse.ReportRunMetricResultR\aresults\x1a\xb2\x02\n" + + "\x15ReportRunMetricResult\x12\x1f\n" + + "\vmetric_name\x18\x01 \x01(\tR\n" + + "metricName\x12$\n" + + "\x0emetric_node_id\x18\x02 \x01(\tR\fmetricNodeId\x12R\n" + + "\x06status\x18\x03 \x01(\x0e2:.api.ReportRunMetricsResponse.ReportRunMetricResult.StatusR\x06status\x12\x18\n" + + "\amessage\x18\x04 \x01(\tR\amessage\"d\n" + + "\x06Status\x12\x0f\n" + + "\vUNSPECIFIED\x10\x00\x12\x06\n" + + "\x02OK\x10\x01\x12\x14\n" + + "\x10INVALID_ARGUMENT\x10\x02\x12\x17\n" + + "\x13DUPLICATE_REPORTING\x10\x03\x12\x12\n" + + "\x0eINTERNAL_ERROR\x10\x04\"j\n" + + "\x13ReadArtifactRequest\x12\x15\n" + + "\x06run_id\x18\x01 \x01(\tR\x05runId\x12\x17\n" + + "\anode_id\x18\x02 \x01(\tR\x06nodeId\x12#\n" + + "\rartifact_name\x18\x03 \x01(\tR\fartifactName\"*\n" + + "\x14ReadArtifactResponse\x12\x12\n" + + "\x04data\x18\x01 \x01(\fR\x04data2\xc6\b\n" + + "\n" + + "RunService\x12U\n" + + "\vCreateRunV1\x12\x15.api.CreateRunRequest\x1a\x0e.api.RunDetail\"\x1f\x82\xd3\xe4\x93\x02\x19:\x03run\"\x12/apis/v1beta1/runs\x12S\n" + + "\bGetRunV1\x12\x12.api.GetRunRequest\x1a\x0e.api.RunDetail\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/apis/v1beta1/runs/{run_id}\x12U\n" + + "\n" + + "ListRunsV1\x12\x14.api.ListRunsRequest\x1a\x15.api.ListRunsResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/apis/v1beta1/runs\x12g\n" + + "\fArchiveRunV1\x12\x16.api.ArchiveRunRequest\x1a\x16.google.protobuf.Empty\"'\x82\xd3\xe4\x93\x02!\"\x1f/apis/v1beta1/runs/{id}:archive\x12m\n" + + "\x0eUnarchiveRunV1\x12\x18.api.UnarchiveRunRequest\x1a\x16.google.protobuf.Empty\")\x82\xd3\xe4\x93\x02#\"!/apis/v1beta1/runs/{id}:unarchive\x12]\n" + + "\vDeleteRunV1\x12\x15.api.DeleteRunRequest\x1a\x16.google.protobuf.Empty\"\x1f\x82\xd3\xe4\x93\x02\x19*\x17/apis/v1beta1/runs/{id}\x12\x87\x01\n" + + "\x12ReportRunMetricsV1\x12\x1c.api.ReportRunMetricsRequest\x1a\x1d.api.ReportRunMetricsResponse\"4\x82\xd3\xe4\x93\x02.:\x01*\")/apis/v1beta1/runs/{run_id}:reportMetrics\x12\x99\x01\n" + + "\x0eReadArtifactV1\x12\x18.api.ReadArtifactRequest\x1a\x19.api.ReadArtifactResponse\"R\x82\xd3\xe4\x93\x02L\x12J/apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read\x12q\n" + + "\x0eTerminateRunV1\x12\x18.api.TerminateRunRequest\x1a\x16.google.protobuf.Empty\"-\x82\xd3\xe4\x93\x02'\"%/apis/v1beta1/runs/{run_id}/terminate\x12e\n" + + "\n" + + "RetryRunV1\x12\x14.api.RetryRunRequest\x1a\x16.google.protobuf.Empty\")\x82\xd3\xe4\x93\x02#\"!/apis/v1beta1/runs/{run_id}/retryB\x91\x01\x92AQ*\x02\x01\x02R\x1c\n" + + "\adefault\x12\x11\x12\x0f\n" + + "\r\x1a\v.api.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_run_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_run_proto_rawDescData = file_backend_api_v1beta1_run_proto_rawDesc + file_backend_api_v1beta1_run_proto_rawDescData []byte ) func file_backend_api_v1beta1_run_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_run_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_run_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_run_proto_rawDescData) + file_backend_api_v1beta1_run_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_run_proto_rawDesc), len(file_backend_api_v1beta1_run_proto_rawDesc))) }) return file_backend_api_v1beta1_run_proto_rawDescData } var file_backend_api_v1beta1_run_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_backend_api_v1beta1_run_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_backend_api_v1beta1_run_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_run_proto_goTypes = []any{ (Run_StorageState)(0), // 0: api.Run.StorageState (RunMetric_Format)(0), // 1: api.RunMetric.Format (ReportRunMetricsResponse_ReportRunMetricResult_Status)(0), // 2: api.ReportRunMetricsResponse.ReportRunMetricResult.Status @@ -1705,235 +1516,16 @@ func file_backend_api_v1beta1_run_proto_init() { if File_backend_api_v1beta1_run_proto != nil { return } - file_backend_api_v1beta1_error_proto_init() file_backend_api_v1beta1_pipeline_spec_proto_init() file_backend_api_v1beta1_resource_reference_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_run_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TerminateRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnarchiveRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Run); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineRuntime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunMetric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportRunMetricsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportRunMetricsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadArtifactResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_run_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportRunMetricsResponse_ReportRunMetricResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_backend_api_v1beta1_run_proto_msgTypes[12].OneofWrappers = []interface{}{ + file_backend_api_v1beta1_run_proto_msgTypes[12].OneofWrappers = []any{ (*RunMetric_NumberValue)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_run_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_run_proto_rawDesc), len(file_backend_api_v1beta1_run_proto_rawDesc)), NumEnums: 3, NumMessages: 18, NumExtensions: 0, @@ -1945,437 +1537,6 @@ func file_backend_api_v1beta1_run_proto_init() { MessageInfos: file_backend_api_v1beta1_run_proto_msgTypes, }.Build() File_backend_api_v1beta1_run_proto = out.File - file_backend_api_v1beta1_run_proto_rawDesc = nil file_backend_api_v1beta1_run_proto_goTypes = nil file_backend_api_v1beta1_run_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// RunServiceClient is the client API for RunService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RunServiceClient interface { - // Creates a new run. - CreateRunV1(ctx context.Context, in *CreateRunRequest, opts ...grpc.CallOption) (*RunDetail, error) - // Finds a specific run by ID. - GetRunV1(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*RunDetail, error) - // Finds all runs. - ListRunsV1(ctx context.Context, in *ListRunsRequest, opts ...grpc.CallOption) (*ListRunsResponse, error) - // Archives a run. - ArchiveRunV1(ctx context.Context, in *ArchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Restores an archived run. - UnarchiveRunV1(ctx context.Context, in *UnarchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Deletes a run. - DeleteRunV1(ctx context.Context, in *DeleteRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // ReportRunMetrics reports metrics of a run. Each metric is reported in its - // own transaction, so this API accepts partial failures. Metric can be - // uniquely identified by (run_id, node_id, name). Duplicate reporting will be - // ignored by the API. First reporting wins. - ReportRunMetricsV1(ctx context.Context, in *ReportRunMetricsRequest, opts ...grpc.CallOption) (*ReportRunMetricsResponse, error) - // Finds a run's artifact data. - ReadArtifactV1(ctx context.Context, in *ReadArtifactRequest, opts ...grpc.CallOption) (*ReadArtifactResponse, error) - // Terminates an active run. - TerminateRunV1(ctx context.Context, in *TerminateRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Re-initiates a failed or terminated run. - RetryRunV1(ctx context.Context, in *RetryRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type runServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRunServiceClient(cc grpc.ClientConnInterface) RunServiceClient { - return &runServiceClient{cc} -} - -func (c *runServiceClient) CreateRunV1(ctx context.Context, in *CreateRunRequest, opts ...grpc.CallOption) (*RunDetail, error) { - out := new(RunDetail) - err := c.cc.Invoke(ctx, "/api.RunService/CreateRunV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) GetRunV1(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*RunDetail, error) { - out := new(RunDetail) - err := c.cc.Invoke(ctx, "/api.RunService/GetRunV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) ListRunsV1(ctx context.Context, in *ListRunsRequest, opts ...grpc.CallOption) (*ListRunsResponse, error) { - out := new(ListRunsResponse) - err := c.cc.Invoke(ctx, "/api.RunService/ListRunsV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) ArchiveRunV1(ctx context.Context, in *ArchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.RunService/ArchiveRunV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) UnarchiveRunV1(ctx context.Context, in *UnarchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.RunService/UnarchiveRunV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) DeleteRunV1(ctx context.Context, in *DeleteRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.RunService/DeleteRunV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) ReportRunMetricsV1(ctx context.Context, in *ReportRunMetricsRequest, opts ...grpc.CallOption) (*ReportRunMetricsResponse, error) { - out := new(ReportRunMetricsResponse) - err := c.cc.Invoke(ctx, "/api.RunService/ReportRunMetricsV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) ReadArtifactV1(ctx context.Context, in *ReadArtifactRequest, opts ...grpc.CallOption) (*ReadArtifactResponse, error) { - out := new(ReadArtifactResponse) - err := c.cc.Invoke(ctx, "/api.RunService/ReadArtifactV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) TerminateRunV1(ctx context.Context, in *TerminateRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.RunService/TerminateRunV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) RetryRunV1(ctx context.Context, in *RetryRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api.RunService/RetryRunV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RunServiceServer is the server API for RunService service. -type RunServiceServer interface { - // Creates a new run. - CreateRunV1(context.Context, *CreateRunRequest) (*RunDetail, error) - // Finds a specific run by ID. - GetRunV1(context.Context, *GetRunRequest) (*RunDetail, error) - // Finds all runs. - ListRunsV1(context.Context, *ListRunsRequest) (*ListRunsResponse, error) - // Archives a run. - ArchiveRunV1(context.Context, *ArchiveRunRequest) (*emptypb.Empty, error) - // Restores an archived run. - UnarchiveRunV1(context.Context, *UnarchiveRunRequest) (*emptypb.Empty, error) - // Deletes a run. - DeleteRunV1(context.Context, *DeleteRunRequest) (*emptypb.Empty, error) - // ReportRunMetrics reports metrics of a run. Each metric is reported in its - // own transaction, so this API accepts partial failures. Metric can be - // uniquely identified by (run_id, node_id, name). Duplicate reporting will be - // ignored by the API. First reporting wins. - ReportRunMetricsV1(context.Context, *ReportRunMetricsRequest) (*ReportRunMetricsResponse, error) - // Finds a run's artifact data. - ReadArtifactV1(context.Context, *ReadArtifactRequest) (*ReadArtifactResponse, error) - // Terminates an active run. - TerminateRunV1(context.Context, *TerminateRunRequest) (*emptypb.Empty, error) - // Re-initiates a failed or terminated run. - RetryRunV1(context.Context, *RetryRunRequest) (*emptypb.Empty, error) -} - -// UnimplementedRunServiceServer can be embedded to have forward compatible implementations. -type UnimplementedRunServiceServer struct { -} - -func (*UnimplementedRunServiceServer) CreateRunV1(context.Context, *CreateRunRequest) (*RunDetail, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateRunV1 not implemented") -} -func (*UnimplementedRunServiceServer) GetRunV1(context.Context, *GetRunRequest) (*RunDetail, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRunV1 not implemented") -} -func (*UnimplementedRunServiceServer) ListRunsV1(context.Context, *ListRunsRequest) (*ListRunsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListRunsV1 not implemented") -} -func (*UnimplementedRunServiceServer) ArchiveRunV1(context.Context, *ArchiveRunRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ArchiveRunV1 not implemented") -} -func (*UnimplementedRunServiceServer) UnarchiveRunV1(context.Context, *UnarchiveRunRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnarchiveRunV1 not implemented") -} -func (*UnimplementedRunServiceServer) DeleteRunV1(context.Context, *DeleteRunRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRunV1 not implemented") -} -func (*UnimplementedRunServiceServer) ReportRunMetricsV1(context.Context, *ReportRunMetricsRequest) (*ReportRunMetricsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportRunMetricsV1 not implemented") -} -func (*UnimplementedRunServiceServer) ReadArtifactV1(context.Context, *ReadArtifactRequest) (*ReadArtifactResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReadArtifactV1 not implemented") -} -func (*UnimplementedRunServiceServer) TerminateRunV1(context.Context, *TerminateRunRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method TerminateRunV1 not implemented") -} -func (*UnimplementedRunServiceServer) RetryRunV1(context.Context, *RetryRunRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method RetryRunV1 not implemented") -} - -func RegisterRunServiceServer(s *grpc.Server, srv RunServiceServer) { - s.RegisterService(&_RunService_serviceDesc, srv) -} - -func _RunService_CreateRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).CreateRunV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/CreateRunV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).CreateRunV1(ctx, req.(*CreateRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_GetRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).GetRunV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/GetRunV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).GetRunV1(ctx, req.(*GetRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_ListRunsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRunsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).ListRunsV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/ListRunsV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).ListRunsV1(ctx, req.(*ListRunsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_ArchiveRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).ArchiveRunV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/ArchiveRunV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).ArchiveRunV1(ctx, req.(*ArchiveRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_UnarchiveRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnarchiveRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).UnarchiveRunV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/UnarchiveRunV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).UnarchiveRunV1(ctx, req.(*UnarchiveRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_DeleteRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).DeleteRunV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/DeleteRunV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).DeleteRunV1(ctx, req.(*DeleteRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_ReportRunMetricsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReportRunMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).ReportRunMetricsV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/ReportRunMetricsV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).ReportRunMetricsV1(ctx, req.(*ReportRunMetricsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_ReadArtifactV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadArtifactRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).ReadArtifactV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/ReadArtifactV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).ReadArtifactV1(ctx, req.(*ReadArtifactRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_TerminateRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TerminateRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).TerminateRunV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/TerminateRunV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).TerminateRunV1(ctx, req.(*TerminateRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_RetryRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RetryRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).RetryRunV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.RunService/RetryRunV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).RetryRunV1(ctx, req.(*RetryRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RunService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.RunService", - HandlerType: (*RunServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateRunV1", - Handler: _RunService_CreateRunV1_Handler, - }, - { - MethodName: "GetRunV1", - Handler: _RunService_GetRunV1_Handler, - }, - { - MethodName: "ListRunsV1", - Handler: _RunService_ListRunsV1_Handler, - }, - { - MethodName: "ArchiveRunV1", - Handler: _RunService_ArchiveRunV1_Handler, - }, - { - MethodName: "UnarchiveRunV1", - Handler: _RunService_UnarchiveRunV1_Handler, - }, - { - MethodName: "DeleteRunV1", - Handler: _RunService_DeleteRunV1_Handler, - }, - { - MethodName: "ReportRunMetricsV1", - Handler: _RunService_ReportRunMetricsV1_Handler, - }, - { - MethodName: "ReadArtifactV1", - Handler: _RunService_ReadArtifactV1_Handler, - }, - { - MethodName: "TerminateRunV1", - Handler: _RunService_TerminateRunV1_Handler, - }, - { - MethodName: "RetryRunV1", - Handler: _RunService_RetryRunV1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/run.proto", -} diff --git a/backend/api/v1beta1/go_client/run.pb.gw.go b/backend/api/v1beta1/go_client/run.pb.gw.go index da1582e11ac..a34290bd8fe 100644 --- a/backend/api/v1beta1/go_client/run.pb.gw.go +++ b/backend/api/v1beta1/go_client/run.pb.gw.go @@ -10,825 +10,648 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RunService_CreateRunV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRunRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Run); err != nil && err != io.EOF { + var ( + protoReq CreateRunRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Run); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreateRunV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_CreateRunV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRunRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Run); err != nil && err != io.EOF { + var ( + protoReq CreateRunRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Run); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateRunV1(ctx, &protoReq) return msg, metadata, err - } func request_RunService_GetRunV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - msg, err := client.GetRunV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_GetRunV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - msg, err := server.GetRunV1(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_ListRunsV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RunService_ListRunsV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RunService_ListRunsV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListRunsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListRunsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ListRunsV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListRunsV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_ListRunsV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListRunsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListRunsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ListRunsV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListRunsV1(ctx, &protoReq) return msg, metadata, err - } func request_RunService_ArchiveRunV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ArchiveRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.ArchiveRunV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_ArchiveRunV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ArchiveRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.ArchiveRunV1(ctx, &protoReq) return msg, metadata, err - } func request_RunService_UnarchiveRunV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnarchiveRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UnarchiveRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.UnarchiveRunV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_UnarchiveRunV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnarchiveRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UnarchiveRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.UnarchiveRunV1(ctx, &protoReq) return msg, metadata, err - } func request_RunService_DeleteRunV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.DeleteRunV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_DeleteRunV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["id"] + val, ok := pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.DeleteRunV1(ctx, &protoReq) return msg, metadata, err - } func request_RunService_ReportRunMetricsV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportRunMetricsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq ReportRunMetricsRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - msg, err := client.ReportRunMetricsV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_ReportRunMetricsV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportRunMetricsRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq ReportRunMetricsRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - msg, err := server.ReportRunMetricsV1(ctx, &protoReq) return msg, metadata, err - } func request_RunService_ReadArtifactV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReadArtifactRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ReadArtifactRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - val, ok = pathParams["node_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") } - protoReq.NodeId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) } - val, ok = pathParams["artifact_name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "artifact_name") } - protoReq.ArtifactName, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "artifact_name", err) } - msg, err := client.ReadArtifactV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_ReadArtifactV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReadArtifactRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ReadArtifactRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - val, ok = pathParams["node_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") } - protoReq.NodeId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) } - val, ok = pathParams["artifact_name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "artifact_name") } - protoReq.ArtifactName, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "artifact_name", err) } - msg, err := server.ReadArtifactV1(ctx, &protoReq) return msg, metadata, err - } func request_RunService_TerminateRunV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TerminateRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq TerminateRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - msg, err := client.TerminateRunV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_TerminateRunV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TerminateRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq TerminateRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - msg, err := server.TerminateRunV1(ctx, &protoReq) return msg, metadata, err - } func request_RunService_RetryRunV1_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RetryRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq RetryRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - msg, err := client.RetryRunV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_RetryRunV1_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RetryRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq RetryRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - msg, err := server.RetryRunV1(ctx, &protoReq) return msg, metadata, err - } // RegisterRunServiceHandlerServer registers the http handlers for service RunService to "mux". // UnaryRPC :call RunServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRunServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRunServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RunServiceServer) error { - - mux.Handle("POST", pattern_RunService_CreateRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_CreateRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/CreateRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_CreateRunV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_CreateRunV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_CreateRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_CreateRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_GetRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_GetRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/GetRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_GetRunV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_GetRunV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_GetRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_GetRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_ListRunsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_ListRunsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/ListRunsV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_ListRunsV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_ListRunsV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ListRunsV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ListRunsV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_ArchiveRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_ArchiveRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/ArchiveRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_ArchiveRunV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_ArchiveRunV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ArchiveRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ArchiveRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_UnarchiveRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_UnarchiveRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/UnarchiveRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_UnarchiveRunV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_UnarchiveRunV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_UnarchiveRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_UnarchiveRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_RunService_DeleteRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RunService_DeleteRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/DeleteRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_DeleteRunV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_DeleteRunV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_DeleteRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_DeleteRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_ReportRunMetricsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_ReportRunMetricsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/ReportRunMetricsV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}:reportMetrics")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_ReportRunMetricsV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_ReportRunMetricsV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ReportRunMetricsV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ReportRunMetricsV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_ReadArtifactV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_ReadArtifactV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/ReadArtifactV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_ReadArtifactV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_ReadArtifactV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ReadArtifactV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ReadArtifactV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_TerminateRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_TerminateRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/TerminateRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}/terminate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_TerminateRunV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_TerminateRunV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_TerminateRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_TerminateRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_RetryRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_RetryRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.RunService/RetryRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}/retry")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_RetryRunV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_RetryRunV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_RetryRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_RetryRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -837,25 +660,24 @@ func RegisterRunServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterRunServiceHandlerFromEndpoint is same as RegisterRunServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRunServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterRunServiceHandler(ctx, mux, conn) } @@ -869,252 +691,203 @@ func RegisterRunServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RunServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RunServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RunServiceClient" to call the correct interceptors. +// "RunServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RunServiceClient) error { - - mux.Handle("POST", pattern_RunService_CreateRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_CreateRunV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/CreateRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_CreateRunV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_CreateRunV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_CreateRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_CreateRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_GetRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_GetRunV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/GetRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_GetRunV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_GetRunV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_GetRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_GetRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_ListRunsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_ListRunsV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/ListRunsV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ListRunsV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ListRunsV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ListRunsV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ListRunsV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_ArchiveRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_ArchiveRunV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/ArchiveRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ArchiveRunV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ArchiveRunV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ArchiveRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ArchiveRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_UnarchiveRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_UnarchiveRunV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/UnarchiveRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_UnarchiveRunV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_UnarchiveRunV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_UnarchiveRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_UnarchiveRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_RunService_DeleteRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RunService_DeleteRunV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/DeleteRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_DeleteRunV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_DeleteRunV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_DeleteRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_DeleteRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_ReportRunMetricsV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_ReportRunMetricsV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/ReportRunMetricsV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}:reportMetrics")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ReportRunMetricsV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ReportRunMetricsV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ReportRunMetricsV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ReportRunMetricsV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_ReadArtifactV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_ReadArtifactV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/ReadArtifactV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ReadArtifactV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ReadArtifactV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ReadArtifactV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ReadArtifactV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_TerminateRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_TerminateRunV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/TerminateRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}/terminate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_TerminateRunV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_TerminateRunV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_TerminateRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_TerminateRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_RetryRunV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_RetryRunV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.RunService/RetryRunV1", runtime.WithHTTPPathPattern("/apis/v1beta1/runs/{run_id}/retry")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_RetryRunV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_RetryRunV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_RetryRunV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_RetryRunV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_RunService_CreateRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "runs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_GetRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "run_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_ListRunsV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "runs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_ArchiveRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "id"}, "archive", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_UnarchiveRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "id"}, "unarchive", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_DeleteRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_ReportRunMetricsV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "run_id"}, "reportMetrics", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_ReadArtifactV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"apis", "v1beta1", "runs", "run_id", "nodes", "node_id", "artifacts", "artifact_name"}, "read", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_TerminateRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "runs", "run_id", "terminate"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_RetryRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "runs", "run_id", "retry"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_RunService_CreateRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "runs"}, "")) + pattern_RunService_GetRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "run_id"}, "")) + pattern_RunService_ListRunsV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "runs"}, "")) + pattern_RunService_ArchiveRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "id"}, "archive")) + pattern_RunService_UnarchiveRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "id"}, "unarchive")) + pattern_RunService_DeleteRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "id"}, "")) + pattern_RunService_ReportRunMetricsV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "runs", "run_id"}, "reportMetrics")) + pattern_RunService_ReadArtifactV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"apis", "v1beta1", "runs", "run_id", "nodes", "node_id", "artifacts", "artifact_name"}, "read")) + pattern_RunService_TerminateRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "runs", "run_id", "terminate"}, "")) + pattern_RunService_RetryRunV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "runs", "run_id", "retry"}, "")) ) var ( - forward_RunService_CreateRunV1_0 = runtime.ForwardResponseMessage - - forward_RunService_GetRunV1_0 = runtime.ForwardResponseMessage - - forward_RunService_ListRunsV1_0 = runtime.ForwardResponseMessage - - forward_RunService_ArchiveRunV1_0 = runtime.ForwardResponseMessage - - forward_RunService_UnarchiveRunV1_0 = runtime.ForwardResponseMessage - - forward_RunService_DeleteRunV1_0 = runtime.ForwardResponseMessage - + forward_RunService_CreateRunV1_0 = runtime.ForwardResponseMessage + forward_RunService_GetRunV1_0 = runtime.ForwardResponseMessage + forward_RunService_ListRunsV1_0 = runtime.ForwardResponseMessage + forward_RunService_ArchiveRunV1_0 = runtime.ForwardResponseMessage + forward_RunService_UnarchiveRunV1_0 = runtime.ForwardResponseMessage + forward_RunService_DeleteRunV1_0 = runtime.ForwardResponseMessage forward_RunService_ReportRunMetricsV1_0 = runtime.ForwardResponseMessage - - forward_RunService_ReadArtifactV1_0 = runtime.ForwardResponseMessage - - forward_RunService_TerminateRunV1_0 = runtime.ForwardResponseMessage - - forward_RunService_RetryRunV1_0 = runtime.ForwardResponseMessage + forward_RunService_ReadArtifactV1_0 = runtime.ForwardResponseMessage + forward_RunService_TerminateRunV1_0 = runtime.ForwardResponseMessage + forward_RunService_RetryRunV1_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v1beta1/go_client/run_grpc.pb.go b/backend/api/v1beta1/go_client/run_grpc.pb.go new file mode 100644 index 00000000000..c5d34e562ec --- /dev/null +++ b/backend/api/v1beta1/go_client/run_grpc.pb.go @@ -0,0 +1,504 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/run.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RunService_CreateRunV1_FullMethodName = "/api.RunService/CreateRunV1" + RunService_GetRunV1_FullMethodName = "/api.RunService/GetRunV1" + RunService_ListRunsV1_FullMethodName = "/api.RunService/ListRunsV1" + RunService_ArchiveRunV1_FullMethodName = "/api.RunService/ArchiveRunV1" + RunService_UnarchiveRunV1_FullMethodName = "/api.RunService/UnarchiveRunV1" + RunService_DeleteRunV1_FullMethodName = "/api.RunService/DeleteRunV1" + RunService_ReportRunMetricsV1_FullMethodName = "/api.RunService/ReportRunMetricsV1" + RunService_ReadArtifactV1_FullMethodName = "/api.RunService/ReadArtifactV1" + RunService_TerminateRunV1_FullMethodName = "/api.RunService/TerminateRunV1" + RunService_RetryRunV1_FullMethodName = "/api.RunService/RetryRunV1" +) + +// RunServiceClient is the client API for RunService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RunServiceClient interface { + // Creates a new run. + CreateRunV1(ctx context.Context, in *CreateRunRequest, opts ...grpc.CallOption) (*RunDetail, error) + // Finds a specific run by ID. + GetRunV1(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*RunDetail, error) + // Finds all runs. + ListRunsV1(ctx context.Context, in *ListRunsRequest, opts ...grpc.CallOption) (*ListRunsResponse, error) + // Archives a run. + ArchiveRunV1(ctx context.Context, in *ArchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Restores an archived run. + UnarchiveRunV1(ctx context.Context, in *UnarchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deletes a run. + DeleteRunV1(ctx context.Context, in *DeleteRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // ReportRunMetrics reports metrics of a run. Each metric is reported in its + // own transaction, so this API accepts partial failures. Metric can be + // uniquely identified by (run_id, node_id, name). Duplicate reporting will be + // ignored by the API. First reporting wins. + ReportRunMetricsV1(ctx context.Context, in *ReportRunMetricsRequest, opts ...grpc.CallOption) (*ReportRunMetricsResponse, error) + // Finds a run's artifact data. + ReadArtifactV1(ctx context.Context, in *ReadArtifactRequest, opts ...grpc.CallOption) (*ReadArtifactResponse, error) + // Terminates an active run. + TerminateRunV1(ctx context.Context, in *TerminateRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Re-initiates a failed or terminated run. + RetryRunV1(ctx context.Context, in *RetryRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type runServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRunServiceClient(cc grpc.ClientConnInterface) RunServiceClient { + return &runServiceClient{cc} +} + +func (c *runServiceClient) CreateRunV1(ctx context.Context, in *CreateRunRequest, opts ...grpc.CallOption) (*RunDetail, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RunDetail) + err := c.cc.Invoke(ctx, RunService_CreateRunV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) GetRunV1(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*RunDetail, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RunDetail) + err := c.cc.Invoke(ctx, RunService_GetRunV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) ListRunsV1(ctx context.Context, in *ListRunsRequest, opts ...grpc.CallOption) (*ListRunsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRunsResponse) + err := c.cc.Invoke(ctx, RunService_ListRunsV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) ArchiveRunV1(ctx context.Context, in *ArchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_ArchiveRunV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) UnarchiveRunV1(ctx context.Context, in *UnarchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_UnarchiveRunV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) DeleteRunV1(ctx context.Context, in *DeleteRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_DeleteRunV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) ReportRunMetricsV1(ctx context.Context, in *ReportRunMetricsRequest, opts ...grpc.CallOption) (*ReportRunMetricsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReportRunMetricsResponse) + err := c.cc.Invoke(ctx, RunService_ReportRunMetricsV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) ReadArtifactV1(ctx context.Context, in *ReadArtifactRequest, opts ...grpc.CallOption) (*ReadArtifactResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReadArtifactResponse) + err := c.cc.Invoke(ctx, RunService_ReadArtifactV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) TerminateRunV1(ctx context.Context, in *TerminateRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_TerminateRunV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) RetryRunV1(ctx context.Context, in *RetryRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_RetryRunV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RunServiceServer is the server API for RunService service. +// All implementations must embed UnimplementedRunServiceServer +// for forward compatibility. +type RunServiceServer interface { + // Creates a new run. + CreateRunV1(context.Context, *CreateRunRequest) (*RunDetail, error) + // Finds a specific run by ID. + GetRunV1(context.Context, *GetRunRequest) (*RunDetail, error) + // Finds all runs. + ListRunsV1(context.Context, *ListRunsRequest) (*ListRunsResponse, error) + // Archives a run. + ArchiveRunV1(context.Context, *ArchiveRunRequest) (*emptypb.Empty, error) + // Restores an archived run. + UnarchiveRunV1(context.Context, *UnarchiveRunRequest) (*emptypb.Empty, error) + // Deletes a run. + DeleteRunV1(context.Context, *DeleteRunRequest) (*emptypb.Empty, error) + // ReportRunMetrics reports metrics of a run. Each metric is reported in its + // own transaction, so this API accepts partial failures. Metric can be + // uniquely identified by (run_id, node_id, name). Duplicate reporting will be + // ignored by the API. First reporting wins. + ReportRunMetricsV1(context.Context, *ReportRunMetricsRequest) (*ReportRunMetricsResponse, error) + // Finds a run's artifact data. + ReadArtifactV1(context.Context, *ReadArtifactRequest) (*ReadArtifactResponse, error) + // Terminates an active run. + TerminateRunV1(context.Context, *TerminateRunRequest) (*emptypb.Empty, error) + // Re-initiates a failed or terminated run. + RetryRunV1(context.Context, *RetryRunRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedRunServiceServer() +} + +// UnimplementedRunServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRunServiceServer struct{} + +func (UnimplementedRunServiceServer) CreateRunV1(context.Context, *CreateRunRequest) (*RunDetail, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRunV1 not implemented") +} +func (UnimplementedRunServiceServer) GetRunV1(context.Context, *GetRunRequest) (*RunDetail, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRunV1 not implemented") +} +func (UnimplementedRunServiceServer) ListRunsV1(context.Context, *ListRunsRequest) (*ListRunsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRunsV1 not implemented") +} +func (UnimplementedRunServiceServer) ArchiveRunV1(context.Context, *ArchiveRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveRunV1 not implemented") +} +func (UnimplementedRunServiceServer) UnarchiveRunV1(context.Context, *UnarchiveRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnarchiveRunV1 not implemented") +} +func (UnimplementedRunServiceServer) DeleteRunV1(context.Context, *DeleteRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRunV1 not implemented") +} +func (UnimplementedRunServiceServer) ReportRunMetricsV1(context.Context, *ReportRunMetricsRequest) (*ReportRunMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReportRunMetricsV1 not implemented") +} +func (UnimplementedRunServiceServer) ReadArtifactV1(context.Context, *ReadArtifactRequest) (*ReadArtifactResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadArtifactV1 not implemented") +} +func (UnimplementedRunServiceServer) TerminateRunV1(context.Context, *TerminateRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method TerminateRunV1 not implemented") +} +func (UnimplementedRunServiceServer) RetryRunV1(context.Context, *RetryRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method RetryRunV1 not implemented") +} +func (UnimplementedRunServiceServer) mustEmbedUnimplementedRunServiceServer() {} +func (UnimplementedRunServiceServer) testEmbeddedByValue() {} + +// UnsafeRunServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RunServiceServer will +// result in compilation errors. +type UnsafeRunServiceServer interface { + mustEmbedUnimplementedRunServiceServer() +} + +func RegisterRunServiceServer(s grpc.ServiceRegistrar, srv RunServiceServer) { + // If the following call pancis, it indicates UnimplementedRunServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RunService_ServiceDesc, srv) +} + +func _RunService_CreateRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).CreateRunV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_CreateRunV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).CreateRunV1(ctx, req.(*CreateRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_GetRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).GetRunV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_GetRunV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).GetRunV1(ctx, req.(*GetRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_ListRunsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRunsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).ListRunsV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_ListRunsV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).ListRunsV1(ctx, req.(*ListRunsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_ArchiveRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).ArchiveRunV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_ArchiveRunV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).ArchiveRunV1(ctx, req.(*ArchiveRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_UnarchiveRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnarchiveRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).UnarchiveRunV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_UnarchiveRunV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).UnarchiveRunV1(ctx, req.(*UnarchiveRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_DeleteRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).DeleteRunV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_DeleteRunV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).DeleteRunV1(ctx, req.(*DeleteRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_ReportRunMetricsV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportRunMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).ReportRunMetricsV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_ReportRunMetricsV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).ReportRunMetricsV1(ctx, req.(*ReportRunMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_ReadArtifactV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadArtifactRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).ReadArtifactV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_ReadArtifactV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).ReadArtifactV1(ctx, req.(*ReadArtifactRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_TerminateRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TerminateRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).TerminateRunV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_TerminateRunV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).TerminateRunV1(ctx, req.(*TerminateRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_RetryRunV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).RetryRunV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_RetryRunV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).RetryRunV1(ctx, req.(*RetryRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RunService_ServiceDesc is the grpc.ServiceDesc for RunService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RunService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.RunService", + HandlerType: (*RunServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateRunV1", + Handler: _RunService_CreateRunV1_Handler, + }, + { + MethodName: "GetRunV1", + Handler: _RunService_GetRunV1_Handler, + }, + { + MethodName: "ListRunsV1", + Handler: _RunService_ListRunsV1_Handler, + }, + { + MethodName: "ArchiveRunV1", + Handler: _RunService_ArchiveRunV1_Handler, + }, + { + MethodName: "UnarchiveRunV1", + Handler: _RunService_UnarchiveRunV1_Handler, + }, + { + MethodName: "DeleteRunV1", + Handler: _RunService_DeleteRunV1_Handler, + }, + { + MethodName: "ReportRunMetricsV1", + Handler: _RunService_ReportRunMetricsV1_Handler, + }, + { + MethodName: "ReadArtifactV1", + Handler: _RunService_ReadArtifactV1_Handler, + }, + { + MethodName: "TerminateRunV1", + Handler: _RunService_TerminateRunV1_Handler, + }, + { + MethodName: "RetryRunV1", + Handler: _RunService_RetryRunV1_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/run.proto", +} diff --git a/backend/api/v1beta1/go_client/task.pb.go b/backend/api/v1beta1/go_client/task.pb.go index fd2a4207c97..29b3c4c7845 100644 --- a/backend/api/v1beta1/go_client/task.pb.go +++ b/backend/api/v1beta1/go_client/task.pb.go @@ -14,23 +14,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/task.proto package go_client import ( - context "context" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -41,10 +38,7 @@ const ( ) type Task struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique task ID. Generated by API server. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Optional input field. The Namespace to which this pipeline task belongs. @@ -63,16 +57,16 @@ type Task struct { // Optional input field. The time this task is finished. FinishedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` // Required input field. - Fingerprint string `protobuf:"bytes,8,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + Fingerprint string `protobuf:"bytes,8,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Task) Reset() { *x = Task{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_task_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_task_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Task) String() string { @@ -83,7 +77,7 @@ func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_task_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,20 +149,17 @@ func (x *Task) GetFingerprint() string { } type CreateTaskRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` unknownFields protoimpl.UnknownFields - - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateTaskRequest) Reset() { *x = CreateTaskRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_task_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_task_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateTaskRequest) String() string { @@ -179,7 +170,7 @@ func (*CreateTaskRequest) ProtoMessage() {} func (x *CreateTaskRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_task_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -202,10 +193,7 @@ func (x *CreateTaskRequest) GetTask() *Task { } type ListTasksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListExperiment call or can be omitted when fetching the first page. @@ -223,16 +211,16 @@ type ListTasksRequest struct { ResourceReferenceKey *ResourceKey `protobuf:"bytes,4,opt,name=resource_reference_key,json=resourceReferenceKey,proto3" json:"resource_reference_key,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). - Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListTasksRequest) Reset() { *x = ListTasksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_task_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_task_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksRequest) String() string { @@ -243,7 +231,7 @@ func (*ListTasksRequest) ProtoMessage() {} func (x *ListTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_task_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,25 +282,22 @@ func (x *ListTasksRequest) GetFilter() string { } type ListTasksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of tasks returned. Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` // The token to list the next page of experiments. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // The total number of experiments for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListTasksResponse) Reset() { *x = ListTasksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_task_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_task_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListTasksResponse) String() string { @@ -323,7 +308,7 @@ func (*ListTasksResponse) ProtoMessage() {} func (x *ListTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_task_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,92 +346,52 @@ func (x *ListTasksResponse) GetTotalSize() int32 { var File_backend_api_v1beta1_task_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_task_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xb2, 0x02, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, - 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6c, 0x6d, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x6c, - 0x6d, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, - 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, - 0x72, 0x69, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, - 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x22, 0x32, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x04, - 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xc7, 0x01, 0x0a, 0x10, - 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x07, - 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x46, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x7b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, - 0x7a, 0x65, 0x32, 0xc0, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x56, 0x31, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x09, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x04, 0x74, - 0x61, 0x73, 0x6b, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x5a, 0x0a, 0x0b, 0x4c, 0x69, 0x73, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x56, 0x31, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, - 0x14, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x74, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_task_proto_rawDesc = "" + + "\n" + + "\x1ebackend/api/v1beta1/task.proto\x12\x03api\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a,backend/api/v1beta1/resource_reference.proto\"\xb2\x02\n" + + "\x04Task\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\"\n" + + "\fpipelineName\x18\x03 \x01(\tR\fpipelineName\x12\x14\n" + + "\x05runId\x18\x04 \x01(\tR\x05runId\x12(\n" + + "\x0fmlmdExecutionID\x18\x05 \x01(\tR\x0fmlmdExecutionID\x129\n" + + "\n" + + "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12;\n" + + "\vfinished_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "finishedAt\x12 \n" + + "\vfingerprint\x18\b \x01(\tR\vfingerprint\"2\n" + + "\x11CreateTaskRequest\x12\x1d\n" + + "\x04task\x18\x01 \x01(\v2\t.api.TaskR\x04task\"\xc7\x01\n" + + "\x10ListTasksRequest\x12\x1d\n" + + "\n" + + "page_token\x18\x01 \x01(\tR\tpageToken\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x17\n" + + "\asort_by\x18\x03 \x01(\tR\x06sortBy\x12F\n" + + "\x16resource_reference_key\x18\x04 \x01(\v2\x10.api.ResourceKeyR\x14resourceReferenceKey\x12\x16\n" + + "\x06filter\x18\x05 \x01(\tR\x06filter\"{\n" + + "\x11ListTasksResponse\x12\x1f\n" + + "\x05tasks\x18\x01 \x03(\v2\t.api.TaskR\x05tasks\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize2\xc0\x01\n" + + "\vTaskService\x12U\n" + + "\fCreateTaskV1\x12\x16.api.CreateTaskRequest\x1a\t.api.Task\"\"\x82\xd3\xe4\x93\x02\x1c:\x04task\"\x14/apis/v1alpha1/tasks\x12Z\n" + + "\vListTasksV1\x12\x15.api.ListTasksRequest\x1a\x16.api.ListTasksResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/apis/v1alpha1/tasksB=Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_task_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_task_proto_rawDescData = file_backend_api_v1beta1_task_proto_rawDesc + file_backend_api_v1beta1_task_proto_rawDescData []byte ) func file_backend_api_v1beta1_task_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_task_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_task_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_task_proto_rawDescData) + file_backend_api_v1beta1_task_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_task_proto_rawDesc), len(file_backend_api_v1beta1_task_proto_rawDesc))) }) return file_backend_api_v1beta1_task_proto_rawDescData } var file_backend_api_v1beta1_task_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_backend_api_v1beta1_task_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_task_proto_goTypes = []any{ (*Task)(nil), // 0: api.Task (*CreateTaskRequest)(nil), // 1: api.CreateTaskRequest (*ListTasksRequest)(nil), // 2: api.ListTasksRequest @@ -477,61 +422,11 @@ func file_backend_api_v1beta1_task_proto_init() { return } file_backend_api_v1beta1_resource_reference_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_task_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Task); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_task_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTaskRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_task_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTasksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_task_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTasksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_task_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_task_proto_rawDesc), len(file_backend_api_v1beta1_task_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -542,127 +437,6 @@ func file_backend_api_v1beta1_task_proto_init() { MessageInfos: file_backend_api_v1beta1_task_proto_msgTypes, }.Build() File_backend_api_v1beta1_task_proto = out.File - file_backend_api_v1beta1_task_proto_rawDesc = nil file_backend_api_v1beta1_task_proto_goTypes = nil file_backend_api_v1beta1_task_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// TaskServiceClient is the client API for TaskService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TaskServiceClient interface { - // Creates a new task. - CreateTaskV1(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) - // Finds all tasks. Supports pagination, and sorting on certain fields. - ListTasksV1(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) -} - -type taskServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient { - return &taskServiceClient{cc} -} - -func (c *taskServiceClient) CreateTaskV1(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) { - out := new(Task) - err := c.cc.Invoke(ctx, "/api.TaskService/CreateTaskV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskServiceClient) ListTasksV1(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { - out := new(ListTasksResponse) - err := c.cc.Invoke(ctx, "/api.TaskService/ListTasksV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TaskServiceServer is the server API for TaskService service. -type TaskServiceServer interface { - // Creates a new task. - CreateTaskV1(context.Context, *CreateTaskRequest) (*Task, error) - // Finds all tasks. Supports pagination, and sorting on certain fields. - ListTasksV1(context.Context, *ListTasksRequest) (*ListTasksResponse, error) -} - -// UnimplementedTaskServiceServer can be embedded to have forward compatible implementations. -type UnimplementedTaskServiceServer struct { -} - -func (*UnimplementedTaskServiceServer) CreateTaskV1(context.Context, *CreateTaskRequest) (*Task, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTaskV1 not implemented") -} -func (*UnimplementedTaskServiceServer) ListTasksV1(context.Context, *ListTasksRequest) (*ListTasksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListTasksV1 not implemented") -} - -func RegisterTaskServiceServer(s *grpc.Server, srv TaskServiceServer) { - s.RegisterService(&_TaskService_serviceDesc, srv) -} - -func _TaskService_CreateTaskV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskServiceServer).CreateTaskV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.TaskService/CreateTaskV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskServiceServer).CreateTaskV1(ctx, req.(*CreateTaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskService_ListTasksV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTasksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskServiceServer).ListTasksV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.TaskService/ListTasksV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskServiceServer).ListTasksV1(ctx, req.(*ListTasksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _TaskService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.TaskService", - HandlerType: (*TaskServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateTaskV1", - Handler: _TaskService_CreateTaskV1_Handler, - }, - { - MethodName: "ListTasksV1", - Handler: _TaskService_ListTasksV1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/task.proto", -} diff --git a/backend/api/v1beta1/go_client/task.pb.gw.go b/backend/api/v1beta1/go_client/task.pb.gw.go index dafd412bcab..1d7448888f8 100644 --- a/backend/api/v1beta1/go_client/task.pb.gw.go +++ b/backend/api/v1beta1/go_client/task.pb.gw.go @@ -10,149 +10,138 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_TaskService_CreateTaskV1_0(ctx context.Context, marshaler runtime.Marshaler, client TaskServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateTaskRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Task); err != nil && err != io.EOF { + var ( + protoReq CreateTaskRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Task); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreateTaskV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TaskService_CreateTaskV1_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateTaskRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Task); err != nil && err != io.EOF { + var ( + protoReq CreateTaskRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Task); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateTaskV1(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_TaskService_ListTasksV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_TaskService_ListTasksV1_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_TaskService_ListTasksV1_0(ctx context.Context, marshaler runtime.Marshaler, client TaskServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListTasksRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListTasksRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskService_ListTasksV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListTasksV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_TaskService_ListTasksV1_0(ctx context.Context, marshaler runtime.Marshaler, server TaskServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListTasksRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListTasksRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskService_ListTasksV1_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListTasksV1(ctx, &protoReq) return msg, metadata, err - } // RegisterTaskServiceHandlerServer registers the http handlers for service TaskService to "mux". // UnaryRPC :call TaskServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTaskServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterTaskServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TaskServiceServer) error { - - mux.Handle("POST", pattern_TaskService_CreateTaskV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TaskService_CreateTaskV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.TaskService/CreateTaskV1", runtime.WithHTTPPathPattern("/apis/v1alpha1/tasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_TaskService_CreateTaskV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_TaskService_CreateTaskV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_TaskService_CreateTaskV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_TaskService_CreateTaskV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_TaskService_ListTasksV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_TaskService_ListTasksV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.TaskService/ListTasksV1", runtime.WithHTTPPathPattern("/apis/v1alpha1/tasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_TaskService_ListTasksV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_TaskService_ListTasksV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_TaskService_ListTasksV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_TaskService_ListTasksV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -161,25 +150,24 @@ func RegisterTaskServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterTaskServiceHandlerFromEndpoint is same as RegisterTaskServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterTaskServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterTaskServiceHandler(ctx, mux, conn) } @@ -193,60 +181,51 @@ func RegisterTaskServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TaskServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TaskServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TaskServiceClient" to call the correct interceptors. +// "TaskServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterTaskServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TaskServiceClient) error { - - mux.Handle("POST", pattern_TaskService_CreateTaskV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_TaskService_CreateTaskV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.TaskService/CreateTaskV1", runtime.WithHTTPPathPattern("/apis/v1alpha1/tasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_CreateTaskV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_CreateTaskV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_TaskService_CreateTaskV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_TaskService_CreateTaskV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_TaskService_ListTasksV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_TaskService_ListTasksV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.TaskService/ListTasksV1", runtime.WithHTTPPathPattern("/apis/v1alpha1/tasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_TaskService_ListTasksV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_TaskService_ListTasksV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_TaskService_ListTasksV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_TaskService_ListTasksV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_TaskService_CreateTaskV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1alpha1", "tasks"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_TaskService_ListTasksV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1alpha1", "tasks"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_TaskService_CreateTaskV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1alpha1", "tasks"}, "")) + pattern_TaskService_ListTasksV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1alpha1", "tasks"}, "")) ) var ( forward_TaskService_CreateTaskV1_0 = runtime.ForwardResponseMessage - - forward_TaskService_ListTasksV1_0 = runtime.ForwardResponseMessage + forward_TaskService_ListTasksV1_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v1beta1/go_client/task_grpc.pb.go b/backend/api/v1beta1/go_client/task_grpc.pb.go new file mode 100644 index 00000000000..bc7bb23cfbb --- /dev/null +++ b/backend/api/v1beta1/go_client/task_grpc.pb.go @@ -0,0 +1,177 @@ +// Copyright 2021 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/task.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + TaskService_CreateTaskV1_FullMethodName = "/api.TaskService/CreateTaskV1" + TaskService_ListTasksV1_FullMethodName = "/api.TaskService/ListTasksV1" +) + +// TaskServiceClient is the client API for TaskService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TaskServiceClient interface { + // Creates a new task. + CreateTaskV1(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) + // Finds all tasks. Supports pagination, and sorting on certain fields. + ListTasksV1(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) +} + +type taskServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient { + return &taskServiceClient{cc} +} + +func (c *taskServiceClient) CreateTaskV1(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Task) + err := c.cc.Invoke(ctx, TaskService_CreateTaskV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *taskServiceClient) ListTasksV1(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListTasksResponse) + err := c.cc.Invoke(ctx, TaskService_ListTasksV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TaskServiceServer is the server API for TaskService service. +// All implementations must embed UnimplementedTaskServiceServer +// for forward compatibility. +type TaskServiceServer interface { + // Creates a new task. + CreateTaskV1(context.Context, *CreateTaskRequest) (*Task, error) + // Finds all tasks. Supports pagination, and sorting on certain fields. + ListTasksV1(context.Context, *ListTasksRequest) (*ListTasksResponse, error) + mustEmbedUnimplementedTaskServiceServer() +} + +// UnimplementedTaskServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedTaskServiceServer struct{} + +func (UnimplementedTaskServiceServer) CreateTaskV1(context.Context, *CreateTaskRequest) (*Task, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTaskV1 not implemented") +} +func (UnimplementedTaskServiceServer) ListTasksV1(context.Context, *ListTasksRequest) (*ListTasksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTasksV1 not implemented") +} +func (UnimplementedTaskServiceServer) mustEmbedUnimplementedTaskServiceServer() {} +func (UnimplementedTaskServiceServer) testEmbeddedByValue() {} + +// UnsafeTaskServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TaskServiceServer will +// result in compilation errors. +type UnsafeTaskServiceServer interface { + mustEmbedUnimplementedTaskServiceServer() +} + +func RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) { + // If the following call pancis, it indicates UnimplementedTaskServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&TaskService_ServiceDesc, srv) +} + +func _TaskService_CreateTaskV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).CreateTaskV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_CreateTaskV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).CreateTaskV1(ctx, req.(*CreateTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TaskService_ListTasksV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TaskServiceServer).ListTasksV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TaskService_ListTasksV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TaskServiceServer).ListTasksV1(ctx, req.(*ListTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TaskService_ServiceDesc is the grpc.ServiceDesc for TaskService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TaskService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.TaskService", + HandlerType: (*TaskServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateTaskV1", + Handler: _TaskService_CreateTaskV1_Handler, + }, + { + MethodName: "ListTasksV1", + Handler: _TaskService_ListTasksV1_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/task.proto", +} diff --git a/backend/api/v1beta1/go_client/visualization.pb.go b/backend/api/v1beta1/go_client/visualization.pb.go index c407d2e5c69..f8bc771618a 100644 --- a/backend/api/v1beta1/go_client/visualization.pb.go +++ b/backend/api/v1beta1/go_client/visualization.pb.go @@ -14,23 +14,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v1beta1/visualization.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -102,21 +99,18 @@ func (Visualization_Type) EnumDescriptor() ([]byte, []int) { // and input data paths. Input dat paths are assumed to be unique and are used // for determining output path. type CreateVisualizationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Visualization *Visualization `protobuf:"bytes,1,opt,name=visualization,proto3" json:"visualization,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` unknownFields protoimpl.UnknownFields - - Visualization *Visualization `protobuf:"bytes,1,opt,name=visualization,proto3" json:"visualization,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateVisualizationRequest) Reset() { *x = CreateVisualizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_visualization_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_visualization_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVisualizationRequest) String() string { @@ -127,7 +121,7 @@ func (*CreateVisualizationRequest) ProtoMessage() {} func (x *CreateVisualizationRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_visualization_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,11 +151,8 @@ func (x *CreateVisualizationRequest) GetNamespace() string { } type Visualization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type Visualization_Type `protobuf:"varint,1,opt,name=type,proto3,enum=api.Visualization_Type" json:"type,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Type Visualization_Type `protobuf:"varint,1,opt,name=type,proto3,enum=api.Visualization_Type" json:"type,omitempty"` // Path pattern of input data to be used during generation of visualizations. // This is required when creating the pipeline through CreateVisualization // API. @@ -176,16 +167,16 @@ type Visualization struct { // In case any error happens when generating visualizations, only // visualization ID and the error message are returned. Client has the // flexibility of choosing how to handle the error. - Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` + Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Visualization) Reset() { *x = Visualization{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v1beta1_visualization_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v1beta1_visualization_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Visualization) String() string { @@ -196,7 +187,7 @@ func (*Visualization) ProtoMessage() {} func (x *Visualization) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v1beta1_visualization_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,76 +239,50 @@ func (x *Visualization) GetError() string { var File_backend_api_v1beta1_visualization_proto protoreflect.FileDescriptor -var file_backend_api_v1beta1_visualization_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, - 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x1a, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0d, 0x76, 0x69, 0x73, - 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0xde, 0x01, 0x0a, 0x0d, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x72, 0x67, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x74, 0x6d, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x74, 0x6d, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x22, 0x40, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x4f, 0x43, 0x5f, - 0x43, 0x55, 0x52, 0x56, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x46, 0x44, 0x56, 0x10, - 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x46, 0x4d, 0x41, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x54, - 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, - 0x10, 0x04, 0x32, 0xa6, 0x01, 0x0a, 0x14, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x15, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, - 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x39, 0x3a, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x42, 0x91, 0x01, 0x92, 0x41, - 0x51, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x1c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x12, 0x11, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, - 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, - 0x12, 0x00, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v1beta1_visualization_proto_rawDesc = "" + + "\n" + + "'backend/api/v1beta1/visualization.proto\x12\x03api\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"t\n" + + "\x1aCreateVisualizationRequest\x128\n" + + "\rvisualization\x18\x01 \x01(\v2\x12.api.VisualizationR\rvisualization\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\"\xde\x01\n" + + "\rVisualization\x12+\n" + + "\x04type\x18\x01 \x01(\x0e2\x17.api.Visualization.TypeR\x04type\x12\x16\n" + + "\x06source\x18\x02 \x01(\tR\x06source\x12\x1c\n" + + "\targuments\x18\x03 \x01(\tR\targuments\x12\x12\n" + + "\x04html\x18\x04 \x01(\tR\x04html\x12\x14\n" + + "\x05error\x18\x05 \x01(\tR\x05error\"@\n" + + "\x04Type\x12\r\n" + + "\tROC_CURVE\x10\x00\x12\b\n" + + "\x04TFDV\x10\x01\x12\b\n" + + "\x04TFMA\x10\x02\x12\t\n" + + "\x05TABLE\x10\x03\x12\n" + + "\n" + + "\x06CUSTOM\x10\x042\xa6\x01\n" + + "\x14VisualizationService\x12\x8d\x01\n" + + "\x15CreateVisualizationV1\x12\x1f.api.CreateVisualizationRequest\x1a\x12.api.Visualization\"?\x82\xd3\xe4\x93\x029:\rvisualization\"(/apis/v1beta1/visualizations/{namespace}B\x91\x01\x92AQ*\x02\x01\x02R\x1c\n" + + "\adefault\x12\x11\x12\x0f\n" + + "\r\x1a\v.api.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v1beta1/go_clientb\x06proto3" var ( file_backend_api_v1beta1_visualization_proto_rawDescOnce sync.Once - file_backend_api_v1beta1_visualization_proto_rawDescData = file_backend_api_v1beta1_visualization_proto_rawDesc + file_backend_api_v1beta1_visualization_proto_rawDescData []byte ) func file_backend_api_v1beta1_visualization_proto_rawDescGZIP() []byte { file_backend_api_v1beta1_visualization_proto_rawDescOnce.Do(func() { - file_backend_api_v1beta1_visualization_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v1beta1_visualization_proto_rawDescData) + file_backend_api_v1beta1_visualization_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_visualization_proto_rawDesc), len(file_backend_api_v1beta1_visualization_proto_rawDesc))) }) return file_backend_api_v1beta1_visualization_proto_rawDescData } var file_backend_api_v1beta1_visualization_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_backend_api_v1beta1_visualization_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_backend_api_v1beta1_visualization_proto_goTypes = []interface{}{ +var file_backend_api_v1beta1_visualization_proto_goTypes = []any{ (Visualization_Type)(0), // 0: api.Visualization.Type (*CreateVisualizationRequest)(nil), // 1: api.CreateVisualizationRequest (*Visualization)(nil), // 2: api.Visualization @@ -339,38 +304,11 @@ func file_backend_api_v1beta1_visualization_proto_init() { if File_backend_api_v1beta1_visualization_proto != nil { return } - file_backend_api_v1beta1_error_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v1beta1_visualization_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateVisualizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v1beta1_visualization_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Visualization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v1beta1_visualization_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v1beta1_visualization_proto_rawDesc), len(file_backend_api_v1beta1_visualization_proto_rawDesc)), NumEnums: 1, NumMessages: 2, NumExtensions: 0, @@ -382,87 +320,6 @@ func file_backend_api_v1beta1_visualization_proto_init() { MessageInfos: file_backend_api_v1beta1_visualization_proto_msgTypes, }.Build() File_backend_api_v1beta1_visualization_proto = out.File - file_backend_api_v1beta1_visualization_proto_rawDesc = nil file_backend_api_v1beta1_visualization_proto_goTypes = nil file_backend_api_v1beta1_visualization_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// VisualizationServiceClient is the client API for VisualizationService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type VisualizationServiceClient interface { - CreateVisualizationV1(ctx context.Context, in *CreateVisualizationRequest, opts ...grpc.CallOption) (*Visualization, error) -} - -type visualizationServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewVisualizationServiceClient(cc grpc.ClientConnInterface) VisualizationServiceClient { - return &visualizationServiceClient{cc} -} - -func (c *visualizationServiceClient) CreateVisualizationV1(ctx context.Context, in *CreateVisualizationRequest, opts ...grpc.CallOption) (*Visualization, error) { - out := new(Visualization) - err := c.cc.Invoke(ctx, "/api.VisualizationService/CreateVisualizationV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// VisualizationServiceServer is the server API for VisualizationService service. -type VisualizationServiceServer interface { - CreateVisualizationV1(context.Context, *CreateVisualizationRequest) (*Visualization, error) -} - -// UnimplementedVisualizationServiceServer can be embedded to have forward compatible implementations. -type UnimplementedVisualizationServiceServer struct { -} - -func (*UnimplementedVisualizationServiceServer) CreateVisualizationV1(context.Context, *CreateVisualizationRequest) (*Visualization, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateVisualizationV1 not implemented") -} - -func RegisterVisualizationServiceServer(s *grpc.Server, srv VisualizationServiceServer) { - s.RegisterService(&_VisualizationService_serviceDesc, srv) -} - -func _VisualizationService_CreateVisualizationV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateVisualizationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VisualizationServiceServer).CreateVisualizationV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.VisualizationService/CreateVisualizationV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VisualizationServiceServer).CreateVisualizationV1(ctx, req.(*CreateVisualizationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _VisualizationService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.VisualizationService", - HandlerType: (*VisualizationServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateVisualizationV1", - Handler: _VisualizationService_CreateVisualizationV1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v1beta1/visualization.proto", -} diff --git a/backend/api/v1beta1/go_client/visualization.pb.gw.go b/backend/api/v1beta1/go_client/visualization.pb.gw.go index f3f7d676162..306a3805b7d 100644 --- a/backend/api/v1beta1/go_client/visualization.pb.gw.go +++ b/backend/api/v1beta1/go_client/visualization.pb.gw.go @@ -10,126 +10,101 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_VisualizationService_CreateVisualizationV1_0(ctx context.Context, marshaler runtime.Marshaler, client VisualizationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateVisualizationRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Visualization); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq CreateVisualizationRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["namespace"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Visualization); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } - protoReq.Namespace, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } - msg, err := client.CreateVisualizationV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_VisualizationService_CreateVisualizationV1_0(ctx context.Context, marshaler runtime.Marshaler, server VisualizationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateVisualizationRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Visualization); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq CreateVisualizationRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["namespace"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Visualization); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } - protoReq.Namespace, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } - msg, err := server.CreateVisualizationV1(ctx, &protoReq) return msg, metadata, err - } // RegisterVisualizationServiceHandlerServer registers the http handlers for service VisualizationService to "mux". // UnaryRPC :call VisualizationServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVisualizationServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterVisualizationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VisualizationServiceServer) error { - - mux.Handle("POST", pattern_VisualizationService_CreateVisualizationV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_VisualizationService_CreateVisualizationV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.VisualizationService/CreateVisualizationV1", runtime.WithHTTPPathPattern("/apis/v1beta1/visualizations/{namespace}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_VisualizationService_CreateVisualizationV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_VisualizationService_CreateVisualizationV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_VisualizationService_CreateVisualizationV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_VisualizationService_CreateVisualizationV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -138,25 +113,24 @@ func RegisterVisualizationServiceHandlerServer(ctx context.Context, mux *runtime // RegisterVisualizationServiceHandlerFromEndpoint is same as RegisterVisualizationServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterVisualizationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterVisualizationServiceHandler(ctx, mux, conn) } @@ -170,34 +144,30 @@ func RegisterVisualizationServiceHandler(ctx context.Context, mux *runtime.Serve // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VisualizationServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VisualizationServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "VisualizationServiceClient" to call the correct interceptors. +// "VisualizationServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterVisualizationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VisualizationServiceClient) error { - - mux.Handle("POST", pattern_VisualizationService_CreateVisualizationV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_VisualizationService_CreateVisualizationV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.VisualizationService/CreateVisualizationV1", runtime.WithHTTPPathPattern("/apis/v1beta1/visualizations/{namespace}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_VisualizationService_CreateVisualizationV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_VisualizationService_CreateVisualizationV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_VisualizationService_CreateVisualizationV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_VisualizationService_CreateVisualizationV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_VisualizationService_CreateVisualizationV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "visualizations", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_VisualizationService_CreateVisualizationV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta1", "visualizations", "namespace"}, "")) ) var ( diff --git a/backend/api/v1beta1/go_client/visualization_grpc.pb.go b/backend/api/v1beta1/go_client/visualization_grpc.pb.go new file mode 100644 index 00000000000..a6e7831da6b --- /dev/null +++ b/backend/api/v1beta1/go_client/visualization_grpc.pb.go @@ -0,0 +1,135 @@ +// Copyright 2019 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v1beta1/visualization.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + VisualizationService_CreateVisualizationV1_FullMethodName = "/api.VisualizationService/CreateVisualizationV1" +) + +// VisualizationServiceClient is the client API for VisualizationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type VisualizationServiceClient interface { + CreateVisualizationV1(ctx context.Context, in *CreateVisualizationRequest, opts ...grpc.CallOption) (*Visualization, error) +} + +type visualizationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewVisualizationServiceClient(cc grpc.ClientConnInterface) VisualizationServiceClient { + return &visualizationServiceClient{cc} +} + +func (c *visualizationServiceClient) CreateVisualizationV1(ctx context.Context, in *CreateVisualizationRequest, opts ...grpc.CallOption) (*Visualization, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Visualization) + err := c.cc.Invoke(ctx, VisualizationService_CreateVisualizationV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VisualizationServiceServer is the server API for VisualizationService service. +// All implementations must embed UnimplementedVisualizationServiceServer +// for forward compatibility. +type VisualizationServiceServer interface { + CreateVisualizationV1(context.Context, *CreateVisualizationRequest) (*Visualization, error) + mustEmbedUnimplementedVisualizationServiceServer() +} + +// UnimplementedVisualizationServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedVisualizationServiceServer struct{} + +func (UnimplementedVisualizationServiceServer) CreateVisualizationV1(context.Context, *CreateVisualizationRequest) (*Visualization, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateVisualizationV1 not implemented") +} +func (UnimplementedVisualizationServiceServer) mustEmbedUnimplementedVisualizationServiceServer() {} +func (UnimplementedVisualizationServiceServer) testEmbeddedByValue() {} + +// UnsafeVisualizationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to VisualizationServiceServer will +// result in compilation errors. +type UnsafeVisualizationServiceServer interface { + mustEmbedUnimplementedVisualizationServiceServer() +} + +func RegisterVisualizationServiceServer(s grpc.ServiceRegistrar, srv VisualizationServiceServer) { + // If the following call pancis, it indicates UnimplementedVisualizationServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&VisualizationService_ServiceDesc, srv) +} + +func _VisualizationService_CreateVisualizationV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateVisualizationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisualizationServiceServer).CreateVisualizationV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VisualizationService_CreateVisualizationV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisualizationServiceServer).CreateVisualizationV1(ctx, req.(*CreateVisualizationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// VisualizationService_ServiceDesc is the grpc.ServiceDesc for VisualizationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var VisualizationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.VisualizationService", + HandlerType: (*VisualizationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateVisualizationV1", + Handler: _VisualizationService_CreateVisualizationV1_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v1beta1/visualization.proto", +} diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_client.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_client.go index f607e00fdea..40004fd51ba 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_client.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_client.go @@ -8,8 +8,7 @@ package experiment_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_client/experiment_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Experiment cli := new(Experiment) cli.Transport = transport - cli.ExperimentService = experiment_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Experiment is a client for experiment type Experiment struct { - ExperimentService *experiment_service.Client + ExperimentService experiment_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Experiment struct { // SetTransport changes the transport on the client and all its subresources func (c *Experiment) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.ExperimentService.SetTransport(transport) - } diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_v1_parameters.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_v1_parameters.go index 3d4f69c3333..afe9d4881c9 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewExperimentServiceArchiveExperimentV1Params creates a new ExperimentServiceArchiveExperimentV1Params object -// with the default values initialized. +// NewExperimentServiceArchiveExperimentV1Params creates a new ExperimentServiceArchiveExperimentV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceArchiveExperimentV1Params() *ExperimentServiceArchiveExperimentV1Params { - var () return &ExperimentServiceArchiveExperimentV1Params{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceArchiveExperimentV1ParamsWithTimeout creates a new ExperimentServiceArchiveExperimentV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceArchiveExperimentV1ParamsWithTimeout(timeout time.Duration) *ExperimentServiceArchiveExperimentV1Params { - var () return &ExperimentServiceArchiveExperimentV1Params{ - timeout: timeout, } } // NewExperimentServiceArchiveExperimentV1ParamsWithContext creates a new ExperimentServiceArchiveExperimentV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceArchiveExperimentV1ParamsWithContext(ctx context.Context) *ExperimentServiceArchiveExperimentV1Params { - var () return &ExperimentServiceArchiveExperimentV1Params{ - Context: ctx, } } // NewExperimentServiceArchiveExperimentV1ParamsWithHTTPClient creates a new ExperimentServiceArchiveExperimentV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceArchiveExperimentV1ParamsWithHTTPClient(client *http.Client) *ExperimentServiceArchiveExperimentV1Params { - var () return &ExperimentServiceArchiveExperimentV1Params{ HTTPClient: client, } } -/*ExperimentServiceArchiveExperimentV1Params contains all the parameters to send to the API endpoint -for the experiment service archive experiment v1 operation typically these are written to a http.Request +/* +ExperimentServiceArchiveExperimentV1Params contains all the parameters to send to the API endpoint + + for the experiment service archive experiment v1 operation. + + Typically these are written to a http.Request. */ type ExperimentServiceArchiveExperimentV1Params struct { - /*ID - The ID of the experiment to be archived. + /* ID. + The ID of the experiment to be archived. */ ID string @@ -72,6 +72,21 @@ type ExperimentServiceArchiveExperimentV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service archive experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceArchiveExperimentV1Params) WithDefaults() *ExperimentServiceArchiveExperimentV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service archive experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceArchiveExperimentV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service archive experiment v1 params func (o *ExperimentServiceArchiveExperimentV1Params) WithTimeout(timeout time.Duration) *ExperimentServiceArchiveExperimentV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_v1_responses.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_v1_responses.go index bce9f4249e6..8f678e89c6b 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_v1_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" ) // ExperimentServiceArchiveExperimentV1Reader is a Reader for the ExperimentServiceArchiveExperimentV1 structure. @@ -24,14 +24,12 @@ type ExperimentServiceArchiveExperimentV1Reader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceArchiveExperimentV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceArchiveExperimentV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceArchiveExperimentV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceArchiveExperimentV1OK() *ExperimentServiceArchiveExperi return &ExperimentServiceArchiveExperimentV1OK{} } -/*ExperimentServiceArchiveExperimentV1OK handles this case with default header values. +/* +ExperimentServiceArchiveExperimentV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceArchiveExperimentV1OK struct { Payload interface{} } +// IsSuccess returns true when this experiment service archive experiment v1 o k response has a 2xx status code +func (o *ExperimentServiceArchiveExperimentV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service archive experiment v1 o k response has a 3xx status code +func (o *ExperimentServiceArchiveExperimentV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service archive experiment v1 o k response has a 4xx status code +func (o *ExperimentServiceArchiveExperimentV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service archive experiment v1 o k response has a 5xx status code +func (o *ExperimentServiceArchiveExperimentV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service archive experiment v1 o k response a status code equal to that given +func (o *ExperimentServiceArchiveExperimentV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service archive experiment v1 o k response +func (o *ExperimentServiceArchiveExperimentV1OK) Code() int { + return 200 +} + func (o *ExperimentServiceArchiveExperimentV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:archive][%d] experimentServiceArchiveExperimentV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:archive][%d] experimentServiceArchiveExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceArchiveExperimentV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:archive][%d] experimentServiceArchiveExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceArchiveExperimentV1OK) GetPayload() interface{} { + return o.Payload } func (o *ExperimentServiceArchiveExperimentV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewExperimentServiceArchiveExperimentV1Default(code int) *ExperimentService } } -/*ExperimentServiceArchiveExperimentV1Default handles this case with default header values. +/* +ExperimentServiceArchiveExperimentV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceArchiveExperimentV1Default struct { _statusCode int - Payload *experiment_model.GatewayruntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service archive experiment v1 default response has a 2xx status code +func (o *ExperimentServiceArchiveExperimentV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service archive experiment v1 default response has a 3xx status code +func (o *ExperimentServiceArchiveExperimentV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service archive experiment v1 default response has a 4xx status code +func (o *ExperimentServiceArchiveExperimentV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service archive experiment v1 default response has a 5xx status code +func (o *ExperimentServiceArchiveExperimentV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service archive experiment v1 default response a status code equal to that given +func (o *ExperimentServiceArchiveExperimentV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service archive experiment v1 default response @@ -94,12 +159,22 @@ func (o *ExperimentServiceArchiveExperimentV1Default) Code() int { } func (o *ExperimentServiceArchiveExperimentV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:archive][%d] ExperimentService_ArchiveExperimentV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:archive][%d] ExperimentService_ArchiveExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceArchiveExperimentV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:archive][%d] ExperimentService_ArchiveExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceArchiveExperimentV1Default) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceArchiveExperimentV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.GatewayruntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_client.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_client.go index 2ecc0891f3b..6da8e875627 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_client.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_client.go @@ -7,15 +7,40 @@ package experiment_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new experiment service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new experiment service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new experiment service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for experiment service API */ @@ -24,16 +49,35 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + ExperimentServiceArchiveExperimentV1(params *ExperimentServiceArchiveExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceArchiveExperimentV1OK, error) + + ExperimentServiceCreateExperimentV1(params *ExperimentServiceCreateExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceCreateExperimentV1OK, error) + + ExperimentServiceDeleteExperimentV1(params *ExperimentServiceDeleteExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceDeleteExperimentV1OK, error) + + ExperimentServiceGetExperimentV1(params *ExperimentServiceGetExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceGetExperimentV1OK, error) + + ExperimentServiceListExperimentsV1(params *ExperimentServiceListExperimentsV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceListExperimentsV1OK, error) + + ExperimentServiceUnarchiveExperimentV1(params *ExperimentServiceUnarchiveExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceUnarchiveExperimentV1OK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* ExperimentServiceArchiveExperimentV1 archives an experiment and the experiment s runs and jobs */ -func (a *Client) ExperimentServiceArchiveExperimentV1(params *ExperimentServiceArchiveExperimentV1Params, authInfo runtime.ClientAuthInfoWriter) (*ExperimentServiceArchiveExperimentV1OK, error) { +func (a *Client) ExperimentServiceArchiveExperimentV1(params *ExperimentServiceArchiveExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceArchiveExperimentV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceArchiveExperimentV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_ArchiveExperimentV1", Method: "POST", PathPattern: "/apis/v1beta1/experiments/{id}:archive", @@ -45,24 +89,33 @@ func (a *Client) ExperimentServiceArchiveExperimentV1(params *ExperimentServiceA AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceArchiveExperimentV1OK), nil - + success, ok := result.(*ExperimentServiceArchiveExperimentV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceArchiveExperimentV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceCreateExperimentV1 creates a new experiment */ -func (a *Client) ExperimentServiceCreateExperimentV1(params *ExperimentServiceCreateExperimentV1Params, authInfo runtime.ClientAuthInfoWriter) (*ExperimentServiceCreateExperimentV1OK, error) { +func (a *Client) ExperimentServiceCreateExperimentV1(params *ExperimentServiceCreateExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceCreateExperimentV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceCreateExperimentV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_CreateExperimentV1", Method: "POST", PathPattern: "/apis/v1beta1/experiments", @@ -74,24 +127,33 @@ func (a *Client) ExperimentServiceCreateExperimentV1(params *ExperimentServiceCr AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceCreateExperimentV1OK), nil - + success, ok := result.(*ExperimentServiceCreateExperimentV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceCreateExperimentV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceDeleteExperimentV1 deletes an experiment without deleting the experiment s runs and jobs to avoid unexpected behaviors delete an experiment s runs and jobs before deleting the experiment */ -func (a *Client) ExperimentServiceDeleteExperimentV1(params *ExperimentServiceDeleteExperimentV1Params, authInfo runtime.ClientAuthInfoWriter) (*ExperimentServiceDeleteExperimentV1OK, error) { +func (a *Client) ExperimentServiceDeleteExperimentV1(params *ExperimentServiceDeleteExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceDeleteExperimentV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceDeleteExperimentV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_DeleteExperimentV1", Method: "DELETE", PathPattern: "/apis/v1beta1/experiments/{id}", @@ -103,24 +165,33 @@ func (a *Client) ExperimentServiceDeleteExperimentV1(params *ExperimentServiceDe AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceDeleteExperimentV1OK), nil - + success, ok := result.(*ExperimentServiceDeleteExperimentV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceDeleteExperimentV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceGetExperimentV1 finds a specific experiment by ID */ -func (a *Client) ExperimentServiceGetExperimentV1(params *ExperimentServiceGetExperimentV1Params, authInfo runtime.ClientAuthInfoWriter) (*ExperimentServiceGetExperimentV1OK, error) { +func (a *Client) ExperimentServiceGetExperimentV1(params *ExperimentServiceGetExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceGetExperimentV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceGetExperimentV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_GetExperimentV1", Method: "GET", PathPattern: "/apis/v1beta1/experiments/{id}", @@ -132,24 +203,33 @@ func (a *Client) ExperimentServiceGetExperimentV1(params *ExperimentServiceGetEx AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceGetExperimentV1OK), nil - + success, ok := result.(*ExperimentServiceGetExperimentV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceGetExperimentV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceListExperimentsV1 finds all experiments supports pagination and sorting on certain fields */ -func (a *Client) ExperimentServiceListExperimentsV1(params *ExperimentServiceListExperimentsV1Params, authInfo runtime.ClientAuthInfoWriter) (*ExperimentServiceListExperimentsV1OK, error) { +func (a *Client) ExperimentServiceListExperimentsV1(params *ExperimentServiceListExperimentsV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceListExperimentsV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceListExperimentsV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_ListExperimentsV1", Method: "GET", PathPattern: "/apis/v1beta1/experiments", @@ -161,24 +241,33 @@ func (a *Client) ExperimentServiceListExperimentsV1(params *ExperimentServiceLis AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceListExperimentsV1OK), nil - + success, ok := result.(*ExperimentServiceListExperimentsV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceListExperimentsV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceUnarchiveExperimentV1 restores an archived experiment the experiment s archived runs and jobs will stay archived */ -func (a *Client) ExperimentServiceUnarchiveExperimentV1(params *ExperimentServiceUnarchiveExperimentV1Params, authInfo runtime.ClientAuthInfoWriter) (*ExperimentServiceUnarchiveExperimentV1OK, error) { +func (a *Client) ExperimentServiceUnarchiveExperimentV1(params *ExperimentServiceUnarchiveExperimentV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ExperimentServiceUnarchiveExperimentV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceUnarchiveExperimentV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_UnarchiveExperimentV1", Method: "POST", PathPattern: "/apis/v1beta1/experiments/{id}:unarchive", @@ -190,12 +279,22 @@ func (a *Client) ExperimentServiceUnarchiveExperimentV1(params *ExperimentServic AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceUnarchiveExperimentV1OK), nil - + success, ok := result.(*ExperimentServiceUnarchiveExperimentV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceUnarchiveExperimentV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_v1_parameters.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_v1_parameters.go index 9ea4ff71e9f..0ce4e13dbf6 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_v1_parameters.go @@ -13,67 +13,82 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" ) -// NewExperimentServiceCreateExperimentV1Params creates a new ExperimentServiceCreateExperimentV1Params object -// with the default values initialized. +// NewExperimentServiceCreateExperimentV1Params creates a new ExperimentServiceCreateExperimentV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceCreateExperimentV1Params() *ExperimentServiceCreateExperimentV1Params { - var () return &ExperimentServiceCreateExperimentV1Params{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceCreateExperimentV1ParamsWithTimeout creates a new ExperimentServiceCreateExperimentV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceCreateExperimentV1ParamsWithTimeout(timeout time.Duration) *ExperimentServiceCreateExperimentV1Params { - var () return &ExperimentServiceCreateExperimentV1Params{ - timeout: timeout, } } // NewExperimentServiceCreateExperimentV1ParamsWithContext creates a new ExperimentServiceCreateExperimentV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceCreateExperimentV1ParamsWithContext(ctx context.Context) *ExperimentServiceCreateExperimentV1Params { - var () return &ExperimentServiceCreateExperimentV1Params{ - Context: ctx, } } // NewExperimentServiceCreateExperimentV1ParamsWithHTTPClient creates a new ExperimentServiceCreateExperimentV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceCreateExperimentV1ParamsWithHTTPClient(client *http.Client) *ExperimentServiceCreateExperimentV1Params { - var () return &ExperimentServiceCreateExperimentV1Params{ HTTPClient: client, } } -/*ExperimentServiceCreateExperimentV1Params contains all the parameters to send to the API endpoint -for the experiment service create experiment v1 operation typically these are written to a http.Request +/* +ExperimentServiceCreateExperimentV1Params contains all the parameters to send to the API endpoint + + for the experiment service create experiment v1 operation. + + Typically these are written to a http.Request. */ type ExperimentServiceCreateExperimentV1Params struct { - /*Body - The experiment to be created. + /* Experiment. + The experiment to be created. */ - Body *experiment_model.APIExperiment + Experiment *experiment_model.APIExperiment timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service create experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceCreateExperimentV1Params) WithDefaults() *ExperimentServiceCreateExperimentV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service create experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceCreateExperimentV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service create experiment v1 params func (o *ExperimentServiceCreateExperimentV1Params) WithTimeout(timeout time.Duration) *ExperimentServiceCreateExperimentV1Params { o.SetTimeout(timeout) @@ -107,15 +122,15 @@ func (o *ExperimentServiceCreateExperimentV1Params) SetHTTPClient(client *http.C o.HTTPClient = client } -// WithBody adds the body to the experiment service create experiment v1 params -func (o *ExperimentServiceCreateExperimentV1Params) WithBody(body *experiment_model.APIExperiment) *ExperimentServiceCreateExperimentV1Params { - o.SetBody(body) +// WithExperiment adds the experiment to the experiment service create experiment v1 params +func (o *ExperimentServiceCreateExperimentV1Params) WithExperiment(experiment *experiment_model.APIExperiment) *ExperimentServiceCreateExperimentV1Params { + o.SetExperiment(experiment) return o } -// SetBody adds the body to the experiment service create experiment v1 params -func (o *ExperimentServiceCreateExperimentV1Params) SetBody(body *experiment_model.APIExperiment) { - o.Body = body +// SetExperiment adds the experiment to the experiment service create experiment v1 params +func (o *ExperimentServiceCreateExperimentV1Params) SetExperiment(experiment *experiment_model.APIExperiment) { + o.Experiment = experiment } // WriteToRequest writes these params to a swagger request @@ -125,9 +140,8 @@ func (o *ExperimentServiceCreateExperimentV1Params) WriteToRequest(r runtime.Cli return err } var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { + if o.Experiment != nil { + if err := r.SetBodyParam(o.Experiment); err != nil { return err } } diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_v1_responses.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_v1_responses.go index 6b6c7f6bedf..d6f07325f84 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_v1_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" ) // ExperimentServiceCreateExperimentV1Reader is a Reader for the ExperimentServiceCreateExperimentV1 structure. @@ -24,14 +24,12 @@ type ExperimentServiceCreateExperimentV1Reader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceCreateExperimentV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceCreateExperimentV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceCreateExperimentV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceCreateExperimentV1OK() *ExperimentServiceCreateExperime return &ExperimentServiceCreateExperimentV1OK{} } -/*ExperimentServiceCreateExperimentV1OK handles this case with default header values. +/* +ExperimentServiceCreateExperimentV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceCreateExperimentV1OK struct { Payload *experiment_model.APIExperiment } +// IsSuccess returns true when this experiment service create experiment v1 o k response has a 2xx status code +func (o *ExperimentServiceCreateExperimentV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service create experiment v1 o k response has a 3xx status code +func (o *ExperimentServiceCreateExperimentV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service create experiment v1 o k response has a 4xx status code +func (o *ExperimentServiceCreateExperimentV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service create experiment v1 o k response has a 5xx status code +func (o *ExperimentServiceCreateExperimentV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service create experiment v1 o k response a status code equal to that given +func (o *ExperimentServiceCreateExperimentV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service create experiment v1 o k response +func (o *ExperimentServiceCreateExperimentV1OK) Code() int { + return 200 +} + func (o *ExperimentServiceCreateExperimentV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/experiments][%d] experimentServiceCreateExperimentV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments][%d] experimentServiceCreateExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceCreateExperimentV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments][%d] experimentServiceCreateExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceCreateExperimentV1OK) GetPayload() *experiment_model.APIExperiment { + return o.Payload } func (o *ExperimentServiceCreateExperimentV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewExperimentServiceCreateExperimentV1Default(code int) *ExperimentServiceC } } -/*ExperimentServiceCreateExperimentV1Default handles this case with default header values. +/* +ExperimentServiceCreateExperimentV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceCreateExperimentV1Default struct { _statusCode int - Payload *experiment_model.GatewayruntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service create experiment v1 default response has a 2xx status code +func (o *ExperimentServiceCreateExperimentV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service create experiment v1 default response has a 3xx status code +func (o *ExperimentServiceCreateExperimentV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service create experiment v1 default response has a 4xx status code +func (o *ExperimentServiceCreateExperimentV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service create experiment v1 default response has a 5xx status code +func (o *ExperimentServiceCreateExperimentV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service create experiment v1 default response a status code equal to that given +func (o *ExperimentServiceCreateExperimentV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service create experiment v1 default response @@ -96,12 +161,22 @@ func (o *ExperimentServiceCreateExperimentV1Default) Code() int { } func (o *ExperimentServiceCreateExperimentV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/experiments][%d] ExperimentService_CreateExperimentV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments][%d] ExperimentService_CreateExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceCreateExperimentV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments][%d] ExperimentService_CreateExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceCreateExperimentV1Default) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceCreateExperimentV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.GatewayruntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_v1_parameters.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_v1_parameters.go index f7d1d34c010..d1b501b553b 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewExperimentServiceDeleteExperimentV1Params creates a new ExperimentServiceDeleteExperimentV1Params object -// with the default values initialized. +// NewExperimentServiceDeleteExperimentV1Params creates a new ExperimentServiceDeleteExperimentV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceDeleteExperimentV1Params() *ExperimentServiceDeleteExperimentV1Params { - var () return &ExperimentServiceDeleteExperimentV1Params{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceDeleteExperimentV1ParamsWithTimeout creates a new ExperimentServiceDeleteExperimentV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceDeleteExperimentV1ParamsWithTimeout(timeout time.Duration) *ExperimentServiceDeleteExperimentV1Params { - var () return &ExperimentServiceDeleteExperimentV1Params{ - timeout: timeout, } } // NewExperimentServiceDeleteExperimentV1ParamsWithContext creates a new ExperimentServiceDeleteExperimentV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceDeleteExperimentV1ParamsWithContext(ctx context.Context) *ExperimentServiceDeleteExperimentV1Params { - var () return &ExperimentServiceDeleteExperimentV1Params{ - Context: ctx, } } // NewExperimentServiceDeleteExperimentV1ParamsWithHTTPClient creates a new ExperimentServiceDeleteExperimentV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceDeleteExperimentV1ParamsWithHTTPClient(client *http.Client) *ExperimentServiceDeleteExperimentV1Params { - var () return &ExperimentServiceDeleteExperimentV1Params{ HTTPClient: client, } } -/*ExperimentServiceDeleteExperimentV1Params contains all the parameters to send to the API endpoint -for the experiment service delete experiment v1 operation typically these are written to a http.Request +/* +ExperimentServiceDeleteExperimentV1Params contains all the parameters to send to the API endpoint + + for the experiment service delete experiment v1 operation. + + Typically these are written to a http.Request. */ type ExperimentServiceDeleteExperimentV1Params struct { - /*ID - The ID of the experiment to be deleted. + /* ID. + The ID of the experiment to be deleted. */ ID string @@ -72,6 +72,21 @@ type ExperimentServiceDeleteExperimentV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service delete experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceDeleteExperimentV1Params) WithDefaults() *ExperimentServiceDeleteExperimentV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service delete experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceDeleteExperimentV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service delete experiment v1 params func (o *ExperimentServiceDeleteExperimentV1Params) WithTimeout(timeout time.Duration) *ExperimentServiceDeleteExperimentV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_v1_responses.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_v1_responses.go index bff9575bb0a..090733fce21 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_v1_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" ) // ExperimentServiceDeleteExperimentV1Reader is a Reader for the ExperimentServiceDeleteExperimentV1 structure. @@ -24,14 +24,12 @@ type ExperimentServiceDeleteExperimentV1Reader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceDeleteExperimentV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceDeleteExperimentV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceDeleteExperimentV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceDeleteExperimentV1OK() *ExperimentServiceDeleteExperime return &ExperimentServiceDeleteExperimentV1OK{} } -/*ExperimentServiceDeleteExperimentV1OK handles this case with default header values. +/* +ExperimentServiceDeleteExperimentV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceDeleteExperimentV1OK struct { Payload interface{} } +// IsSuccess returns true when this experiment service delete experiment v1 o k response has a 2xx status code +func (o *ExperimentServiceDeleteExperimentV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service delete experiment v1 o k response has a 3xx status code +func (o *ExperimentServiceDeleteExperimentV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service delete experiment v1 o k response has a 4xx status code +func (o *ExperimentServiceDeleteExperimentV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service delete experiment v1 o k response has a 5xx status code +func (o *ExperimentServiceDeleteExperimentV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service delete experiment v1 o k response a status code equal to that given +func (o *ExperimentServiceDeleteExperimentV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service delete experiment v1 o k response +func (o *ExperimentServiceDeleteExperimentV1OK) Code() int { + return 200 +} + func (o *ExperimentServiceDeleteExperimentV1OK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/experiments/{id}][%d] experimentServiceDeleteExperimentV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/experiments/{id}][%d] experimentServiceDeleteExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceDeleteExperimentV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/experiments/{id}][%d] experimentServiceDeleteExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceDeleteExperimentV1OK) GetPayload() interface{} { + return o.Payload } func (o *ExperimentServiceDeleteExperimentV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewExperimentServiceDeleteExperimentV1Default(code int) *ExperimentServiceD } } -/*ExperimentServiceDeleteExperimentV1Default handles this case with default header values. +/* +ExperimentServiceDeleteExperimentV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceDeleteExperimentV1Default struct { _statusCode int - Payload *experiment_model.GatewayruntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service delete experiment v1 default response has a 2xx status code +func (o *ExperimentServiceDeleteExperimentV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service delete experiment v1 default response has a 3xx status code +func (o *ExperimentServiceDeleteExperimentV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service delete experiment v1 default response has a 4xx status code +func (o *ExperimentServiceDeleteExperimentV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service delete experiment v1 default response has a 5xx status code +func (o *ExperimentServiceDeleteExperimentV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service delete experiment v1 default response a status code equal to that given +func (o *ExperimentServiceDeleteExperimentV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service delete experiment v1 default response @@ -94,12 +159,22 @@ func (o *ExperimentServiceDeleteExperimentV1Default) Code() int { } func (o *ExperimentServiceDeleteExperimentV1Default) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/experiments/{id}][%d] ExperimentService_DeleteExperimentV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/experiments/{id}][%d] ExperimentService_DeleteExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceDeleteExperimentV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/experiments/{id}][%d] ExperimentService_DeleteExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceDeleteExperimentV1Default) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceDeleteExperimentV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.GatewayruntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_v1_parameters.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_v1_parameters.go index c0ca54c3023..daa600a0101 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewExperimentServiceGetExperimentV1Params creates a new ExperimentServiceGetExperimentV1Params object -// with the default values initialized. +// NewExperimentServiceGetExperimentV1Params creates a new ExperimentServiceGetExperimentV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceGetExperimentV1Params() *ExperimentServiceGetExperimentV1Params { - var () return &ExperimentServiceGetExperimentV1Params{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceGetExperimentV1ParamsWithTimeout creates a new ExperimentServiceGetExperimentV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceGetExperimentV1ParamsWithTimeout(timeout time.Duration) *ExperimentServiceGetExperimentV1Params { - var () return &ExperimentServiceGetExperimentV1Params{ - timeout: timeout, } } // NewExperimentServiceGetExperimentV1ParamsWithContext creates a new ExperimentServiceGetExperimentV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceGetExperimentV1ParamsWithContext(ctx context.Context) *ExperimentServiceGetExperimentV1Params { - var () return &ExperimentServiceGetExperimentV1Params{ - Context: ctx, } } // NewExperimentServiceGetExperimentV1ParamsWithHTTPClient creates a new ExperimentServiceGetExperimentV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceGetExperimentV1ParamsWithHTTPClient(client *http.Client) *ExperimentServiceGetExperimentV1Params { - var () return &ExperimentServiceGetExperimentV1Params{ HTTPClient: client, } } -/*ExperimentServiceGetExperimentV1Params contains all the parameters to send to the API endpoint -for the experiment service get experiment v1 operation typically these are written to a http.Request +/* +ExperimentServiceGetExperimentV1Params contains all the parameters to send to the API endpoint + + for the experiment service get experiment v1 operation. + + Typically these are written to a http.Request. */ type ExperimentServiceGetExperimentV1Params struct { - /*ID - The ID of the experiment to be retrieved. + /* ID. + The ID of the experiment to be retrieved. */ ID string @@ -72,6 +72,21 @@ type ExperimentServiceGetExperimentV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service get experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceGetExperimentV1Params) WithDefaults() *ExperimentServiceGetExperimentV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service get experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceGetExperimentV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service get experiment v1 params func (o *ExperimentServiceGetExperimentV1Params) WithTimeout(timeout time.Duration) *ExperimentServiceGetExperimentV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_v1_responses.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_v1_responses.go index cc1e54612a1..b7f2bb1c8aa 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_v1_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" ) // ExperimentServiceGetExperimentV1Reader is a Reader for the ExperimentServiceGetExperimentV1 structure. @@ -24,14 +24,12 @@ type ExperimentServiceGetExperimentV1Reader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceGetExperimentV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceGetExperimentV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceGetExperimentV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceGetExperimentV1OK() *ExperimentServiceGetExperimentV1OK return &ExperimentServiceGetExperimentV1OK{} } -/*ExperimentServiceGetExperimentV1OK handles this case with default header values. +/* +ExperimentServiceGetExperimentV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceGetExperimentV1OK struct { Payload *experiment_model.APIExperiment } +// IsSuccess returns true when this experiment service get experiment v1 o k response has a 2xx status code +func (o *ExperimentServiceGetExperimentV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service get experiment v1 o k response has a 3xx status code +func (o *ExperimentServiceGetExperimentV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service get experiment v1 o k response has a 4xx status code +func (o *ExperimentServiceGetExperimentV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service get experiment v1 o k response has a 5xx status code +func (o *ExperimentServiceGetExperimentV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service get experiment v1 o k response a status code equal to that given +func (o *ExperimentServiceGetExperimentV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service get experiment v1 o k response +func (o *ExperimentServiceGetExperimentV1OK) Code() int { + return 200 +} + func (o *ExperimentServiceGetExperimentV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/experiments/{id}][%d] experimentServiceGetExperimentV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/experiments/{id}][%d] experimentServiceGetExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceGetExperimentV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/experiments/{id}][%d] experimentServiceGetExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceGetExperimentV1OK) GetPayload() *experiment_model.APIExperiment { + return o.Payload } func (o *ExperimentServiceGetExperimentV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewExperimentServiceGetExperimentV1Default(code int) *ExperimentServiceGetE } } -/*ExperimentServiceGetExperimentV1Default handles this case with default header values. +/* +ExperimentServiceGetExperimentV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceGetExperimentV1Default struct { _statusCode int - Payload *experiment_model.GatewayruntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service get experiment v1 default response has a 2xx status code +func (o *ExperimentServiceGetExperimentV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service get experiment v1 default response has a 3xx status code +func (o *ExperimentServiceGetExperimentV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service get experiment v1 default response has a 4xx status code +func (o *ExperimentServiceGetExperimentV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service get experiment v1 default response has a 5xx status code +func (o *ExperimentServiceGetExperimentV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service get experiment v1 default response a status code equal to that given +func (o *ExperimentServiceGetExperimentV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service get experiment v1 default response @@ -96,12 +161,22 @@ func (o *ExperimentServiceGetExperimentV1Default) Code() int { } func (o *ExperimentServiceGetExperimentV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/experiments/{id}][%d] ExperimentService_GetExperimentV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/experiments/{id}][%d] ExperimentService_GetExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceGetExperimentV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/experiments/{id}][%d] ExperimentService_GetExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceGetExperimentV1Default) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceGetExperimentV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.GatewayruntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_v1_parameters.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_v1_parameters.go index 09f5860e3be..55aaf41a0a3 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_v1_parameters.go @@ -13,101 +13,98 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewExperimentServiceListExperimentsV1Params creates a new ExperimentServiceListExperimentsV1Params object -// with the default values initialized. +// NewExperimentServiceListExperimentsV1Params creates a new ExperimentServiceListExperimentsV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceListExperimentsV1Params() *ExperimentServiceListExperimentsV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &ExperimentServiceListExperimentsV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - timeout: cr.DefaultTimeout, } } // NewExperimentServiceListExperimentsV1ParamsWithTimeout creates a new ExperimentServiceListExperimentsV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceListExperimentsV1ParamsWithTimeout(timeout time.Duration) *ExperimentServiceListExperimentsV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &ExperimentServiceListExperimentsV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - timeout: timeout, } } // NewExperimentServiceListExperimentsV1ParamsWithContext creates a new ExperimentServiceListExperimentsV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceListExperimentsV1ParamsWithContext(ctx context.Context) *ExperimentServiceListExperimentsV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &ExperimentServiceListExperimentsV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - Context: ctx, } } // NewExperimentServiceListExperimentsV1ParamsWithHTTPClient creates a new ExperimentServiceListExperimentsV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceListExperimentsV1ParamsWithHTTPClient(client *http.Client) *ExperimentServiceListExperimentsV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &ExperimentServiceListExperimentsV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - HTTPClient: client, + HTTPClient: client, } } -/*ExperimentServiceListExperimentsV1Params contains all the parameters to send to the API endpoint -for the experiment service list experiments v1 operation typically these are written to a http.Request +/* +ExperimentServiceListExperimentsV1Params contains all the parameters to send to the API endpoint + + for the experiment service list experiments v1 operation. + + Typically these are written to a http.Request. */ type ExperimentServiceListExperimentsV1Params struct { - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). + /* Filter. + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). */ Filter *string - /*PageSize - The number of experiments to be listed per page. If there are more + + /* PageSize. + + The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the next page of results. The token is acquried + + /* PageToken. + + A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiment call or can be omitted when fetching the first page. - */ PageToken *string - /*ResourceReferenceKeyID - The ID of the resource that referred to. + /* ResourceReferenceKeyID. + + The ID of the resource that referred to. */ ResourceReferenceKeyID *string - /*ResourceReferenceKeyType - The type of the resource that referred to. + /* ResourceReferenceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" */ ResourceReferenceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - Ascending by default. + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + Ascending by default. */ SortBy *string @@ -116,6 +113,32 @@ type ExperimentServiceListExperimentsV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service list experiments v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceListExperimentsV1Params) WithDefaults() *ExperimentServiceListExperimentsV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service list experiments v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceListExperimentsV1Params) SetDefaults() { + var ( + resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := ExperimentServiceListExperimentsV1Params{ + ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + // WithTimeout adds the timeout to the experiment service list experiments v1 params func (o *ExperimentServiceListExperimentsV1Params) WithTimeout(timeout time.Duration) *ExperimentServiceListExperimentsV1Params { o.SetTimeout(timeout) @@ -227,96 +250,102 @@ func (o *ExperimentServiceListExperimentsV1Params) WriteToRequest(r runtime.Clie // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.ResourceReferenceKeyID != nil { // query param resource_reference_key.id var qrResourceReferenceKeyID string + if o.ResourceReferenceKeyID != nil { qrResourceReferenceKeyID = *o.ResourceReferenceKeyID } qResourceReferenceKeyID := qrResourceReferenceKeyID if qResourceReferenceKeyID != "" { + if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { return err } } - } if o.ResourceReferenceKeyType != nil { // query param resource_reference_key.type var qrResourceReferenceKeyType string + if o.ResourceReferenceKeyType != nil { qrResourceReferenceKeyType = *o.ResourceReferenceKeyType } qResourceReferenceKeyType := qrResourceReferenceKeyType if qResourceReferenceKeyType != "" { + if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_v1_responses.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_v1_responses.go index 9d9fd4f6e6e..fbbdb27f1ac 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_v1_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" ) // ExperimentServiceListExperimentsV1Reader is a Reader for the ExperimentServiceListExperimentsV1 structure. @@ -24,14 +24,12 @@ type ExperimentServiceListExperimentsV1Reader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceListExperimentsV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceListExperimentsV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceListExperimentsV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceListExperimentsV1OK() *ExperimentServiceListExperiments return &ExperimentServiceListExperimentsV1OK{} } -/*ExperimentServiceListExperimentsV1OK handles this case with default header values. +/* +ExperimentServiceListExperimentsV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceListExperimentsV1OK struct { Payload *experiment_model.APIListExperimentsResponse } +// IsSuccess returns true when this experiment service list experiments v1 o k response has a 2xx status code +func (o *ExperimentServiceListExperimentsV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service list experiments v1 o k response has a 3xx status code +func (o *ExperimentServiceListExperimentsV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service list experiments v1 o k response has a 4xx status code +func (o *ExperimentServiceListExperimentsV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service list experiments v1 o k response has a 5xx status code +func (o *ExperimentServiceListExperimentsV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service list experiments v1 o k response a status code equal to that given +func (o *ExperimentServiceListExperimentsV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service list experiments v1 o k response +func (o *ExperimentServiceListExperimentsV1OK) Code() int { + return 200 +} + func (o *ExperimentServiceListExperimentsV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/experiments][%d] experimentServiceListExperimentsV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/experiments][%d] experimentServiceListExperimentsV1OK %s", 200, payload) +} + +func (o *ExperimentServiceListExperimentsV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/experiments][%d] experimentServiceListExperimentsV1OK %s", 200, payload) +} + +func (o *ExperimentServiceListExperimentsV1OK) GetPayload() *experiment_model.APIListExperimentsResponse { + return o.Payload } func (o *ExperimentServiceListExperimentsV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewExperimentServiceListExperimentsV1Default(code int) *ExperimentServiceLi } } -/*ExperimentServiceListExperimentsV1Default handles this case with default header values. +/* +ExperimentServiceListExperimentsV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceListExperimentsV1Default struct { _statusCode int - Payload *experiment_model.GatewayruntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service list experiments v1 default response has a 2xx status code +func (o *ExperimentServiceListExperimentsV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service list experiments v1 default response has a 3xx status code +func (o *ExperimentServiceListExperimentsV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service list experiments v1 default response has a 4xx status code +func (o *ExperimentServiceListExperimentsV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service list experiments v1 default response has a 5xx status code +func (o *ExperimentServiceListExperimentsV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service list experiments v1 default response a status code equal to that given +func (o *ExperimentServiceListExperimentsV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service list experiments v1 default response @@ -96,12 +161,22 @@ func (o *ExperimentServiceListExperimentsV1Default) Code() int { } func (o *ExperimentServiceListExperimentsV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/experiments][%d] ExperimentService_ListExperimentsV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/experiments][%d] ExperimentService_ListExperimentsV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceListExperimentsV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/experiments][%d] ExperimentService_ListExperimentsV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceListExperimentsV1Default) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceListExperimentsV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.GatewayruntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_v1_parameters.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_v1_parameters.go index c808a07bd8a..79b7a1206f4 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewExperimentServiceUnarchiveExperimentV1Params creates a new ExperimentServiceUnarchiveExperimentV1Params object -// with the default values initialized. +// NewExperimentServiceUnarchiveExperimentV1Params creates a new ExperimentServiceUnarchiveExperimentV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceUnarchiveExperimentV1Params() *ExperimentServiceUnarchiveExperimentV1Params { - var () return &ExperimentServiceUnarchiveExperimentV1Params{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceUnarchiveExperimentV1ParamsWithTimeout creates a new ExperimentServiceUnarchiveExperimentV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceUnarchiveExperimentV1ParamsWithTimeout(timeout time.Duration) *ExperimentServiceUnarchiveExperimentV1Params { - var () return &ExperimentServiceUnarchiveExperimentV1Params{ - timeout: timeout, } } // NewExperimentServiceUnarchiveExperimentV1ParamsWithContext creates a new ExperimentServiceUnarchiveExperimentV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceUnarchiveExperimentV1ParamsWithContext(ctx context.Context) *ExperimentServiceUnarchiveExperimentV1Params { - var () return &ExperimentServiceUnarchiveExperimentV1Params{ - Context: ctx, } } // NewExperimentServiceUnarchiveExperimentV1ParamsWithHTTPClient creates a new ExperimentServiceUnarchiveExperimentV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceUnarchiveExperimentV1ParamsWithHTTPClient(client *http.Client) *ExperimentServiceUnarchiveExperimentV1Params { - var () return &ExperimentServiceUnarchiveExperimentV1Params{ HTTPClient: client, } } -/*ExperimentServiceUnarchiveExperimentV1Params contains all the parameters to send to the API endpoint -for the experiment service unarchive experiment v1 operation typically these are written to a http.Request +/* +ExperimentServiceUnarchiveExperimentV1Params contains all the parameters to send to the API endpoint + + for the experiment service unarchive experiment v1 operation. + + Typically these are written to a http.Request. */ type ExperimentServiceUnarchiveExperimentV1Params struct { - /*ID - The ID of the experiment to be restored. + /* ID. + The ID of the experiment to be restored. */ ID string @@ -72,6 +72,21 @@ type ExperimentServiceUnarchiveExperimentV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service unarchive experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceUnarchiveExperimentV1Params) WithDefaults() *ExperimentServiceUnarchiveExperimentV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service unarchive experiment v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceUnarchiveExperimentV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service unarchive experiment v1 params func (o *ExperimentServiceUnarchiveExperimentV1Params) WithTimeout(timeout time.Duration) *ExperimentServiceUnarchiveExperimentV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_v1_responses.go b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_v1_responses.go index e305187849b..dbd8ffe9883 100644 --- a/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_v1_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/experiment_model" ) // ExperimentServiceUnarchiveExperimentV1Reader is a Reader for the ExperimentServiceUnarchiveExperimentV1 structure. @@ -24,14 +24,12 @@ type ExperimentServiceUnarchiveExperimentV1Reader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceUnarchiveExperimentV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceUnarchiveExperimentV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceUnarchiveExperimentV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceUnarchiveExperimentV1OK() *ExperimentServiceUnarchiveEx return &ExperimentServiceUnarchiveExperimentV1OK{} } -/*ExperimentServiceUnarchiveExperimentV1OK handles this case with default header values. +/* +ExperimentServiceUnarchiveExperimentV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceUnarchiveExperimentV1OK struct { Payload interface{} } +// IsSuccess returns true when this experiment service unarchive experiment v1 o k response has a 2xx status code +func (o *ExperimentServiceUnarchiveExperimentV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service unarchive experiment v1 o k response has a 3xx status code +func (o *ExperimentServiceUnarchiveExperimentV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service unarchive experiment v1 o k response has a 4xx status code +func (o *ExperimentServiceUnarchiveExperimentV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service unarchive experiment v1 o k response has a 5xx status code +func (o *ExperimentServiceUnarchiveExperimentV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service unarchive experiment v1 o k response a status code equal to that given +func (o *ExperimentServiceUnarchiveExperimentV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service unarchive experiment v1 o k response +func (o *ExperimentServiceUnarchiveExperimentV1OK) Code() int { + return 200 +} + func (o *ExperimentServiceUnarchiveExperimentV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:unarchive][%d] experimentServiceUnarchiveExperimentV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:unarchive][%d] experimentServiceUnarchiveExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceUnarchiveExperimentV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:unarchive][%d] experimentServiceUnarchiveExperimentV1OK %s", 200, payload) +} + +func (o *ExperimentServiceUnarchiveExperimentV1OK) GetPayload() interface{} { + return o.Payload } func (o *ExperimentServiceUnarchiveExperimentV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewExperimentServiceUnarchiveExperimentV1Default(code int) *ExperimentServi } } -/*ExperimentServiceUnarchiveExperimentV1Default handles this case with default header values. +/* +ExperimentServiceUnarchiveExperimentV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceUnarchiveExperimentV1Default struct { _statusCode int - Payload *experiment_model.GatewayruntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service unarchive experiment v1 default response has a 2xx status code +func (o *ExperimentServiceUnarchiveExperimentV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service unarchive experiment v1 default response has a 3xx status code +func (o *ExperimentServiceUnarchiveExperimentV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service unarchive experiment v1 default response has a 4xx status code +func (o *ExperimentServiceUnarchiveExperimentV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service unarchive experiment v1 default response has a 5xx status code +func (o *ExperimentServiceUnarchiveExperimentV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service unarchive experiment v1 default response a status code equal to that given +func (o *ExperimentServiceUnarchiveExperimentV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service unarchive experiment v1 default response @@ -94,12 +159,22 @@ func (o *ExperimentServiceUnarchiveExperimentV1Default) Code() int { } func (o *ExperimentServiceUnarchiveExperimentV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:unarchive][%d] ExperimentService_UnarchiveExperimentV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:unarchive][%d] ExperimentService_UnarchiveExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceUnarchiveExperimentV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/experiments/{id}:unarchive][%d] ExperimentService_UnarchiveExperimentV1 default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceUnarchiveExperimentV1Default) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceUnarchiveExperimentV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.GatewayruntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/experiment_model/api_experiment.go b/backend/api/v1beta1/go_http_client/experiment_model/api_experiment.go index cc17c74472a..3bef1d49af2 100644 --- a/backend/api/v1beta1/go_http_client/experiment_model/api_experiment.go +++ b/backend/api/v1beta1/go_http_client/experiment_model/api_experiment.go @@ -6,16 +6,17 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APIExperiment api experiment +// // swagger:model apiExperiment type APIExperiment struct { @@ -37,7 +38,7 @@ type APIExperiment struct { ResourceReferences []*APIResourceReference `json:"resource_references"` // Output. Specifies whether this experiment is in archived or available state. - StorageState APIExperimentStorageState `json:"storage_state,omitempty"` + StorageState *APIExperimentStorageState `json:"storage_state,omitempty"` } // Validate validates this api experiment @@ -63,7 +64,6 @@ func (m *APIExperiment) Validate(formats strfmt.Registry) error { } func (m *APIExperiment) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -76,7 +76,6 @@ func (m *APIExperiment) validateCreatedAt(formats strfmt.Registry) error { } func (m *APIExperiment) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -90,6 +89,8 @@ func (m *APIExperiment) validateResourceReferences(formats strfmt.Registry) erro if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } @@ -101,16 +102,83 @@ func (m *APIExperiment) validateResourceReferences(formats strfmt.Registry) erro } func (m *APIExperiment) validateStorageState(formats strfmt.Registry) error { - if swag.IsZero(m.StorageState) { // not required return nil } - if err := m.StorageState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storage_state") + if m.StorageState != nil { + if err := m.StorageState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api experiment based on the context it is used +func (m *APIExperiment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStorageState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIExperiment) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + + if swag.IsZero(m.ResourceReferences[i]) { // not required + return nil + } + + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIExperiment) contextValidateStorageState(ctx context.Context, formats strfmt.Registry) error { + + if m.StorageState != nil { + + if swag.IsZero(m.StorageState) { // not required + return nil + } + + if err := m.StorageState.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/experiment_model/api_experiment_storage_state.go b/backend/api/v1beta1/go_http_client/experiment_model/api_experiment_storage_state.go index c7342e69bee..a5532596f76 100644 --- a/backend/api/v1beta1/go_http_client/experiment_model/api_experiment_storage_state.go +++ b/backend/api/v1beta1/go_http_client/experiment_model/api_experiment_storage_state.go @@ -6,18 +6,28 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIExperimentStorageState api experiment storage state +// // swagger:model apiExperimentStorageState type APIExperimentStorageState string +func NewAPIExperimentStorageState(value APIExperimentStorageState) *APIExperimentStorageState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIExperimentStorageState. +func (m APIExperimentStorageState) Pointer() *APIExperimentStorageState { + return &m +} + const ( // APIExperimentStorageStateSTORAGESTATEUNSPECIFIED captures enum value "STORAGESTATE_UNSPECIFIED" @@ -44,7 +54,7 @@ func init() { } func (m APIExperimentStorageState) validateAPIExperimentStorageStateEnum(path, location string, value APIExperimentStorageState) error { - if err := validate.Enum(path, location, value, apiExperimentStorageStateEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiExperimentStorageStateEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m APIExperimentStorageState) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api experiment storage state based on context it is used +func (m APIExperimentStorageState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/experiment_model/api_list_experiments_response.go b/backend/api/v1beta1/go_http_client/experiment_model/api_list_experiments_response.go index 0b2294c69a5..e447fbd3628 100644 --- a/backend/api/v1beta1/go_http_client/experiment_model/api_list_experiments_response.go +++ b/backend/api/v1beta1/go_http_client/experiment_model/api_list_experiments_response.go @@ -6,15 +6,16 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIListExperimentsResponse api list experiments response +// // swagger:model apiListExperimentsResponse type APIListExperimentsResponse struct { @@ -43,7 +44,6 @@ func (m *APIListExperimentsResponse) Validate(formats strfmt.Registry) error { } func (m *APIListExperimentsResponse) validateExperiments(formats strfmt.Registry) error { - if swag.IsZero(m.Experiments) { // not required return nil } @@ -57,6 +57,47 @@ func (m *APIListExperimentsResponse) validateExperiments(formats strfmt.Registry if err := m.Experiments[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("experiments" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("experiments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api list experiments response based on the context it is used +func (m *APIListExperimentsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateExperiments(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIListExperimentsResponse) contextValidateExperiments(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Experiments); i++ { + + if m.Experiments[i] != nil { + + if swag.IsZero(m.Experiments[i]) { // not required + return nil + } + + if err := m.Experiments[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("experiments" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("experiments" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/experiment_model/api_relationship.go b/backend/api/v1beta1/go_http_client/experiment_model/api_relationship.go index 24c3abcb7ce..f550ebe7923 100644 --- a/backend/api/v1beta1/go_http_client/experiment_model/api_relationship.go +++ b/backend/api/v1beta1/go_http_client/experiment_model/api_relationship.go @@ -6,18 +6,28 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIRelationship api relationship +// // swagger:model apiRelationship type APIRelationship string +func NewAPIRelationship(value APIRelationship) *APIRelationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIRelationship. +func (m APIRelationship) Pointer() *APIRelationship { + return &m +} + const ( // APIRelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m APIRelationship) validateAPIRelationshipEnum(path, location string, value APIRelationship) error { - if err := validate.Enum(path, location, value, apiRelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiRelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m APIRelationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api relationship based on context it is used +func (m APIRelationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/experiment_model/api_resource_key.go b/backend/api/v1beta1/go_http_client/experiment_model/api_resource_key.go index 7dfbd3f0118..98febf365fb 100644 --- a/backend/api/v1beta1/go_http_client/experiment_model/api_resource_key.go +++ b/backend/api/v1beta1/go_http_client/experiment_model/api_resource_key.go @@ -6,13 +6,15 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceKey api resource key +// // swagger:model apiResourceKey type APIResourceKey struct { @@ -20,7 +22,7 @@ type APIResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type APIResourceType `json:"type,omitempty"` + Type *APIResourceType `json:"type,omitempty"` } // Validate validates this api resource key @@ -38,16 +40,54 @@ func (m *APIResourceKey) Validate(formats strfmt.Registry) error { } func (m *APIResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource key based on the context it is used +func (m *APIResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/experiment_model/api_resource_reference.go b/backend/api/v1beta1/go_http_client/experiment_model/api_resource_reference.go index 8103adf2612..78a467bd9e8 100644 --- a/backend/api/v1beta1/go_http_client/experiment_model/api_resource_reference.go +++ b/backend/api/v1beta1/go_http_client/experiment_model/api_resource_reference.go @@ -6,13 +6,15 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceReference api resource reference +// // swagger:model apiResourceReference type APIResourceReference struct { @@ -23,7 +25,7 @@ type APIResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship APIRelationship `json:"relationship,omitempty"` + Relationship *APIRelationship `json:"relationship,omitempty"` } // Validate validates this api resource reference @@ -45,7 +47,6 @@ func (m *APIResourceReference) Validate(formats strfmt.Registry) error { } func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,79 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { } func (m *APIResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource reference based on the context it is used +func (m *APIResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + + if swag.IsZero(m.Key) { // not required + return nil + } + + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *APIResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + + if swag.IsZero(m.Relationship) { // not required + return nil + } + + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/experiment_model/api_resource_type.go b/backend/api/v1beta1/go_http_client/experiment_model/api_resource_type.go index aeb958e1964..5287d5f6656 100644 --- a/backend/api/v1beta1/go_http_client/experiment_model/api_resource_type.go +++ b/backend/api/v1beta1/go_http_client/experiment_model/api_resource_type.go @@ -6,18 +6,28 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIResourceType api resource type +// // swagger:model apiResourceType type APIResourceType string +func NewAPIResourceType(value APIResourceType) *APIResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIResourceType. +func (m APIResourceType) Pointer() *APIResourceType { + return &m +} + const ( // APIResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m APIResourceType) validateAPIResourceTypeEnum(path, location string, value APIResourceType) error { - if err := validate.Enum(path, location, value, apiResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m APIResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api resource type based on context it is used +func (m APIResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/experiment_model/gatewayruntime_error.go b/backend/api/v1beta1/go_http_client/experiment_model/gatewayruntime_error.go deleted file mode 100644 index 460360100dd..00000000000 --- a/backend/api/v1beta1/go_http_client/experiment_model/gatewayruntime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// GatewayruntimeError gatewayruntime error -// swagger:model gatewayruntimeError -type GatewayruntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this gatewayruntime error -func (m *GatewayruntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GatewayruntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GatewayruntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GatewayruntimeError) UnmarshalBinary(b []byte) error { - var res GatewayruntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1beta1/go_http_client/experiment_model/googlerpc_status.go b/backend/api/v1beta1/go_http_client/experiment_model/googlerpc_status.go new file mode 100644 index 00000000000..e8c96276d08 --- /dev/null +++ b/backend/api/v1beta1/go_http_client/experiment_model/googlerpc_status.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1beta1/go_http_client/experiment_model/protobuf_any.go b/backend/api/v1beta1/go_http_client/experiment_model/protobuf_any.go index 3c40be98525..ed8315b7a0f 100644 --- a/backend/api/v1beta1/go_http_client/experiment_model/protobuf_any.go +++ b/backend/api/v1beta1/go_http_client/experiment_model/protobuf_any.go @@ -6,9 +6,10 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1beta1/go_http_client/healthz_client/healthz_client.go b/backend/api/v1beta1/go_http_client/healthz_client/healthz_client.go index 51428ac4172..b409c349d32 100644 --- a/backend/api/v1beta1/go_http_client/healthz_client/healthz_client.go +++ b/backend/api/v1beta1/go_http_client/healthz_client/healthz_client.go @@ -8,8 +8,7 @@ package healthz_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/healthz_client/healthz_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Healthz { cli := new(Healthz) cli.Transport = transport - cli.HealthzService = healthz_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Healthz is a client for healthz type Healthz struct { - HealthzService *healthz_service.Client + HealthzService healthz_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Healthz struct { // SetTransport changes the transport on the client and all its subresources func (c *Healthz) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.HealthzService.SetTransport(transport) - } diff --git a/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_client.go b/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_client.go index ec1bd7fd295..4deb9725771 100644 --- a/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_client.go +++ b/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_client.go @@ -7,15 +7,40 @@ package healthz_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new healthz service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new healthz service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new healthz service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for healthz service API */ @@ -24,16 +49,25 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HealthzServiceGetHealthzOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* HealthzServiceGetHealthz gets healthz data */ -func (a *Client) HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams, authInfo runtime.ClientAuthInfoWriter) (*HealthzServiceGetHealthzOK, error) { +func (a *Client) HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HealthzServiceGetHealthzOK, error) { // TODO: Validate the params before sending if params == nil { params = NewHealthzServiceGetHealthzParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "HealthzService_GetHealthz", Method: "GET", PathPattern: "/apis/v1beta1/healthz", @@ -45,12 +79,22 @@ func (a *Client) HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*HealthzServiceGetHealthzOK), nil - + success, ok := result.(*HealthzServiceGetHealthzOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HealthzServiceGetHealthzDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go b/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go index cf0c78296ab..4cb71a4238b 100644 --- a/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go +++ b/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go @@ -13,51 +13,51 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewHealthzServiceGetHealthzParams creates a new HealthzServiceGetHealthzParams object -// with the default values initialized. +// NewHealthzServiceGetHealthzParams creates a new HealthzServiceGetHealthzParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewHealthzServiceGetHealthzParams() *HealthzServiceGetHealthzParams { - return &HealthzServiceGetHealthzParams{ - timeout: cr.DefaultTimeout, } } // NewHealthzServiceGetHealthzParamsWithTimeout creates a new HealthzServiceGetHealthzParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewHealthzServiceGetHealthzParamsWithTimeout(timeout time.Duration) *HealthzServiceGetHealthzParams { - return &HealthzServiceGetHealthzParams{ - timeout: timeout, } } // NewHealthzServiceGetHealthzParamsWithContext creates a new HealthzServiceGetHealthzParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewHealthzServiceGetHealthzParamsWithContext(ctx context.Context) *HealthzServiceGetHealthzParams { - return &HealthzServiceGetHealthzParams{ - Context: ctx, } } // NewHealthzServiceGetHealthzParamsWithHTTPClient creates a new HealthzServiceGetHealthzParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewHealthzServiceGetHealthzParamsWithHTTPClient(client *http.Client) *HealthzServiceGetHealthzParams { - return &HealthzServiceGetHealthzParams{ HTTPClient: client, } } -/*HealthzServiceGetHealthzParams contains all the parameters to send to the API endpoint -for the healthz service get healthz operation typically these are written to a http.Request +/* +HealthzServiceGetHealthzParams contains all the parameters to send to the API endpoint + + for the healthz service get healthz operation. + + Typically these are written to a http.Request. */ type HealthzServiceGetHealthzParams struct { timeout time.Duration @@ -65,6 +65,21 @@ type HealthzServiceGetHealthzParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the healthz service get healthz params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *HealthzServiceGetHealthzParams) WithDefaults() *HealthzServiceGetHealthzParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the healthz service get healthz params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *HealthzServiceGetHealthzParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the healthz service get healthz params func (o *HealthzServiceGetHealthzParams) WithTimeout(timeout time.Duration) *HealthzServiceGetHealthzParams { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go b/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go index 3bef0bd962c..1486596d75d 100644 --- a/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go +++ b/backend/api/v1beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go @@ -6,14 +6,14 @@ package healthz_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - healthz_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/healthz_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/healthz_model" ) // HealthzServiceGetHealthzReader is a Reader for the HealthzServiceGetHealthz structure. @@ -24,14 +24,12 @@ type HealthzServiceGetHealthzReader struct { // ReadResponse reads a server response into the received o. func (o *HealthzServiceGetHealthzReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewHealthzServiceGetHealthzOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewHealthzServiceGetHealthzDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewHealthzServiceGetHealthzOK() *HealthzServiceGetHealthzOK { return &HealthzServiceGetHealthzOK{} } -/*HealthzServiceGetHealthzOK handles this case with default header values. +/* +HealthzServiceGetHealthzOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type HealthzServiceGetHealthzOK struct { Payload *healthz_model.APIGetHealthzResponse } +// IsSuccess returns true when this healthz service get healthz o k response has a 2xx status code +func (o *HealthzServiceGetHealthzOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this healthz service get healthz o k response has a 3xx status code +func (o *HealthzServiceGetHealthzOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this healthz service get healthz o k response has a 4xx status code +func (o *HealthzServiceGetHealthzOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this healthz service get healthz o k response has a 5xx status code +func (o *HealthzServiceGetHealthzOK) IsServerError() bool { + return false +} + +// IsCode returns true when this healthz service get healthz o k response a status code equal to that given +func (o *HealthzServiceGetHealthzOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the healthz service get healthz o k response +func (o *HealthzServiceGetHealthzOK) Code() int { + return 200 +} + func (o *HealthzServiceGetHealthzOK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/healthz][%d] healthzServiceGetHealthzOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/healthz][%d] healthzServiceGetHealthzOK %s", 200, payload) +} + +func (o *HealthzServiceGetHealthzOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/healthz][%d] healthzServiceGetHealthzOK %s", 200, payload) +} + +func (o *HealthzServiceGetHealthzOK) GetPayload() *healthz_model.APIGetHealthzResponse { + return o.Payload } func (o *HealthzServiceGetHealthzOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewHealthzServiceGetHealthzDefault(code int) *HealthzServiceGetHealthzDefau } } -/*HealthzServiceGetHealthzDefault handles this case with default header values. +/* +HealthzServiceGetHealthzDefault describes a response with status code -1, with default header values. An unexpected error response. */ type HealthzServiceGetHealthzDefault struct { _statusCode int - Payload *healthz_model.GatewayruntimeError + Payload *healthz_model.GooglerpcStatus +} + +// IsSuccess returns true when this healthz service get healthz default response has a 2xx status code +func (o *HealthzServiceGetHealthzDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this healthz service get healthz default response has a 3xx status code +func (o *HealthzServiceGetHealthzDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this healthz service get healthz default response has a 4xx status code +func (o *HealthzServiceGetHealthzDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this healthz service get healthz default response has a 5xx status code +func (o *HealthzServiceGetHealthzDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this healthz service get healthz default response a status code equal to that given +func (o *HealthzServiceGetHealthzDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the healthz service get healthz default response @@ -96,12 +161,22 @@ func (o *HealthzServiceGetHealthzDefault) Code() int { } func (o *HealthzServiceGetHealthzDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/healthz][%d] HealthzService_GetHealthz default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/healthz][%d] HealthzService_GetHealthz default %s", o._statusCode, payload) +} + +func (o *HealthzServiceGetHealthzDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/healthz][%d] HealthzService_GetHealthz default %s", o._statusCode, payload) +} + +func (o *HealthzServiceGetHealthzDefault) GetPayload() *healthz_model.GooglerpcStatus { + return o.Payload } func (o *HealthzServiceGetHealthzDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(healthz_model.GatewayruntimeError) + o.Payload = new(healthz_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/healthz_model/api_get_healthz_response.go b/backend/api/v1beta1/go_http_client/healthz_model/api_get_healthz_response.go index 45943fb9ead..03f6d025137 100644 --- a/backend/api/v1beta1/go_http_client/healthz_model/api_get_healthz_response.go +++ b/backend/api/v1beta1/go_http_client/healthz_model/api_get_healthz_response.go @@ -6,12 +6,14 @@ package healthz_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIGetHealthzResponse api get healthz response +// // swagger:model apiGetHealthzResponse type APIGetHealthzResponse struct { @@ -24,6 +26,11 @@ func (m *APIGetHealthzResponse) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api get healthz response based on context it is used +func (m *APIGetHealthzResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIGetHealthzResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/healthz_model/gatewayruntime_error.go b/backend/api/v1beta1/go_http_client/healthz_model/gatewayruntime_error.go deleted file mode 100644 index 20d3d613e97..00000000000 --- a/backend/api/v1beta1/go_http_client/healthz_model/gatewayruntime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package healthz_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// GatewayruntimeError gatewayruntime error -// swagger:model gatewayruntimeError -type GatewayruntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this gatewayruntime error -func (m *GatewayruntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GatewayruntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GatewayruntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GatewayruntimeError) UnmarshalBinary(b []byte) error { - var res GatewayruntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1beta1/go_http_client/healthz_model/googlerpc_status.go b/backend/api/v1beta1/go_http_client/healthz_model/googlerpc_status.go new file mode 100644 index 00000000000..5baf4074d20 --- /dev/null +++ b/backend/api/v1beta1/go_http_client/healthz_model/googlerpc_status.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package healthz_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1beta1/go_http_client/healthz_model/protobuf_any.go b/backend/api/v1beta1/go_http_client/healthz_model/protobuf_any.go index cc274ef6e58..9695ae066c7 100644 --- a/backend/api/v1beta1/go_http_client/healthz_model/protobuf_any.go +++ b/backend/api/v1beta1/go_http_client/healthz_model/protobuf_any.go @@ -6,9 +6,10 @@ package healthz_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1beta1/go_http_client/job_client/job_client.go b/backend/api/v1beta1/go_http_client/job_client/job_client.go index d6b0cbfc0c5..839c19d0257 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_client.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_client.go @@ -8,8 +8,7 @@ package job_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_client/job_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Job { cli := new(Job) cli.Transport = transport - cli.JobService = job_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Job is a client for job type Job struct { - JobService *job_service.Client + JobService job_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Job struct { // SetTransport changes the transport on the client and all its subresources func (c *Job) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.JobService.SetTransport(transport) - } diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_client.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_client.go index 1e10da12d75..ed39efcb98d 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_client.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_client.go @@ -7,15 +7,40 @@ package job_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new job service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new job service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new job service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for job service API */ @@ -24,16 +49,35 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + JobServiceCreateJob(params *JobServiceCreateJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceCreateJobOK, error) + + JobServiceDeleteJob(params *JobServiceDeleteJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceDeleteJobOK, error) + + JobServiceDisableJob(params *JobServiceDisableJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceDisableJobOK, error) + + JobServiceEnableJob(params *JobServiceEnableJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceEnableJobOK, error) + + JobServiceGetJob(params *JobServiceGetJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceGetJobOK, error) + + JobServiceListJobs(params *JobServiceListJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceListJobsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* JobServiceCreateJob creates a new job */ -func (a *Client) JobServiceCreateJob(params *JobServiceCreateJobParams, authInfo runtime.ClientAuthInfoWriter) (*JobServiceCreateJobOK, error) { +func (a *Client) JobServiceCreateJob(params *JobServiceCreateJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceCreateJobOK, error) { // TODO: Validate the params before sending if params == nil { params = NewJobServiceCreateJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "JobService_CreateJob", Method: "POST", PathPattern: "/apis/v1beta1/jobs", @@ -45,24 +89,33 @@ func (a *Client) JobServiceCreateJob(params *JobServiceCreateJobParams, authInfo AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*JobServiceCreateJobOK), nil - + success, ok := result.(*JobServiceCreateJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceCreateJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* JobServiceDeleteJob deletes a job */ -func (a *Client) JobServiceDeleteJob(params *JobServiceDeleteJobParams, authInfo runtime.ClientAuthInfoWriter) (*JobServiceDeleteJobOK, error) { +func (a *Client) JobServiceDeleteJob(params *JobServiceDeleteJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceDeleteJobOK, error) { // TODO: Validate the params before sending if params == nil { params = NewJobServiceDeleteJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "JobService_DeleteJob", Method: "DELETE", PathPattern: "/apis/v1beta1/jobs/{id}", @@ -74,24 +127,33 @@ func (a *Client) JobServiceDeleteJob(params *JobServiceDeleteJobParams, authInfo AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*JobServiceDeleteJobOK), nil - + success, ok := result.(*JobServiceDeleteJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceDeleteJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* JobServiceDisableJob stops a job and all its associated runs the job is not deleted */ -func (a *Client) JobServiceDisableJob(params *JobServiceDisableJobParams, authInfo runtime.ClientAuthInfoWriter) (*JobServiceDisableJobOK, error) { +func (a *Client) JobServiceDisableJob(params *JobServiceDisableJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceDisableJobOK, error) { // TODO: Validate the params before sending if params == nil { params = NewJobServiceDisableJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "JobService_DisableJob", Method: "POST", PathPattern: "/apis/v1beta1/jobs/{id}/disable", @@ -103,24 +165,33 @@ func (a *Client) JobServiceDisableJob(params *JobServiceDisableJobParams, authIn AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*JobServiceDisableJobOK), nil - + success, ok := result.(*JobServiceDisableJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceDisableJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* JobServiceEnableJob restarts a job that was previously stopped all runs associated with the job will continue */ -func (a *Client) JobServiceEnableJob(params *JobServiceEnableJobParams, authInfo runtime.ClientAuthInfoWriter) (*JobServiceEnableJobOK, error) { +func (a *Client) JobServiceEnableJob(params *JobServiceEnableJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceEnableJobOK, error) { // TODO: Validate the params before sending if params == nil { params = NewJobServiceEnableJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "JobService_EnableJob", Method: "POST", PathPattern: "/apis/v1beta1/jobs/{id}/enable", @@ -132,24 +203,33 @@ func (a *Client) JobServiceEnableJob(params *JobServiceEnableJobParams, authInfo AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*JobServiceEnableJobOK), nil - + success, ok := result.(*JobServiceEnableJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceEnableJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* JobServiceGetJob finds a specific job by ID */ -func (a *Client) JobServiceGetJob(params *JobServiceGetJobParams, authInfo runtime.ClientAuthInfoWriter) (*JobServiceGetJobOK, error) { +func (a *Client) JobServiceGetJob(params *JobServiceGetJobParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceGetJobOK, error) { // TODO: Validate the params before sending if params == nil { params = NewJobServiceGetJobParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "JobService_GetJob", Method: "GET", PathPattern: "/apis/v1beta1/jobs/{id}", @@ -161,24 +241,33 @@ func (a *Client) JobServiceGetJob(params *JobServiceGetJobParams, authInfo runti AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*JobServiceGetJobOK), nil - + success, ok := result.(*JobServiceGetJobOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceGetJobDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* JobServiceListJobs finds all jobs */ -func (a *Client) JobServiceListJobs(params *JobServiceListJobsParams, authInfo runtime.ClientAuthInfoWriter) (*JobServiceListJobsOK, error) { +func (a *Client) JobServiceListJobs(params *JobServiceListJobsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*JobServiceListJobsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewJobServiceListJobsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "JobService_ListJobs", Method: "GET", PathPattern: "/apis/v1beta1/jobs", @@ -190,12 +279,22 @@ func (a *Client) JobServiceListJobs(params *JobServiceListJobsParams, authInfo r AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*JobServiceListJobsOK), nil - + success, ok := result.(*JobServiceListJobsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobServiceListJobsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_create_job_parameters.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_create_job_parameters.go index e69a3f984ac..bde76e13ae2 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_create_job_parameters.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_create_job_parameters.go @@ -13,67 +13,82 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" ) -// NewJobServiceCreateJobParams creates a new JobServiceCreateJobParams object -// with the default values initialized. +// NewJobServiceCreateJobParams creates a new JobServiceCreateJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewJobServiceCreateJobParams() *JobServiceCreateJobParams { - var () return &JobServiceCreateJobParams{ - timeout: cr.DefaultTimeout, } } // NewJobServiceCreateJobParamsWithTimeout creates a new JobServiceCreateJobParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewJobServiceCreateJobParamsWithTimeout(timeout time.Duration) *JobServiceCreateJobParams { - var () return &JobServiceCreateJobParams{ - timeout: timeout, } } // NewJobServiceCreateJobParamsWithContext creates a new JobServiceCreateJobParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewJobServiceCreateJobParamsWithContext(ctx context.Context) *JobServiceCreateJobParams { - var () return &JobServiceCreateJobParams{ - Context: ctx, } } // NewJobServiceCreateJobParamsWithHTTPClient creates a new JobServiceCreateJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewJobServiceCreateJobParamsWithHTTPClient(client *http.Client) *JobServiceCreateJobParams { - var () return &JobServiceCreateJobParams{ HTTPClient: client, } } -/*JobServiceCreateJobParams contains all the parameters to send to the API endpoint -for the job service create job operation typically these are written to a http.Request +/* +JobServiceCreateJobParams contains all the parameters to send to the API endpoint + + for the job service create job operation. + + Typically these are written to a http.Request. */ type JobServiceCreateJobParams struct { - /*Body - The job to be created + /* Job. + The job to be created */ - Body *job_model.APIJob + Job *job_model.APIJob timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the job service create job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceCreateJobParams) WithDefaults() *JobServiceCreateJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service create job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceCreateJobParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the job service create job params func (o *JobServiceCreateJobParams) WithTimeout(timeout time.Duration) *JobServiceCreateJobParams { o.SetTimeout(timeout) @@ -107,15 +122,15 @@ func (o *JobServiceCreateJobParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the job service create job params -func (o *JobServiceCreateJobParams) WithBody(body *job_model.APIJob) *JobServiceCreateJobParams { - o.SetBody(body) +// WithJob adds the job to the job service create job params +func (o *JobServiceCreateJobParams) WithJob(job *job_model.APIJob) *JobServiceCreateJobParams { + o.SetJob(job) return o } -// SetBody adds the body to the job service create job params -func (o *JobServiceCreateJobParams) SetBody(body *job_model.APIJob) { - o.Body = body +// SetJob adds the job to the job service create job params +func (o *JobServiceCreateJobParams) SetJob(job *job_model.APIJob) { + o.Job = job } // WriteToRequest writes these params to a swagger request @@ -125,9 +140,8 @@ func (o *JobServiceCreateJobParams) WriteToRequest(r runtime.ClientRequest, reg return err } var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { + if o.Job != nil { + if err := r.SetBodyParam(o.Job); err != nil { return err } } diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_create_job_responses.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_create_job_responses.go index 0d85017afc9..8fb439b36c9 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_create_job_responses.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_create_job_responses.go @@ -6,14 +6,14 @@ package job_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" ) // JobServiceCreateJobReader is a Reader for the JobServiceCreateJob structure. @@ -24,14 +24,12 @@ type JobServiceCreateJobReader struct { // ReadResponse reads a server response into the received o. func (o *JobServiceCreateJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewJobServiceCreateJobOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewJobServiceCreateJobDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewJobServiceCreateJobOK() *JobServiceCreateJobOK { return &JobServiceCreateJobOK{} } -/*JobServiceCreateJobOK handles this case with default header values. +/* +JobServiceCreateJobOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type JobServiceCreateJobOK struct { Payload *job_model.APIJob } +// IsSuccess returns true when this job service create job o k response has a 2xx status code +func (o *JobServiceCreateJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service create job o k response has a 3xx status code +func (o *JobServiceCreateJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service create job o k response has a 4xx status code +func (o *JobServiceCreateJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service create job o k response has a 5xx status code +func (o *JobServiceCreateJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service create job o k response a status code equal to that given +func (o *JobServiceCreateJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service create job o k response +func (o *JobServiceCreateJobOK) Code() int { + return 200 +} + func (o *JobServiceCreateJobOK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/jobs][%d] jobServiceCreateJobOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs][%d] jobServiceCreateJobOK %s", 200, payload) +} + +func (o *JobServiceCreateJobOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs][%d] jobServiceCreateJobOK %s", 200, payload) +} + +func (o *JobServiceCreateJobOK) GetPayload() *job_model.APIJob { + return o.Payload } func (o *JobServiceCreateJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewJobServiceCreateJobDefault(code int) *JobServiceCreateJobDefault { } } -/*JobServiceCreateJobDefault handles this case with default header values. +/* +JobServiceCreateJobDefault describes a response with status code -1, with default header values. An unexpected error response. */ type JobServiceCreateJobDefault struct { _statusCode int - Payload *job_model.GatewayruntimeError + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service create job default response has a 2xx status code +func (o *JobServiceCreateJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service create job default response has a 3xx status code +func (o *JobServiceCreateJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service create job default response has a 4xx status code +func (o *JobServiceCreateJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service create job default response has a 5xx status code +func (o *JobServiceCreateJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service create job default response a status code equal to that given +func (o *JobServiceCreateJobDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the job service create job default response @@ -96,12 +161,22 @@ func (o *JobServiceCreateJobDefault) Code() int { } func (o *JobServiceCreateJobDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/jobs][%d] JobService_CreateJob default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs][%d] JobService_CreateJob default %s", o._statusCode, payload) +} + +func (o *JobServiceCreateJobDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs][%d] JobService_CreateJob default %s", o._statusCode, payload) +} + +func (o *JobServiceCreateJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload } func (o *JobServiceCreateJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(job_model.GatewayruntimeError) + o.Payload = new(job_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_delete_job_parameters.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_delete_job_parameters.go index c82311fa47c..299890039ae 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_delete_job_parameters.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_delete_job_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewJobServiceDeleteJobParams creates a new JobServiceDeleteJobParams object -// with the default values initialized. +// NewJobServiceDeleteJobParams creates a new JobServiceDeleteJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewJobServiceDeleteJobParams() *JobServiceDeleteJobParams { - var () return &JobServiceDeleteJobParams{ - timeout: cr.DefaultTimeout, } } // NewJobServiceDeleteJobParamsWithTimeout creates a new JobServiceDeleteJobParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewJobServiceDeleteJobParamsWithTimeout(timeout time.Duration) *JobServiceDeleteJobParams { - var () return &JobServiceDeleteJobParams{ - timeout: timeout, } } // NewJobServiceDeleteJobParamsWithContext creates a new JobServiceDeleteJobParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewJobServiceDeleteJobParamsWithContext(ctx context.Context) *JobServiceDeleteJobParams { - var () return &JobServiceDeleteJobParams{ - Context: ctx, } } // NewJobServiceDeleteJobParamsWithHTTPClient creates a new JobServiceDeleteJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewJobServiceDeleteJobParamsWithHTTPClient(client *http.Client) *JobServiceDeleteJobParams { - var () return &JobServiceDeleteJobParams{ HTTPClient: client, } } -/*JobServiceDeleteJobParams contains all the parameters to send to the API endpoint -for the job service delete job operation typically these are written to a http.Request +/* +JobServiceDeleteJobParams contains all the parameters to send to the API endpoint + + for the job service delete job operation. + + Typically these are written to a http.Request. */ type JobServiceDeleteJobParams struct { - /*ID - The ID of the job to be deleted + /* ID. + The ID of the job to be deleted */ ID string @@ -72,6 +72,21 @@ type JobServiceDeleteJobParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the job service delete job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceDeleteJobParams) WithDefaults() *JobServiceDeleteJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service delete job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceDeleteJobParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the job service delete job params func (o *JobServiceDeleteJobParams) WithTimeout(timeout time.Duration) *JobServiceDeleteJobParams { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_delete_job_responses.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_delete_job_responses.go index bff35c13a40..3f827e999a4 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_delete_job_responses.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_delete_job_responses.go @@ -6,14 +6,14 @@ package job_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" ) // JobServiceDeleteJobReader is a Reader for the JobServiceDeleteJob structure. @@ -24,14 +24,12 @@ type JobServiceDeleteJobReader struct { // ReadResponse reads a server response into the received o. func (o *JobServiceDeleteJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewJobServiceDeleteJobOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewJobServiceDeleteJobDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewJobServiceDeleteJobOK() *JobServiceDeleteJobOK { return &JobServiceDeleteJobOK{} } -/*JobServiceDeleteJobOK handles this case with default header values. +/* +JobServiceDeleteJobOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type JobServiceDeleteJobOK struct { Payload interface{} } +// IsSuccess returns true when this job service delete job o k response has a 2xx status code +func (o *JobServiceDeleteJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service delete job o k response has a 3xx status code +func (o *JobServiceDeleteJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service delete job o k response has a 4xx status code +func (o *JobServiceDeleteJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service delete job o k response has a 5xx status code +func (o *JobServiceDeleteJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service delete job o k response a status code equal to that given +func (o *JobServiceDeleteJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service delete job o k response +func (o *JobServiceDeleteJobOK) Code() int { + return 200 +} + func (o *JobServiceDeleteJobOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/jobs/{id}][%d] jobServiceDeleteJobOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/jobs/{id}][%d] jobServiceDeleteJobOK %s", 200, payload) +} + +func (o *JobServiceDeleteJobOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/jobs/{id}][%d] jobServiceDeleteJobOK %s", 200, payload) +} + +func (o *JobServiceDeleteJobOK) GetPayload() interface{} { + return o.Payload } func (o *JobServiceDeleteJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewJobServiceDeleteJobDefault(code int) *JobServiceDeleteJobDefault { } } -/*JobServiceDeleteJobDefault handles this case with default header values. +/* +JobServiceDeleteJobDefault describes a response with status code -1, with default header values. An unexpected error response. */ type JobServiceDeleteJobDefault struct { _statusCode int - Payload *job_model.GatewayruntimeError + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service delete job default response has a 2xx status code +func (o *JobServiceDeleteJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service delete job default response has a 3xx status code +func (o *JobServiceDeleteJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service delete job default response has a 4xx status code +func (o *JobServiceDeleteJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service delete job default response has a 5xx status code +func (o *JobServiceDeleteJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service delete job default response a status code equal to that given +func (o *JobServiceDeleteJobDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the job service delete job default response @@ -94,12 +159,22 @@ func (o *JobServiceDeleteJobDefault) Code() int { } func (o *JobServiceDeleteJobDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/jobs/{id}][%d] JobService_DeleteJob default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/jobs/{id}][%d] JobService_DeleteJob default %s", o._statusCode, payload) +} + +func (o *JobServiceDeleteJobDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/jobs/{id}][%d] JobService_DeleteJob default %s", o._statusCode, payload) +} + +func (o *JobServiceDeleteJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload } func (o *JobServiceDeleteJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(job_model.GatewayruntimeError) + o.Payload = new(job_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_disable_job_parameters.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_disable_job_parameters.go index a8fef13570f..a96d252aee8 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_disable_job_parameters.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_disable_job_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewJobServiceDisableJobParams creates a new JobServiceDisableJobParams object -// with the default values initialized. +// NewJobServiceDisableJobParams creates a new JobServiceDisableJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewJobServiceDisableJobParams() *JobServiceDisableJobParams { - var () return &JobServiceDisableJobParams{ - timeout: cr.DefaultTimeout, } } // NewJobServiceDisableJobParamsWithTimeout creates a new JobServiceDisableJobParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewJobServiceDisableJobParamsWithTimeout(timeout time.Duration) *JobServiceDisableJobParams { - var () return &JobServiceDisableJobParams{ - timeout: timeout, } } // NewJobServiceDisableJobParamsWithContext creates a new JobServiceDisableJobParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewJobServiceDisableJobParamsWithContext(ctx context.Context) *JobServiceDisableJobParams { - var () return &JobServiceDisableJobParams{ - Context: ctx, } } // NewJobServiceDisableJobParamsWithHTTPClient creates a new JobServiceDisableJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewJobServiceDisableJobParamsWithHTTPClient(client *http.Client) *JobServiceDisableJobParams { - var () return &JobServiceDisableJobParams{ HTTPClient: client, } } -/*JobServiceDisableJobParams contains all the parameters to send to the API endpoint -for the job service disable job operation typically these are written to a http.Request +/* +JobServiceDisableJobParams contains all the parameters to send to the API endpoint + + for the job service disable job operation. + + Typically these are written to a http.Request. */ type JobServiceDisableJobParams struct { - /*ID - The ID of the job to be disabled + /* ID. + The ID of the job to be disabled */ ID string @@ -72,6 +72,21 @@ type JobServiceDisableJobParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the job service disable job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceDisableJobParams) WithDefaults() *JobServiceDisableJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service disable job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceDisableJobParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the job service disable job params func (o *JobServiceDisableJobParams) WithTimeout(timeout time.Duration) *JobServiceDisableJobParams { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_disable_job_responses.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_disable_job_responses.go index 282ed575b9b..0ce9e1b3e24 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_disable_job_responses.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_disable_job_responses.go @@ -6,14 +6,14 @@ package job_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" ) // JobServiceDisableJobReader is a Reader for the JobServiceDisableJob structure. @@ -24,14 +24,12 @@ type JobServiceDisableJobReader struct { // ReadResponse reads a server response into the received o. func (o *JobServiceDisableJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewJobServiceDisableJobOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewJobServiceDisableJobDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewJobServiceDisableJobOK() *JobServiceDisableJobOK { return &JobServiceDisableJobOK{} } -/*JobServiceDisableJobOK handles this case with default header values. +/* +JobServiceDisableJobOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type JobServiceDisableJobOK struct { Payload interface{} } +// IsSuccess returns true when this job service disable job o k response has a 2xx status code +func (o *JobServiceDisableJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service disable job o k response has a 3xx status code +func (o *JobServiceDisableJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service disable job o k response has a 4xx status code +func (o *JobServiceDisableJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service disable job o k response has a 5xx status code +func (o *JobServiceDisableJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service disable job o k response a status code equal to that given +func (o *JobServiceDisableJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service disable job o k response +func (o *JobServiceDisableJobOK) Code() int { + return 200 +} + func (o *JobServiceDisableJobOK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/disable][%d] jobServiceDisableJobOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/disable][%d] jobServiceDisableJobOK %s", 200, payload) +} + +func (o *JobServiceDisableJobOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/disable][%d] jobServiceDisableJobOK %s", 200, payload) +} + +func (o *JobServiceDisableJobOK) GetPayload() interface{} { + return o.Payload } func (o *JobServiceDisableJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewJobServiceDisableJobDefault(code int) *JobServiceDisableJobDefault { } } -/*JobServiceDisableJobDefault handles this case with default header values. +/* +JobServiceDisableJobDefault describes a response with status code -1, with default header values. An unexpected error response. */ type JobServiceDisableJobDefault struct { _statusCode int - Payload *job_model.GatewayruntimeError + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service disable job default response has a 2xx status code +func (o *JobServiceDisableJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service disable job default response has a 3xx status code +func (o *JobServiceDisableJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service disable job default response has a 4xx status code +func (o *JobServiceDisableJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service disable job default response has a 5xx status code +func (o *JobServiceDisableJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service disable job default response a status code equal to that given +func (o *JobServiceDisableJobDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the job service disable job default response @@ -94,12 +159,22 @@ func (o *JobServiceDisableJobDefault) Code() int { } func (o *JobServiceDisableJobDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/disable][%d] JobService_DisableJob default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/disable][%d] JobService_DisableJob default %s", o._statusCode, payload) +} + +func (o *JobServiceDisableJobDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/disable][%d] JobService_DisableJob default %s", o._statusCode, payload) +} + +func (o *JobServiceDisableJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload } func (o *JobServiceDisableJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(job_model.GatewayruntimeError) + o.Payload = new(job_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_enable_job_parameters.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_enable_job_parameters.go index 1fe5d10c977..651b1bc8f01 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_enable_job_parameters.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_enable_job_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewJobServiceEnableJobParams creates a new JobServiceEnableJobParams object -// with the default values initialized. +// NewJobServiceEnableJobParams creates a new JobServiceEnableJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewJobServiceEnableJobParams() *JobServiceEnableJobParams { - var () return &JobServiceEnableJobParams{ - timeout: cr.DefaultTimeout, } } // NewJobServiceEnableJobParamsWithTimeout creates a new JobServiceEnableJobParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewJobServiceEnableJobParamsWithTimeout(timeout time.Duration) *JobServiceEnableJobParams { - var () return &JobServiceEnableJobParams{ - timeout: timeout, } } // NewJobServiceEnableJobParamsWithContext creates a new JobServiceEnableJobParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewJobServiceEnableJobParamsWithContext(ctx context.Context) *JobServiceEnableJobParams { - var () return &JobServiceEnableJobParams{ - Context: ctx, } } // NewJobServiceEnableJobParamsWithHTTPClient creates a new JobServiceEnableJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewJobServiceEnableJobParamsWithHTTPClient(client *http.Client) *JobServiceEnableJobParams { - var () return &JobServiceEnableJobParams{ HTTPClient: client, } } -/*JobServiceEnableJobParams contains all the parameters to send to the API endpoint -for the job service enable job operation typically these are written to a http.Request +/* +JobServiceEnableJobParams contains all the parameters to send to the API endpoint + + for the job service enable job operation. + + Typically these are written to a http.Request. */ type JobServiceEnableJobParams struct { - /*ID - The ID of the job to be enabled + /* ID. + The ID of the job to be enabled */ ID string @@ -72,6 +72,21 @@ type JobServiceEnableJobParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the job service enable job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceEnableJobParams) WithDefaults() *JobServiceEnableJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service enable job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceEnableJobParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the job service enable job params func (o *JobServiceEnableJobParams) WithTimeout(timeout time.Duration) *JobServiceEnableJobParams { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_enable_job_responses.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_enable_job_responses.go index 5fac7f83769..5935b2fc840 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_enable_job_responses.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_enable_job_responses.go @@ -6,14 +6,14 @@ package job_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" ) // JobServiceEnableJobReader is a Reader for the JobServiceEnableJob structure. @@ -24,14 +24,12 @@ type JobServiceEnableJobReader struct { // ReadResponse reads a server response into the received o. func (o *JobServiceEnableJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewJobServiceEnableJobOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewJobServiceEnableJobDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewJobServiceEnableJobOK() *JobServiceEnableJobOK { return &JobServiceEnableJobOK{} } -/*JobServiceEnableJobOK handles this case with default header values. +/* +JobServiceEnableJobOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type JobServiceEnableJobOK struct { Payload interface{} } +// IsSuccess returns true when this job service enable job o k response has a 2xx status code +func (o *JobServiceEnableJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service enable job o k response has a 3xx status code +func (o *JobServiceEnableJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service enable job o k response has a 4xx status code +func (o *JobServiceEnableJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service enable job o k response has a 5xx status code +func (o *JobServiceEnableJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service enable job o k response a status code equal to that given +func (o *JobServiceEnableJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service enable job o k response +func (o *JobServiceEnableJobOK) Code() int { + return 200 +} + func (o *JobServiceEnableJobOK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/enable][%d] jobServiceEnableJobOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/enable][%d] jobServiceEnableJobOK %s", 200, payload) +} + +func (o *JobServiceEnableJobOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/enable][%d] jobServiceEnableJobOK %s", 200, payload) +} + +func (o *JobServiceEnableJobOK) GetPayload() interface{} { + return o.Payload } func (o *JobServiceEnableJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewJobServiceEnableJobDefault(code int) *JobServiceEnableJobDefault { } } -/*JobServiceEnableJobDefault handles this case with default header values. +/* +JobServiceEnableJobDefault describes a response with status code -1, with default header values. An unexpected error response. */ type JobServiceEnableJobDefault struct { _statusCode int - Payload *job_model.GatewayruntimeError + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service enable job default response has a 2xx status code +func (o *JobServiceEnableJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service enable job default response has a 3xx status code +func (o *JobServiceEnableJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service enable job default response has a 4xx status code +func (o *JobServiceEnableJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service enable job default response has a 5xx status code +func (o *JobServiceEnableJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service enable job default response a status code equal to that given +func (o *JobServiceEnableJobDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the job service enable job default response @@ -94,12 +159,22 @@ func (o *JobServiceEnableJobDefault) Code() int { } func (o *JobServiceEnableJobDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/enable][%d] JobService_EnableJob default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/enable][%d] JobService_EnableJob default %s", o._statusCode, payload) +} + +func (o *JobServiceEnableJobDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/jobs/{id}/enable][%d] JobService_EnableJob default %s", o._statusCode, payload) +} + +func (o *JobServiceEnableJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload } func (o *JobServiceEnableJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(job_model.GatewayruntimeError) + o.Payload = new(job_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_get_job_parameters.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_get_job_parameters.go index 11cef3e6402..09652d7743d 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_get_job_parameters.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_get_job_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewJobServiceGetJobParams creates a new JobServiceGetJobParams object -// with the default values initialized. +// NewJobServiceGetJobParams creates a new JobServiceGetJobParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewJobServiceGetJobParams() *JobServiceGetJobParams { - var () return &JobServiceGetJobParams{ - timeout: cr.DefaultTimeout, } } // NewJobServiceGetJobParamsWithTimeout creates a new JobServiceGetJobParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewJobServiceGetJobParamsWithTimeout(timeout time.Duration) *JobServiceGetJobParams { - var () return &JobServiceGetJobParams{ - timeout: timeout, } } // NewJobServiceGetJobParamsWithContext creates a new JobServiceGetJobParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewJobServiceGetJobParamsWithContext(ctx context.Context) *JobServiceGetJobParams { - var () return &JobServiceGetJobParams{ - Context: ctx, } } // NewJobServiceGetJobParamsWithHTTPClient creates a new JobServiceGetJobParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewJobServiceGetJobParamsWithHTTPClient(client *http.Client) *JobServiceGetJobParams { - var () return &JobServiceGetJobParams{ HTTPClient: client, } } -/*JobServiceGetJobParams contains all the parameters to send to the API endpoint -for the job service get job operation typically these are written to a http.Request +/* +JobServiceGetJobParams contains all the parameters to send to the API endpoint + + for the job service get job operation. + + Typically these are written to a http.Request. */ type JobServiceGetJobParams struct { - /*ID - The ID of the job to be retrieved + /* ID. + The ID of the job to be retrieved */ ID string @@ -72,6 +72,21 @@ type JobServiceGetJobParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the job service get job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceGetJobParams) WithDefaults() *JobServiceGetJobParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service get job params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceGetJobParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the job service get job params func (o *JobServiceGetJobParams) WithTimeout(timeout time.Duration) *JobServiceGetJobParams { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_get_job_responses.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_get_job_responses.go index cc4277681b9..1377740a32b 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_get_job_responses.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_get_job_responses.go @@ -6,14 +6,14 @@ package job_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" ) // JobServiceGetJobReader is a Reader for the JobServiceGetJob structure. @@ -24,14 +24,12 @@ type JobServiceGetJobReader struct { // ReadResponse reads a server response into the received o. func (o *JobServiceGetJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewJobServiceGetJobOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewJobServiceGetJobDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewJobServiceGetJobOK() *JobServiceGetJobOK { return &JobServiceGetJobOK{} } -/*JobServiceGetJobOK handles this case with default header values. +/* +JobServiceGetJobOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type JobServiceGetJobOK struct { Payload *job_model.APIJob } +// IsSuccess returns true when this job service get job o k response has a 2xx status code +func (o *JobServiceGetJobOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service get job o k response has a 3xx status code +func (o *JobServiceGetJobOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service get job o k response has a 4xx status code +func (o *JobServiceGetJobOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service get job o k response has a 5xx status code +func (o *JobServiceGetJobOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service get job o k response a status code equal to that given +func (o *JobServiceGetJobOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service get job o k response +func (o *JobServiceGetJobOK) Code() int { + return 200 +} + func (o *JobServiceGetJobOK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/jobs/{id}][%d] jobServiceGetJobOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/jobs/{id}][%d] jobServiceGetJobOK %s", 200, payload) +} + +func (o *JobServiceGetJobOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/jobs/{id}][%d] jobServiceGetJobOK %s", 200, payload) +} + +func (o *JobServiceGetJobOK) GetPayload() *job_model.APIJob { + return o.Payload } func (o *JobServiceGetJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewJobServiceGetJobDefault(code int) *JobServiceGetJobDefault { } } -/*JobServiceGetJobDefault handles this case with default header values. +/* +JobServiceGetJobDefault describes a response with status code -1, with default header values. An unexpected error response. */ type JobServiceGetJobDefault struct { _statusCode int - Payload *job_model.GatewayruntimeError + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service get job default response has a 2xx status code +func (o *JobServiceGetJobDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service get job default response has a 3xx status code +func (o *JobServiceGetJobDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service get job default response has a 4xx status code +func (o *JobServiceGetJobDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service get job default response has a 5xx status code +func (o *JobServiceGetJobDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service get job default response a status code equal to that given +func (o *JobServiceGetJobDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the job service get job default response @@ -96,12 +161,22 @@ func (o *JobServiceGetJobDefault) Code() int { } func (o *JobServiceGetJobDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/jobs/{id}][%d] JobService_GetJob default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/jobs/{id}][%d] JobService_GetJob default %s", o._statusCode, payload) +} + +func (o *JobServiceGetJobDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/jobs/{id}][%d] JobService_GetJob default %s", o._statusCode, payload) +} + +func (o *JobServiceGetJobDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload } func (o *JobServiceGetJobDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(job_model.GatewayruntimeError) + o.Payload = new(job_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_list_jobs_parameters.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_list_jobs_parameters.go index 49ddab1f533..3381d851905 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_list_jobs_parameters.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_list_jobs_parameters.go @@ -13,101 +13,98 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewJobServiceListJobsParams creates a new JobServiceListJobsParams object -// with the default values initialized. +// NewJobServiceListJobsParams creates a new JobServiceListJobsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewJobServiceListJobsParams() *JobServiceListJobsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &JobServiceListJobsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - timeout: cr.DefaultTimeout, } } // NewJobServiceListJobsParamsWithTimeout creates a new JobServiceListJobsParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewJobServiceListJobsParamsWithTimeout(timeout time.Duration) *JobServiceListJobsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &JobServiceListJobsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - timeout: timeout, } } // NewJobServiceListJobsParamsWithContext creates a new JobServiceListJobsParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewJobServiceListJobsParamsWithContext(ctx context.Context) *JobServiceListJobsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &JobServiceListJobsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - Context: ctx, } } // NewJobServiceListJobsParamsWithHTTPClient creates a new JobServiceListJobsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewJobServiceListJobsParamsWithHTTPClient(client *http.Client) *JobServiceListJobsParams { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &JobServiceListJobsParams{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - HTTPClient: client, + HTTPClient: client, } } -/*JobServiceListJobsParams contains all the parameters to send to the API endpoint -for the job service list jobs operation typically these are written to a http.Request +/* +JobServiceListJobsParams contains all the parameters to send to the API endpoint + + for the job service list jobs operation. + + Typically these are written to a http.Request. */ type JobServiceListJobsParams struct { - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). + /* Filter. + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). */ Filter *string - /*PageSize - The number of jobs to be listed per page. If there are more jobs than this + + /* PageSize. + + The number of jobs to be listed per page. If there are more jobs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the next page of results. The token is acquried + + /* PageToken. + + A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListJobs call or can be omitted when fetching the first page. - */ PageToken *string - /*ResourceReferenceKeyID - The ID of the resource that referred to. + /* ResourceReferenceKeyID. + + The ID of the resource that referred to. */ ResourceReferenceKeyID *string - /*ResourceReferenceKeyType - The type of the resource that referred to. + /* ResourceReferenceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" */ ResourceReferenceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc". - Ascending by default. + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc". + Ascending by default. */ SortBy *string @@ -116,6 +113,32 @@ type JobServiceListJobsParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the job service list jobs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceListJobsParams) WithDefaults() *JobServiceListJobsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the job service list jobs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *JobServiceListJobsParams) SetDefaults() { + var ( + resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := JobServiceListJobsParams{ + ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + // WithTimeout adds the timeout to the job service list jobs params func (o *JobServiceListJobsParams) WithTimeout(timeout time.Duration) *JobServiceListJobsParams { o.SetTimeout(timeout) @@ -227,96 +250,102 @@ func (o *JobServiceListJobsParams) WriteToRequest(r runtime.ClientRequest, reg s // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.ResourceReferenceKeyID != nil { // query param resource_reference_key.id var qrResourceReferenceKeyID string + if o.ResourceReferenceKeyID != nil { qrResourceReferenceKeyID = *o.ResourceReferenceKeyID } qResourceReferenceKeyID := qrResourceReferenceKeyID if qResourceReferenceKeyID != "" { + if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { return err } } - } if o.ResourceReferenceKeyType != nil { // query param resource_reference_key.type var qrResourceReferenceKeyType string + if o.ResourceReferenceKeyType != nil { qrResourceReferenceKeyType = *o.ResourceReferenceKeyType } qResourceReferenceKeyType := qrResourceReferenceKeyType if qResourceReferenceKeyType != "" { + if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_list_jobs_responses.go b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_list_jobs_responses.go index adbc4587c7f..5652b8241dc 100644 --- a/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_list_jobs_responses.go +++ b/backend/api/v1beta1/go_http_client/job_client/job_service/job_service_list_jobs_responses.go @@ -6,14 +6,14 @@ package job_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - job_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/job_model" ) // JobServiceListJobsReader is a Reader for the JobServiceListJobs structure. @@ -24,14 +24,12 @@ type JobServiceListJobsReader struct { // ReadResponse reads a server response into the received o. func (o *JobServiceListJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewJobServiceListJobsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewJobServiceListJobsDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewJobServiceListJobsOK() *JobServiceListJobsOK { return &JobServiceListJobsOK{} } -/*JobServiceListJobsOK handles this case with default header values. +/* +JobServiceListJobsOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type JobServiceListJobsOK struct { Payload *job_model.APIListJobsResponse } +// IsSuccess returns true when this job service list jobs o k response has a 2xx status code +func (o *JobServiceListJobsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this job service list jobs o k response has a 3xx status code +func (o *JobServiceListJobsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this job service list jobs o k response has a 4xx status code +func (o *JobServiceListJobsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this job service list jobs o k response has a 5xx status code +func (o *JobServiceListJobsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this job service list jobs o k response a status code equal to that given +func (o *JobServiceListJobsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the job service list jobs o k response +func (o *JobServiceListJobsOK) Code() int { + return 200 +} + func (o *JobServiceListJobsOK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/jobs][%d] jobServiceListJobsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/jobs][%d] jobServiceListJobsOK %s", 200, payload) +} + +func (o *JobServiceListJobsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/jobs][%d] jobServiceListJobsOK %s", 200, payload) +} + +func (o *JobServiceListJobsOK) GetPayload() *job_model.APIListJobsResponse { + return o.Payload } func (o *JobServiceListJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewJobServiceListJobsDefault(code int) *JobServiceListJobsDefault { } } -/*JobServiceListJobsDefault handles this case with default header values. +/* +JobServiceListJobsDefault describes a response with status code -1, with default header values. An unexpected error response. */ type JobServiceListJobsDefault struct { _statusCode int - Payload *job_model.GatewayruntimeError + Payload *job_model.GooglerpcStatus +} + +// IsSuccess returns true when this job service list jobs default response has a 2xx status code +func (o *JobServiceListJobsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this job service list jobs default response has a 3xx status code +func (o *JobServiceListJobsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this job service list jobs default response has a 4xx status code +func (o *JobServiceListJobsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this job service list jobs default response has a 5xx status code +func (o *JobServiceListJobsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this job service list jobs default response a status code equal to that given +func (o *JobServiceListJobsDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the job service list jobs default response @@ -96,12 +161,22 @@ func (o *JobServiceListJobsDefault) Code() int { } func (o *JobServiceListJobsDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/jobs][%d] JobService_ListJobs default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/jobs][%d] JobService_ListJobs default %s", o._statusCode, payload) +} + +func (o *JobServiceListJobsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/jobs][%d] JobService_ListJobs default %s", o._statusCode, payload) +} + +func (o *JobServiceListJobsDefault) GetPayload() *job_model.GooglerpcStatus { + return o.Payload } func (o *JobServiceListJobsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(job_model.GatewayruntimeError) + o.Payload = new(job_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/job_model/api_cron_schedule.go b/backend/api/v1beta1/go_http_client/job_model/api_cron_schedule.go index 6cf33620b63..e69871a127d 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_cron_schedule.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_cron_schedule.go @@ -6,14 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APICronSchedule CronSchedule allow scheduling the job with unix-like cron +// // swagger:model apiCronSchedule type APICronSchedule struct { @@ -49,7 +51,6 @@ func (m *APICronSchedule) Validate(formats strfmt.Registry) error { } func (m *APICronSchedule) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required return nil } @@ -62,7 +63,6 @@ func (m *APICronSchedule) validateEndTime(formats strfmt.Registry) error { } func (m *APICronSchedule) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required return nil } @@ -74,6 +74,11 @@ func (m *APICronSchedule) validateStartTime(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api cron schedule based on context it is used +func (m *APICronSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APICronSchedule) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/job_model/api_job.go b/backend/api/v1beta1/go_http_client/job_model/api_job.go index 8bd5e87802d..7fa17059ff2 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_job.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_job.go @@ -6,16 +6,17 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APIJob api job +// // swagger:model apiJob type APIJob struct { @@ -42,7 +43,7 @@ type APIJob struct { MaxConcurrency int64 `json:"max_concurrency,omitempty,string"` // mode - Mode JobMode `json:"mode,omitempty"` + Mode *JobMode `json:"mode,omitempty"` // Required input field. Job name provided by user. Not unique. Name string `json:"name,omitempty"` @@ -111,7 +112,6 @@ func (m *APIJob) Validate(formats strfmt.Registry) error { } func (m *APIJob) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -124,23 +124,25 @@ func (m *APIJob) validateCreatedAt(formats strfmt.Registry) error { } func (m *APIJob) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required return nil } - if err := m.Mode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mode") + if m.Mode != nil { + if err := m.Mode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err } - return err } return nil } func (m *APIJob) validatePipelineSpec(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineSpec) { // not required return nil } @@ -149,6 +151,8 @@ func (m *APIJob) validatePipelineSpec(formats strfmt.Registry) error { if err := m.PipelineSpec.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") } return err } @@ -158,7 +162,6 @@ func (m *APIJob) validatePipelineSpec(formats strfmt.Registry) error { } func (m *APIJob) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -172,6 +175,8 @@ func (m *APIJob) validateResourceReferences(formats strfmt.Registry) error { if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } @@ -183,7 +188,6 @@ func (m *APIJob) validateResourceReferences(formats strfmt.Registry) error { } func (m *APIJob) validateTrigger(formats strfmt.Registry) error { - if swag.IsZero(m.Trigger) { // not required return nil } @@ -192,6 +196,8 @@ func (m *APIJob) validateTrigger(formats strfmt.Registry) error { if err := m.Trigger.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("trigger") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trigger") } return err } @@ -201,7 +207,6 @@ func (m *APIJob) validateTrigger(formats strfmt.Registry) error { } func (m *APIJob) validateUpdatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.UpdatedAt) { // not required return nil } @@ -213,6 +218,120 @@ func (m *APIJob) validateUpdatedAt(formats strfmt.Registry) error { return nil } +// ContextValidate validate this api job based on the context it is used +func (m *APIJob) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMode(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePipelineSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTrigger(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIJob) contextValidateMode(ctx context.Context, formats strfmt.Registry) error { + + if m.Mode != nil { + + if swag.IsZero(m.Mode) { // not required + return nil + } + + if err := m.Mode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err + } + } + + return nil +} + +func (m *APIJob) contextValidatePipelineSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineSpec != nil { + + if swag.IsZero(m.PipelineSpec) { // not required + return nil + } + + if err := m.PipelineSpec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") + } + return err + } + } + + return nil +} + +func (m *APIJob) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + + if swag.IsZero(m.ResourceReferences[i]) { // not required + return nil + } + + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIJob) contextValidateTrigger(ctx context.Context, formats strfmt.Registry) error { + + if m.Trigger != nil { + + if swag.IsZero(m.Trigger) { // not required + return nil + } + + if err := m.Trigger.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("trigger") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trigger") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *APIJob) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/job_model/api_list_jobs_response.go b/backend/api/v1beta1/go_http_client/job_model/api_list_jobs_response.go index 3e87d2ce10d..581ef6ca487 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_list_jobs_response.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_list_jobs_response.go @@ -6,15 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIListJobsResponse api list jobs response +// // swagger:model apiListJobsResponse type APIListJobsResponse struct { @@ -43,7 +44,6 @@ func (m *APIListJobsResponse) Validate(formats strfmt.Registry) error { } func (m *APIListJobsResponse) validateJobs(formats strfmt.Registry) error { - if swag.IsZero(m.Jobs) { // not required return nil } @@ -57,6 +57,47 @@ func (m *APIListJobsResponse) validateJobs(formats strfmt.Registry) error { if err := m.Jobs[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("jobs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api list jobs response based on the context it is used +func (m *APIListJobsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateJobs(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIListJobsResponse) contextValidateJobs(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Jobs); i++ { + + if m.Jobs[i] != nil { + + if swag.IsZero(m.Jobs[i]) { // not required + return nil + } + + if err := m.Jobs[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("jobs" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/job_model/api_parameter.go b/backend/api/v1beta1/go_http_client/job_model/api_parameter.go index 999505b4470..d730cc452f1 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_parameter.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_parameter.go @@ -6,12 +6,14 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIParameter api parameter +// // swagger:model apiParameter type APIParameter struct { @@ -27,6 +29,11 @@ func (m *APIParameter) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api parameter based on context it is used +func (m *APIParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIParameter) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/job_model/api_periodic_schedule.go b/backend/api/v1beta1/go_http_client/job_model/api_periodic_schedule.go index ad1f6a33257..6fc4af534fa 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_periodic_schedule.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_periodic_schedule.go @@ -6,14 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APIPeriodicSchedule PeriodicSchedule allow scheduling the job periodically with certain interval +// // swagger:model apiPeriodicSchedule type APIPeriodicSchedule struct { @@ -48,7 +50,6 @@ func (m *APIPeriodicSchedule) Validate(formats strfmt.Registry) error { } func (m *APIPeriodicSchedule) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required return nil } @@ -61,7 +62,6 @@ func (m *APIPeriodicSchedule) validateEndTime(formats strfmt.Registry) error { } func (m *APIPeriodicSchedule) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required return nil } @@ -73,6 +73,11 @@ func (m *APIPeriodicSchedule) validateStartTime(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api periodic schedule based on context it is used +func (m *APIPeriodicSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIPeriodicSchedule) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/job_model/api_pipeline_spec.go b/backend/api/v1beta1/go_http_client/job_model/api_pipeline_spec.go index d6341c7dec1..2a116a3eb4c 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_pipeline_spec.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_pipeline_spec.go @@ -6,15 +6,16 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIPipelineSpec api pipeline spec +// // swagger:model apiPipelineSpec type APIPipelineSpec struct { @@ -60,7 +61,6 @@ func (m *APIPipelineSpec) Validate(formats strfmt.Registry) error { } func (m *APIPipelineSpec) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -74,6 +74,8 @@ func (m *APIPipelineSpec) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -85,7 +87,6 @@ func (m *APIPipelineSpec) validateParameters(formats strfmt.Registry) error { } func (m *APIPipelineSpec) validateRuntimeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RuntimeConfig) { // not required return nil } @@ -94,6 +95,72 @@ func (m *APIPipelineSpec) validateRuntimeConfig(formats strfmt.Registry) error { if err := m.RuntimeConfig.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api pipeline spec based on the context it is used +func (m *APIPipelineSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRuntimeConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIPipelineSpec) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + + if swag.IsZero(m.Parameters[i]) { // not required + return nil + } + + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIPipelineSpec) contextValidateRuntimeConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.RuntimeConfig != nil { + + if swag.IsZero(m.RuntimeConfig) { // not required + return nil + } + + if err := m.RuntimeConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") } return err } diff --git a/backend/api/v1beta1/go_http_client/job_model/api_relationship.go b/backend/api/v1beta1/go_http_client/job_model/api_relationship.go index c3987f80bb8..7b56d9d5bfb 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_relationship.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_relationship.go @@ -6,18 +6,28 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIRelationship api relationship +// // swagger:model apiRelationship type APIRelationship string +func NewAPIRelationship(value APIRelationship) *APIRelationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIRelationship. +func (m APIRelationship) Pointer() *APIRelationship { + return &m +} + const ( // APIRelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m APIRelationship) validateAPIRelationshipEnum(path, location string, value APIRelationship) error { - if err := validate.Enum(path, location, value, apiRelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiRelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m APIRelationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api relationship based on context it is used +func (m APIRelationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/job_model/api_resource_key.go b/backend/api/v1beta1/go_http_client/job_model/api_resource_key.go index 4a894169800..3120e060680 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_resource_key.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_resource_key.go @@ -6,13 +6,15 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceKey api resource key +// // swagger:model apiResourceKey type APIResourceKey struct { @@ -20,7 +22,7 @@ type APIResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type APIResourceType `json:"type,omitempty"` + Type *APIResourceType `json:"type,omitempty"` } // Validate validates this api resource key @@ -38,16 +40,54 @@ func (m *APIResourceKey) Validate(formats strfmt.Registry) error { } func (m *APIResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource key based on the context it is used +func (m *APIResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/job_model/api_resource_reference.go b/backend/api/v1beta1/go_http_client/job_model/api_resource_reference.go index 3e0b921d5da..85568f2550f 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_resource_reference.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_resource_reference.go @@ -6,13 +6,15 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceReference api resource reference +// // swagger:model apiResourceReference type APIResourceReference struct { @@ -23,7 +25,7 @@ type APIResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship APIRelationship `json:"relationship,omitempty"` + Relationship *APIRelationship `json:"relationship,omitempty"` } // Validate validates this api resource reference @@ -45,7 +47,6 @@ func (m *APIResourceReference) Validate(formats strfmt.Registry) error { } func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,79 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { } func (m *APIResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource reference based on the context it is used +func (m *APIResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + + if swag.IsZero(m.Key) { // not required + return nil + } + + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *APIResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + + if swag.IsZero(m.Relationship) { // not required + return nil + } + + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/job_model/api_resource_type.go b/backend/api/v1beta1/go_http_client/job_model/api_resource_type.go index 1d6d8e2eb57..f346dfadfaa 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_resource_type.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_resource_type.go @@ -6,18 +6,28 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIResourceType api resource type +// // swagger:model apiResourceType type APIResourceType string +func NewAPIResourceType(value APIResourceType) *APIResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIResourceType. +func (m APIResourceType) Pointer() *APIResourceType { + return &m +} + const ( // APIResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m APIResourceType) validateAPIResourceTypeEnum(path, location string, value APIResourceType) error { - if err := validate.Enum(path, location, value, apiResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m APIResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api resource type based on context it is used +func (m APIResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/job_model/api_trigger.go b/backend/api/v1beta1/go_http_client/job_model/api_trigger.go index 9e03e3fbe58..0f6b2e2aa3e 100644 --- a/backend/api/v1beta1/go_http_client/job_model/api_trigger.go +++ b/backend/api/v1beta1/go_http_client/job_model/api_trigger.go @@ -6,13 +6,15 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APITrigger Trigger defines what starts a pipeline run. +// // swagger:model apiTrigger type APITrigger struct { @@ -42,7 +44,6 @@ func (m *APITrigger) Validate(formats strfmt.Registry) error { } func (m *APITrigger) validateCronSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.CronSchedule) { // not required return nil } @@ -51,6 +52,8 @@ func (m *APITrigger) validateCronSchedule(formats strfmt.Registry) error { if err := m.CronSchedule.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cron_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cron_schedule") } return err } @@ -60,7 +63,6 @@ func (m *APITrigger) validateCronSchedule(formats strfmt.Registry) error { } func (m *APITrigger) validatePeriodicSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.PeriodicSchedule) { // not required return nil } @@ -69,6 +71,68 @@ func (m *APITrigger) validatePeriodicSchedule(formats strfmt.Registry) error { if err := m.PeriodicSchedule.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("periodic_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("periodic_schedule") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api trigger based on the context it is used +func (m *APITrigger) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCronSchedule(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePeriodicSchedule(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APITrigger) contextValidateCronSchedule(ctx context.Context, formats strfmt.Registry) error { + + if m.CronSchedule != nil { + + if swag.IsZero(m.CronSchedule) { // not required + return nil + } + + if err := m.CronSchedule.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cron_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cron_schedule") + } + return err + } + } + + return nil +} + +func (m *APITrigger) contextValidatePeriodicSchedule(ctx context.Context, formats strfmt.Registry) error { + + if m.PeriodicSchedule != nil { + + if swag.IsZero(m.PeriodicSchedule) { // not required + return nil + } + + if err := m.PeriodicSchedule.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("periodic_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("periodic_schedule") } return err } diff --git a/backend/api/v1beta1/go_http_client/job_model/gatewayruntime_error.go b/backend/api/v1beta1/go_http_client/job_model/gatewayruntime_error.go deleted file mode 100644 index 80a355e3b62..00000000000 --- a/backend/api/v1beta1/go_http_client/job_model/gatewayruntime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package job_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// GatewayruntimeError gatewayruntime error -// swagger:model gatewayruntimeError -type GatewayruntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this gatewayruntime error -func (m *GatewayruntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GatewayruntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GatewayruntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GatewayruntimeError) UnmarshalBinary(b []byte) error { - var res GatewayruntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1beta1/go_http_client/job_model/googlerpc_status.go b/backend/api/v1beta1/go_http_client/job_model/googlerpc_status.go new file mode 100644 index 00000000000..cbf9d31577e --- /dev/null +++ b/backend/api/v1beta1/go_http_client/job_model/googlerpc_status.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package job_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1beta1/go_http_client/job_model/job_mode.go b/backend/api/v1beta1/go_http_client/job_model/job_mode.go index bb24a144823..31602cee932 100644 --- a/backend/api/v1beta1/go_http_client/job_model/job_mode.go +++ b/backend/api/v1beta1/go_http_client/job_model/job_mode.go @@ -6,20 +6,30 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // JobMode Required input. // -// - DISABLED: The job won't schedule any run if disabled. +// - DISABLED: The job won't schedule any run if disabled. +// // swagger:model JobMode type JobMode string +func NewJobMode(value JobMode) *JobMode { + return &value +} + +// Pointer returns a pointer to a freshly-allocated JobMode. +func (m JobMode) Pointer() *JobMode { + return &m +} + const ( // JobModeUNKNOWNMODE captures enum value "UNKNOWN_MODE" @@ -46,7 +56,7 @@ func init() { } func (m JobMode) validateJobModeEnum(path, location string, value JobMode) error { - if err := validate.Enum(path, location, value, jobModeEnum); err != nil { + if err := validate.EnumCase(path, location, value, jobModeEnum, true); err != nil { return err } return nil @@ -66,3 +76,8 @@ func (m JobMode) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this job mode based on context it is used +func (m JobMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/job_model/pipeline_spec_runtime_config.go b/backend/api/v1beta1/go_http_client/job_model/pipeline_spec_runtime_config.go index 8cbbe7f42cf..e62b0764dc7 100644 --- a/backend/api/v1beta1/go_http_client/job_model/pipeline_spec_runtime_config.go +++ b/backend/api/v1beta1/go_http_client/job_model/pipeline_spec_runtime_config.go @@ -6,12 +6,14 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // PipelineSpecRuntimeConfig The runtime config of a PipelineSpec. +// // swagger:model PipelineSpecRuntimeConfig type PipelineSpecRuntimeConfig struct { @@ -31,6 +33,11 @@ func (m *PipelineSpecRuntimeConfig) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this pipeline spec runtime config based on context it is used +func (m *PipelineSpecRuntimeConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *PipelineSpecRuntimeConfig) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/job_model/protobuf_any.go b/backend/api/v1beta1/go_http_client/job_model/protobuf_any.go index d2c49ec0702..ebb8205429f 100644 --- a/backend/api/v1beta1/go_http_client/job_model/protobuf_any.go +++ b/backend/api/v1beta1/go_http_client/job_model/protobuf_any.go @@ -6,9 +6,10 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1beta1/go_http_client/job_model/protobuf_null_value.go b/backend/api/v1beta1/go_http_client/job_model/protobuf_null_value.go index c5f2c520a2b..b2ce74676bf 100644 --- a/backend/api/v1beta1/go_http_client/job_model/protobuf_null_value.go +++ b/backend/api/v1beta1/go_http_client/job_model/protobuf_null_value.go @@ -6,23 +6,33 @@ package job_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // ProtobufNullValue `NullValue` is a singleton enumeration to represent the null value for the // `Value` type union. // -// The JSON representation for `NullValue` is JSON `null`. +// The JSON representation for `NullValue` is JSON `null`. +// +// - NULL_VALUE: Null value. // -// - NULL_VALUE: Null value. // swagger:model protobufNullValue type ProtobufNullValue string +func NewProtobufNullValue(value ProtobufNullValue) *ProtobufNullValue { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ProtobufNullValue. +func (m ProtobufNullValue) Pointer() *ProtobufNullValue { + return &m +} + const ( // ProtobufNullValueNULLVALUE captures enum value "NULL_VALUE" @@ -43,7 +53,7 @@ func init() { } func (m ProtobufNullValue) validateProtobufNullValueEnum(path, location string, value ProtobufNullValue) error { - if err := validate.Enum(path, location, value, protobufNullValueEnum); err != nil { + if err := validate.EnumCase(path, location, value, protobufNullValueEnum, true); err != nil { return err } return nil @@ -63,3 +73,8 @@ func (m ProtobufNullValue) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this protobuf null value based on context it is used +func (m ProtobufNullValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_client.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_client.go index 608585517d1..65dce2a6a14 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_client.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_client.go @@ -8,8 +8,7 @@ package pipeline_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Pipeline { cli := new(Pipeline) cli.Transport = transport - cli.PipelineService = pipeline_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Pipeline is a client for pipeline type Pipeline struct { - PipelineService *pipeline_service.Client + PipelineService pipeline_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Pipeline struct { // SetTransport changes the transport on the client and all its subresources func (c *Pipeline) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.PipelineService.SetTransport(transport) - } diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go index 105a522f6d8..308f8e3e4fc 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go @@ -7,15 +7,40 @@ package pipeline_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new pipeline service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new pipeline service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new pipeline service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for pipeline service API */ @@ -24,16 +49,47 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + PipelineServiceCreatePipelineV1(params *PipelineServiceCreatePipelineV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineV1OK, error) + + PipelineServiceCreatePipelineVersionV1(params *PipelineServiceCreatePipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineVersionV1OK, error) + + PipelineServiceDeletePipelineV1(params *PipelineServiceDeletePipelineV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineV1OK, error) + + PipelineServiceDeletePipelineVersionV1(params *PipelineServiceDeletePipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineVersionV1OK, error) + + PipelineServiceGetPipelineByNameV1(params *PipelineServiceGetPipelineByNameV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineByNameV1OK, error) + + PipelineServiceGetPipelineV1(params *PipelineServiceGetPipelineV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineV1OK, error) + + PipelineServiceGetPipelineVersionTemplate(params *PipelineServiceGetPipelineVersionTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionTemplateOK, error) + + PipelineServiceGetPipelineVersionV1(params *PipelineServiceGetPipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionV1OK, error) + + PipelineServiceGetTemplate(params *PipelineServiceGetTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetTemplateOK, error) + + PipelineServiceListPipelineVersionsV1(params *PipelineServiceListPipelineVersionsV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelineVersionsV1OK, error) + + PipelineServiceListPipelinesV1(params *PipelineServiceListPipelinesV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelinesV1OK, error) + + PipelineServiceUpdatePipelineDefaultVersionV1(params *PipelineServiceUpdatePipelineDefaultVersionV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceUpdatePipelineDefaultVersionV1OK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* PipelineServiceCreatePipelineV1 creates a pipeline */ -func (a *Client) PipelineServiceCreatePipelineV1(params *PipelineServiceCreatePipelineV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceCreatePipelineV1OK, error) { +func (a *Client) PipelineServiceCreatePipelineV1(params *PipelineServiceCreatePipelineV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceCreatePipelineV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_CreatePipelineV1", Method: "POST", PathPattern: "/apis/v1beta1/pipelines", @@ -45,24 +101,33 @@ func (a *Client) PipelineServiceCreatePipelineV1(params *PipelineServiceCreatePi AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceCreatePipelineV1OK), nil - + success, ok := result.(*PipelineServiceCreatePipelineV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceCreatePipelineV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceCreatePipelineVersionV1 adds a pipeline version to the specified pipeline */ -func (a *Client) PipelineServiceCreatePipelineVersionV1(params *PipelineServiceCreatePipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceCreatePipelineVersionV1OK, error) { +func (a *Client) PipelineServiceCreatePipelineVersionV1(params *PipelineServiceCreatePipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineVersionV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceCreatePipelineVersionV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_CreatePipelineVersionV1", Method: "POST", PathPattern: "/apis/v1beta1/pipeline_versions", @@ -74,24 +139,33 @@ func (a *Client) PipelineServiceCreatePipelineVersionV1(params *PipelineServiceC AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceCreatePipelineVersionV1OK), nil - + success, ok := result.(*PipelineServiceCreatePipelineVersionV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceCreatePipelineVersionV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceDeletePipelineV1 deletes a pipeline and its pipeline versions */ -func (a *Client) PipelineServiceDeletePipelineV1(params *PipelineServiceDeletePipelineV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceDeletePipelineV1OK, error) { +func (a *Client) PipelineServiceDeletePipelineV1(params *PipelineServiceDeletePipelineV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceDeletePipelineV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_DeletePipelineV1", Method: "DELETE", PathPattern: "/apis/v1beta1/pipelines/{id}", @@ -103,24 +177,33 @@ func (a *Client) PipelineServiceDeletePipelineV1(params *PipelineServiceDeletePi AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceDeletePipelineV1OK), nil - + success, ok := result.(*PipelineServiceDeletePipelineV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceDeletePipelineV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceDeletePipelineVersionV1 deletes a pipeline version by pipeline version ID if the deleted pipeline version is the default pipeline version the pipeline s default version changes to the pipeline s most recent pipeline version if there are no remaining pipeline versions the pipeline will have no default version examines the run service api ipynb notebook to learn more about creating a run using a pipeline version https github com kubeflow pipelines blob master tools benchmarks run service api ipynb */ -func (a *Client) PipelineServiceDeletePipelineVersionV1(params *PipelineServiceDeletePipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceDeletePipelineVersionV1OK, error) { +func (a *Client) PipelineServiceDeletePipelineVersionV1(params *PipelineServiceDeletePipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineVersionV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceDeletePipelineVersionV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_DeletePipelineVersionV1", Method: "DELETE", PathPattern: "/apis/v1beta1/pipeline_versions/{version_id}", @@ -132,24 +215,33 @@ func (a *Client) PipelineServiceDeletePipelineVersionV1(params *PipelineServiceD AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceDeletePipelineVersionV1OK), nil - + success, ok := result.(*PipelineServiceDeletePipelineVersionV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceDeletePipelineVersionV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceGetPipelineByNameV1 finds a pipeline by name and namespace */ -func (a *Client) PipelineServiceGetPipelineByNameV1(params *PipelineServiceGetPipelineByNameV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceGetPipelineByNameV1OK, error) { +func (a *Client) PipelineServiceGetPipelineByNameV1(params *PipelineServiceGetPipelineByNameV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineByNameV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceGetPipelineByNameV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_GetPipelineByNameV1", Method: "GET", PathPattern: "/apis/v1beta1/namespaces/{namespace}/pipelines/{name}", @@ -161,24 +253,33 @@ func (a *Client) PipelineServiceGetPipelineByNameV1(params *PipelineServiceGetPi AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceGetPipelineByNameV1OK), nil - + success, ok := result.(*PipelineServiceGetPipelineByNameV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineByNameV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceGetPipelineV1 finds a specific pipeline by ID */ -func (a *Client) PipelineServiceGetPipelineV1(params *PipelineServiceGetPipelineV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceGetPipelineV1OK, error) { +func (a *Client) PipelineServiceGetPipelineV1(params *PipelineServiceGetPipelineV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceGetPipelineV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_GetPipelineV1", Method: "GET", PathPattern: "/apis/v1beta1/pipelines/{id}", @@ -190,24 +291,33 @@ func (a *Client) PipelineServiceGetPipelineV1(params *PipelineServiceGetPipeline AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceGetPipelineV1OK), nil - + success, ok := result.(*PipelineServiceGetPipelineV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceGetPipelineVersionTemplate returns a y a m l template that contains the specified pipeline version s description parameters and metadata */ -func (a *Client) PipelineServiceGetPipelineVersionTemplate(params *PipelineServiceGetPipelineVersionTemplateParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceGetPipelineVersionTemplateOK, error) { +func (a *Client) PipelineServiceGetPipelineVersionTemplate(params *PipelineServiceGetPipelineVersionTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionTemplateOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceGetPipelineVersionTemplateParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_GetPipelineVersionTemplate", Method: "GET", PathPattern: "/apis/v1beta1/pipeline_versions/{version_id}/templates", @@ -219,24 +329,33 @@ func (a *Client) PipelineServiceGetPipelineVersionTemplate(params *PipelineServi AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceGetPipelineVersionTemplateOK), nil - + success, ok := result.(*PipelineServiceGetPipelineVersionTemplateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineVersionTemplateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceGetPipelineVersionV1 gets a pipeline version by pipeline version ID */ -func (a *Client) PipelineServiceGetPipelineVersionV1(params *PipelineServiceGetPipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceGetPipelineVersionV1OK, error) { +func (a *Client) PipelineServiceGetPipelineVersionV1(params *PipelineServiceGetPipelineVersionV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceGetPipelineVersionV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_GetPipelineVersionV1", Method: "GET", PathPattern: "/apis/v1beta1/pipeline_versions/{version_id}", @@ -248,24 +367,33 @@ func (a *Client) PipelineServiceGetPipelineVersionV1(params *PipelineServiceGetP AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceGetPipelineVersionV1OK), nil - + success, ok := result.(*PipelineServiceGetPipelineVersionV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineVersionV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceGetTemplate returns a single y a m l template that contains the description parameters and metadata associated with the pipeline provided */ -func (a *Client) PipelineServiceGetTemplate(params *PipelineServiceGetTemplateParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceGetTemplateOK, error) { +func (a *Client) PipelineServiceGetTemplate(params *PipelineServiceGetTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetTemplateOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceGetTemplateParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_GetTemplate", Method: "GET", PathPattern: "/apis/v1beta1/pipelines/{id}/templates", @@ -277,24 +405,33 @@ func (a *Client) PipelineServiceGetTemplate(params *PipelineServiceGetTemplatePa AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceGetTemplateOK), nil - + success, ok := result.(*PipelineServiceGetTemplateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetTemplateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceListPipelineVersionsV1 lists all pipeline versions of a given pipeline */ -func (a *Client) PipelineServiceListPipelineVersionsV1(params *PipelineServiceListPipelineVersionsV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceListPipelineVersionsV1OK, error) { +func (a *Client) PipelineServiceListPipelineVersionsV1(params *PipelineServiceListPipelineVersionsV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelineVersionsV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceListPipelineVersionsV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_ListPipelineVersionsV1", Method: "GET", PathPattern: "/apis/v1beta1/pipeline_versions", @@ -306,24 +443,33 @@ func (a *Client) PipelineServiceListPipelineVersionsV1(params *PipelineServiceLi AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceListPipelineVersionsV1OK), nil - + success, ok := result.(*PipelineServiceListPipelineVersionsV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceListPipelineVersionsV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceListPipelinesV1 finds all pipelines */ -func (a *Client) PipelineServiceListPipelinesV1(params *PipelineServiceListPipelinesV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceListPipelinesV1OK, error) { +func (a *Client) PipelineServiceListPipelinesV1(params *PipelineServiceListPipelinesV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelinesV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceListPipelinesV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_ListPipelinesV1", Method: "GET", PathPattern: "/apis/v1beta1/pipelines", @@ -335,24 +481,33 @@ func (a *Client) PipelineServiceListPipelinesV1(params *PipelineServiceListPipel AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceListPipelinesV1OK), nil - + success, ok := result.(*PipelineServiceListPipelinesV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceListPipelinesV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceUpdatePipelineDefaultVersionV1 updates the default pipeline version of a specific pipeline */ -func (a *Client) PipelineServiceUpdatePipelineDefaultVersionV1(params *PipelineServiceUpdatePipelineDefaultVersionV1Params, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceUpdatePipelineDefaultVersionV1OK, error) { +func (a *Client) PipelineServiceUpdatePipelineDefaultVersionV1(params *PipelineServiceUpdatePipelineDefaultVersionV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceUpdatePipelineDefaultVersionV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceUpdatePipelineDefaultVersionV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_UpdatePipelineDefaultVersionV1", Method: "POST", PathPattern: "/apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}", @@ -364,12 +519,22 @@ func (a *Client) PipelineServiceUpdatePipelineDefaultVersionV1(params *PipelineS AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceUpdatePipelineDefaultVersionV1OK), nil - + success, ok := result.(*PipelineServiceUpdatePipelineDefaultVersionV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceUpdatePipelineDefaultVersionV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_v1_parameters.go index 5b1b9ef407d..51df4dd121c 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_v1_parameters.go @@ -13,64 +13,79 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) -// NewPipelineServiceCreatePipelineV1Params creates a new PipelineServiceCreatePipelineV1Params object -// with the default values initialized. +// NewPipelineServiceCreatePipelineV1Params creates a new PipelineServiceCreatePipelineV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceCreatePipelineV1Params() *PipelineServiceCreatePipelineV1Params { - var () return &PipelineServiceCreatePipelineV1Params{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceCreatePipelineV1ParamsWithTimeout creates a new PipelineServiceCreatePipelineV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceCreatePipelineV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineV1Params { - var () return &PipelineServiceCreatePipelineV1Params{ - timeout: timeout, } } // NewPipelineServiceCreatePipelineV1ParamsWithContext creates a new PipelineServiceCreatePipelineV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceCreatePipelineV1ParamsWithContext(ctx context.Context) *PipelineServiceCreatePipelineV1Params { - var () return &PipelineServiceCreatePipelineV1Params{ - Context: ctx, } } // NewPipelineServiceCreatePipelineV1ParamsWithHTTPClient creates a new PipelineServiceCreatePipelineV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceCreatePipelineV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineV1Params { - var () return &PipelineServiceCreatePipelineV1Params{ HTTPClient: client, } } -/*PipelineServiceCreatePipelineV1Params contains all the parameters to send to the API endpoint -for the pipeline service create pipeline v1 operation typically these are written to a http.Request +/* +PipelineServiceCreatePipelineV1Params contains all the parameters to send to the API endpoint + + for the pipeline service create pipeline v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceCreatePipelineV1Params struct { - /*Body*/ - Body *pipeline_model.APIPipeline + // Pipeline. + Pipeline *pipeline_model.APIPipeline timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service create pipeline v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineV1Params) WithDefaults() *PipelineServiceCreatePipelineV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service create pipeline v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service create pipeline v1 params func (o *PipelineServiceCreatePipelineV1Params) WithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineV1Params { o.SetTimeout(timeout) @@ -104,15 +119,15 @@ func (o *PipelineServiceCreatePipelineV1Params) SetHTTPClient(client *http.Clien o.HTTPClient = client } -// WithBody adds the body to the pipeline service create pipeline v1 params -func (o *PipelineServiceCreatePipelineV1Params) WithBody(body *pipeline_model.APIPipeline) *PipelineServiceCreatePipelineV1Params { - o.SetBody(body) +// WithPipeline adds the pipeline to the pipeline service create pipeline v1 params +func (o *PipelineServiceCreatePipelineV1Params) WithPipeline(pipeline *pipeline_model.APIPipeline) *PipelineServiceCreatePipelineV1Params { + o.SetPipeline(pipeline) return o } -// SetBody adds the body to the pipeline service create pipeline v1 params -func (o *PipelineServiceCreatePipelineV1Params) SetBody(body *pipeline_model.APIPipeline) { - o.Body = body +// SetPipeline adds the pipeline to the pipeline service create pipeline v1 params +func (o *PipelineServiceCreatePipelineV1Params) SetPipeline(pipeline *pipeline_model.APIPipeline) { + o.Pipeline = pipeline } // WriteToRequest writes these params to a swagger request @@ -122,9 +137,8 @@ func (o *PipelineServiceCreatePipelineV1Params) WriteToRequest(r runtime.ClientR return err } var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { + if o.Pipeline != nil { + if err := r.SetBodyParam(o.Pipeline); err != nil { return err } } diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_v1_responses.go index 9b5901f05c6..33375608a78 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceCreatePipelineV1Reader is a Reader for the PipelineServiceCreatePipelineV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceCreatePipelineV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceCreatePipelineV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceCreatePipelineV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceCreatePipelineV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceCreatePipelineV1OK() *PipelineServiceCreatePipelineV1OK { return &PipelineServiceCreatePipelineV1OK{} } -/*PipelineServiceCreatePipelineV1OK handles this case with default header values. +/* +PipelineServiceCreatePipelineV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceCreatePipelineV1OK struct { Payload *pipeline_model.APIPipeline } +// IsSuccess returns true when this pipeline service create pipeline v1 o k response has a 2xx status code +func (o *PipelineServiceCreatePipelineV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service create pipeline v1 o k response has a 3xx status code +func (o *PipelineServiceCreatePipelineV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service create pipeline v1 o k response has a 4xx status code +func (o *PipelineServiceCreatePipelineV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service create pipeline v1 o k response has a 5xx status code +func (o *PipelineServiceCreatePipelineV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service create pipeline v1 o k response a status code equal to that given +func (o *PipelineServiceCreatePipelineV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service create pipeline v1 o k response +func (o *PipelineServiceCreatePipelineV1OK) Code() int { + return 200 +} + func (o *PipelineServiceCreatePipelineV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipelines][%d] pipelineServiceCreatePipelineV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines][%d] pipelineServiceCreatePipelineV1OK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines][%d] pipelineServiceCreatePipelineV1OK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineV1OK) GetPayload() *pipeline_model.APIPipeline { + return o.Payload } func (o *PipelineServiceCreatePipelineV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceCreatePipelineV1Default(code int) *PipelineServiceCreateP } } -/*PipelineServiceCreatePipelineV1Default handles this case with default header values. +/* +PipelineServiceCreatePipelineV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceCreatePipelineV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service create pipeline v1 default response has a 2xx status code +func (o *PipelineServiceCreatePipelineV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service create pipeline v1 default response has a 3xx status code +func (o *PipelineServiceCreatePipelineV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service create pipeline v1 default response has a 4xx status code +func (o *PipelineServiceCreatePipelineV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service create pipeline v1 default response has a 5xx status code +func (o *PipelineServiceCreatePipelineV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service create pipeline v1 default response a status code equal to that given +func (o *PipelineServiceCreatePipelineV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service create pipeline v1 default response @@ -96,12 +161,22 @@ func (o *PipelineServiceCreatePipelineV1Default) Code() int { } func (o *PipelineServiceCreatePipelineV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipelines][%d] PipelineService_CreatePipelineV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines][%d] PipelineService_CreatePipelineV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines][%d] PipelineService_CreatePipelineV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceCreatePipelineV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_v1_parameters.go index 9cba6ffbf75..ade287ab113 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_v1_parameters.go @@ -13,68 +13,83 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) -// NewPipelineServiceCreatePipelineVersionV1Params creates a new PipelineServiceCreatePipelineVersionV1Params object -// with the default values initialized. +// NewPipelineServiceCreatePipelineVersionV1Params creates a new PipelineServiceCreatePipelineVersionV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceCreatePipelineVersionV1Params() *PipelineServiceCreatePipelineVersionV1Params { - var () return &PipelineServiceCreatePipelineVersionV1Params{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceCreatePipelineVersionV1ParamsWithTimeout creates a new PipelineServiceCreatePipelineVersionV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceCreatePipelineVersionV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineVersionV1Params { - var () return &PipelineServiceCreatePipelineVersionV1Params{ - timeout: timeout, } } // NewPipelineServiceCreatePipelineVersionV1ParamsWithContext creates a new PipelineServiceCreatePipelineVersionV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceCreatePipelineVersionV1ParamsWithContext(ctx context.Context) *PipelineServiceCreatePipelineVersionV1Params { - var () return &PipelineServiceCreatePipelineVersionV1Params{ - Context: ctx, } } // NewPipelineServiceCreatePipelineVersionV1ParamsWithHTTPClient creates a new PipelineServiceCreatePipelineVersionV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceCreatePipelineVersionV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineVersionV1Params { - var () return &PipelineServiceCreatePipelineVersionV1Params{ HTTPClient: client, } } -/*PipelineServiceCreatePipelineVersionV1Params contains all the parameters to send to the API endpoint -for the pipeline service create pipeline version v1 operation typically these are written to a http.Request +/* +PipelineServiceCreatePipelineVersionV1Params contains all the parameters to send to the API endpoint + + for the pipeline service create pipeline version v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceCreatePipelineVersionV1Params struct { - /*Body - ResourceReference inside PipelineVersion specifies the pipeline that this - version belongs to. + /* Version. + ResourceReference inside PipelineVersion specifies the pipeline that this + version belongs to. */ - Body *pipeline_model.APIPipelineVersion + Version *pipeline_model.APIPipelineVersion timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service create pipeline version v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineVersionV1Params) WithDefaults() *PipelineServiceCreatePipelineVersionV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service create pipeline version v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineVersionV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service create pipeline version v1 params func (o *PipelineServiceCreatePipelineVersionV1Params) WithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineVersionV1Params { o.SetTimeout(timeout) @@ -108,15 +123,15 @@ func (o *PipelineServiceCreatePipelineVersionV1Params) SetHTTPClient(client *htt o.HTTPClient = client } -// WithBody adds the body to the pipeline service create pipeline version v1 params -func (o *PipelineServiceCreatePipelineVersionV1Params) WithBody(body *pipeline_model.APIPipelineVersion) *PipelineServiceCreatePipelineVersionV1Params { - o.SetBody(body) +// WithVersion adds the version to the pipeline service create pipeline version v1 params +func (o *PipelineServiceCreatePipelineVersionV1Params) WithVersion(version *pipeline_model.APIPipelineVersion) *PipelineServiceCreatePipelineVersionV1Params { + o.SetVersion(version) return o } -// SetBody adds the body to the pipeline service create pipeline version v1 params -func (o *PipelineServiceCreatePipelineVersionV1Params) SetBody(body *pipeline_model.APIPipelineVersion) { - o.Body = body +// SetVersion adds the version to the pipeline service create pipeline version v1 params +func (o *PipelineServiceCreatePipelineVersionV1Params) SetVersion(version *pipeline_model.APIPipelineVersion) { + o.Version = version } // WriteToRequest writes these params to a swagger request @@ -126,9 +141,8 @@ func (o *PipelineServiceCreatePipelineVersionV1Params) WriteToRequest(r runtime. return err } var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { + if o.Version != nil { + if err := r.SetBodyParam(o.Version); err != nil { return err } } diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_v1_responses.go index fcf00e33037..571009a2fbb 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceCreatePipelineVersionV1Reader is a Reader for the PipelineServiceCreatePipelineVersionV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceCreatePipelineVersionV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceCreatePipelineVersionV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceCreatePipelineVersionV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceCreatePipelineVersionV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceCreatePipelineVersionV1OK() *PipelineServiceCreatePipelin return &PipelineServiceCreatePipelineVersionV1OK{} } -/*PipelineServiceCreatePipelineVersionV1OK handles this case with default header values. +/* +PipelineServiceCreatePipelineVersionV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceCreatePipelineVersionV1OK struct { Payload *pipeline_model.APIPipelineVersion } +// IsSuccess returns true when this pipeline service create pipeline version v1 o k response has a 2xx status code +func (o *PipelineServiceCreatePipelineVersionV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service create pipeline version v1 o k response has a 3xx status code +func (o *PipelineServiceCreatePipelineVersionV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service create pipeline version v1 o k response has a 4xx status code +func (o *PipelineServiceCreatePipelineVersionV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service create pipeline version v1 o k response has a 5xx status code +func (o *PipelineServiceCreatePipelineVersionV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service create pipeline version v1 o k response a status code equal to that given +func (o *PipelineServiceCreatePipelineVersionV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service create pipeline version v1 o k response +func (o *PipelineServiceCreatePipelineVersionV1OK) Code() int { + return 200 +} + func (o *PipelineServiceCreatePipelineVersionV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipeline_versions][%d] pipelineServiceCreatePipelineVersionV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipeline_versions][%d] pipelineServiceCreatePipelineVersionV1OK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineVersionV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipeline_versions][%d] pipelineServiceCreatePipelineVersionV1OK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineVersionV1OK) GetPayload() *pipeline_model.APIPipelineVersion { + return o.Payload } func (o *PipelineServiceCreatePipelineVersionV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceCreatePipelineVersionV1Default(code int) *PipelineService } } -/*PipelineServiceCreatePipelineVersionV1Default handles this case with default header values. +/* +PipelineServiceCreatePipelineVersionV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceCreatePipelineVersionV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service create pipeline version v1 default response has a 2xx status code +func (o *PipelineServiceCreatePipelineVersionV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service create pipeline version v1 default response has a 3xx status code +func (o *PipelineServiceCreatePipelineVersionV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service create pipeline version v1 default response has a 4xx status code +func (o *PipelineServiceCreatePipelineVersionV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service create pipeline version v1 default response has a 5xx status code +func (o *PipelineServiceCreatePipelineVersionV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service create pipeline version v1 default response a status code equal to that given +func (o *PipelineServiceCreatePipelineVersionV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service create pipeline version v1 default response @@ -96,12 +161,22 @@ func (o *PipelineServiceCreatePipelineVersionV1Default) Code() int { } func (o *PipelineServiceCreatePipelineVersionV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipeline_versions][%d] PipelineService_CreatePipelineVersionV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipeline_versions][%d] PipelineService_CreatePipelineVersionV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineVersionV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipeline_versions][%d] PipelineService_CreatePipelineVersionV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineVersionV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceCreatePipelineVersionV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_v1_parameters.go index b568eda529c..e6aec22fb4c 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceDeletePipelineV1Params creates a new PipelineServiceDeletePipelineV1Params object -// with the default values initialized. +// NewPipelineServiceDeletePipelineV1Params creates a new PipelineServiceDeletePipelineV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceDeletePipelineV1Params() *PipelineServiceDeletePipelineV1Params { - var () return &PipelineServiceDeletePipelineV1Params{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceDeletePipelineV1ParamsWithTimeout creates a new PipelineServiceDeletePipelineV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceDeletePipelineV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineV1Params { - var () return &PipelineServiceDeletePipelineV1Params{ - timeout: timeout, } } // NewPipelineServiceDeletePipelineV1ParamsWithContext creates a new PipelineServiceDeletePipelineV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceDeletePipelineV1ParamsWithContext(ctx context.Context) *PipelineServiceDeletePipelineV1Params { - var () return &PipelineServiceDeletePipelineV1Params{ - Context: ctx, } } // NewPipelineServiceDeletePipelineV1ParamsWithHTTPClient creates a new PipelineServiceDeletePipelineV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceDeletePipelineV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceDeletePipelineV1Params { - var () return &PipelineServiceDeletePipelineV1Params{ HTTPClient: client, } } -/*PipelineServiceDeletePipelineV1Params contains all the parameters to send to the API endpoint -for the pipeline service delete pipeline v1 operation typically these are written to a http.Request +/* +PipelineServiceDeletePipelineV1Params contains all the parameters to send to the API endpoint + + for the pipeline service delete pipeline v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceDeletePipelineV1Params struct { - /*ID - The ID of the pipeline to be deleted. + /* ID. + The ID of the pipeline to be deleted. */ ID string @@ -72,6 +72,21 @@ type PipelineServiceDeletePipelineV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service delete pipeline v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineV1Params) WithDefaults() *PipelineServiceDeletePipelineV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service delete pipeline v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service delete pipeline v1 params func (o *PipelineServiceDeletePipelineV1Params) WithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_v1_responses.go index 43624f78e20..15b9e072946 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceDeletePipelineV1Reader is a Reader for the PipelineServiceDeletePipelineV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceDeletePipelineV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceDeletePipelineV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceDeletePipelineV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceDeletePipelineV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceDeletePipelineV1OK() *PipelineServiceDeletePipelineV1OK { return &PipelineServiceDeletePipelineV1OK{} } -/*PipelineServiceDeletePipelineV1OK handles this case with default header values. +/* +PipelineServiceDeletePipelineV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceDeletePipelineV1OK struct { Payload interface{} } +// IsSuccess returns true when this pipeline service delete pipeline v1 o k response has a 2xx status code +func (o *PipelineServiceDeletePipelineV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service delete pipeline v1 o k response has a 3xx status code +func (o *PipelineServiceDeletePipelineV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service delete pipeline v1 o k response has a 4xx status code +func (o *PipelineServiceDeletePipelineV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service delete pipeline v1 o k response has a 5xx status code +func (o *PipelineServiceDeletePipelineV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service delete pipeline v1 o k response a status code equal to that given +func (o *PipelineServiceDeletePipelineV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service delete pipeline v1 o k response +func (o *PipelineServiceDeletePipelineV1OK) Code() int { + return 200 +} + func (o *PipelineServiceDeletePipelineV1OK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/pipelines/{id}][%d] pipelineServiceDeletePipelineV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/pipelines/{id}][%d] pipelineServiceDeletePipelineV1OK %s", 200, payload) +} + +func (o *PipelineServiceDeletePipelineV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/pipelines/{id}][%d] pipelineServiceDeletePipelineV1OK %s", 200, payload) +} + +func (o *PipelineServiceDeletePipelineV1OK) GetPayload() interface{} { + return o.Payload } func (o *PipelineServiceDeletePipelineV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewPipelineServiceDeletePipelineV1Default(code int) *PipelineServiceDeleteP } } -/*PipelineServiceDeletePipelineV1Default handles this case with default header values. +/* +PipelineServiceDeletePipelineV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceDeletePipelineV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service delete pipeline v1 default response has a 2xx status code +func (o *PipelineServiceDeletePipelineV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service delete pipeline v1 default response has a 3xx status code +func (o *PipelineServiceDeletePipelineV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service delete pipeline v1 default response has a 4xx status code +func (o *PipelineServiceDeletePipelineV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service delete pipeline v1 default response has a 5xx status code +func (o *PipelineServiceDeletePipelineV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service delete pipeline v1 default response a status code equal to that given +func (o *PipelineServiceDeletePipelineV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service delete pipeline v1 default response @@ -94,12 +159,22 @@ func (o *PipelineServiceDeletePipelineV1Default) Code() int { } func (o *PipelineServiceDeletePipelineV1Default) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/pipelines/{id}][%d] PipelineService_DeletePipelineV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/pipelines/{id}][%d] PipelineService_DeletePipelineV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceDeletePipelineV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/pipelines/{id}][%d] PipelineService_DeletePipelineV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceDeletePipelineV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceDeletePipelineV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_v1_parameters.go index 985ff77c5fe..65ef10a2563 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceDeletePipelineVersionV1Params creates a new PipelineServiceDeletePipelineVersionV1Params object -// with the default values initialized. +// NewPipelineServiceDeletePipelineVersionV1Params creates a new PipelineServiceDeletePipelineVersionV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceDeletePipelineVersionV1Params() *PipelineServiceDeletePipelineVersionV1Params { - var () return &PipelineServiceDeletePipelineVersionV1Params{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceDeletePipelineVersionV1ParamsWithTimeout creates a new PipelineServiceDeletePipelineVersionV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceDeletePipelineVersionV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineVersionV1Params { - var () return &PipelineServiceDeletePipelineVersionV1Params{ - timeout: timeout, } } // NewPipelineServiceDeletePipelineVersionV1ParamsWithContext creates a new PipelineServiceDeletePipelineVersionV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceDeletePipelineVersionV1ParamsWithContext(ctx context.Context) *PipelineServiceDeletePipelineVersionV1Params { - var () return &PipelineServiceDeletePipelineVersionV1Params{ - Context: ctx, } } // NewPipelineServiceDeletePipelineVersionV1ParamsWithHTTPClient creates a new PipelineServiceDeletePipelineVersionV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceDeletePipelineVersionV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceDeletePipelineVersionV1Params { - var () return &PipelineServiceDeletePipelineVersionV1Params{ HTTPClient: client, } } -/*PipelineServiceDeletePipelineVersionV1Params contains all the parameters to send to the API endpoint -for the pipeline service delete pipeline version v1 operation typically these are written to a http.Request +/* +PipelineServiceDeletePipelineVersionV1Params contains all the parameters to send to the API endpoint + + for the pipeline service delete pipeline version v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceDeletePipelineVersionV1Params struct { - /*VersionID - The ID of the pipeline version to be deleted. + /* VersionID. + The ID of the pipeline version to be deleted. */ VersionID string @@ -72,6 +72,21 @@ type PipelineServiceDeletePipelineVersionV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service delete pipeline version v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineVersionV1Params) WithDefaults() *PipelineServiceDeletePipelineVersionV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service delete pipeline version v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineVersionV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service delete pipeline version v1 params func (o *PipelineServiceDeletePipelineVersionV1Params) WithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineVersionV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_v1_responses.go index 941f8ad9420..32f4ead486b 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceDeletePipelineVersionV1Reader is a Reader for the PipelineServiceDeletePipelineVersionV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceDeletePipelineVersionV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceDeletePipelineVersionV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceDeletePipelineVersionV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceDeletePipelineVersionV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceDeletePipelineVersionV1OK() *PipelineServiceDeletePipelin return &PipelineServiceDeletePipelineVersionV1OK{} } -/*PipelineServiceDeletePipelineVersionV1OK handles this case with default header values. +/* +PipelineServiceDeletePipelineVersionV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceDeletePipelineVersionV1OK struct { Payload interface{} } +// IsSuccess returns true when this pipeline service delete pipeline version v1 o k response has a 2xx status code +func (o *PipelineServiceDeletePipelineVersionV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service delete pipeline version v1 o k response has a 3xx status code +func (o *PipelineServiceDeletePipelineVersionV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service delete pipeline version v1 o k response has a 4xx status code +func (o *PipelineServiceDeletePipelineVersionV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service delete pipeline version v1 o k response has a 5xx status code +func (o *PipelineServiceDeletePipelineVersionV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service delete pipeline version v1 o k response a status code equal to that given +func (o *PipelineServiceDeletePipelineVersionV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service delete pipeline version v1 o k response +func (o *PipelineServiceDeletePipelineVersionV1OK) Code() int { + return 200 +} + func (o *PipelineServiceDeletePipelineVersionV1OK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/pipeline_versions/{version_id}][%d] pipelineServiceDeletePipelineVersionV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/pipeline_versions/{version_id}][%d] pipelineServiceDeletePipelineVersionV1OK %s", 200, payload) +} + +func (o *PipelineServiceDeletePipelineVersionV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/pipeline_versions/{version_id}][%d] pipelineServiceDeletePipelineVersionV1OK %s", 200, payload) +} + +func (o *PipelineServiceDeletePipelineVersionV1OK) GetPayload() interface{} { + return o.Payload } func (o *PipelineServiceDeletePipelineVersionV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewPipelineServiceDeletePipelineVersionV1Default(code int) *PipelineService } } -/*PipelineServiceDeletePipelineVersionV1Default handles this case with default header values. +/* +PipelineServiceDeletePipelineVersionV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceDeletePipelineVersionV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service delete pipeline version v1 default response has a 2xx status code +func (o *PipelineServiceDeletePipelineVersionV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service delete pipeline version v1 default response has a 3xx status code +func (o *PipelineServiceDeletePipelineVersionV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service delete pipeline version v1 default response has a 4xx status code +func (o *PipelineServiceDeletePipelineVersionV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service delete pipeline version v1 default response has a 5xx status code +func (o *PipelineServiceDeletePipelineVersionV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service delete pipeline version v1 default response a status code equal to that given +func (o *PipelineServiceDeletePipelineVersionV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service delete pipeline version v1 default response @@ -94,12 +159,22 @@ func (o *PipelineServiceDeletePipelineVersionV1Default) Code() int { } func (o *PipelineServiceDeletePipelineVersionV1Default) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/pipeline_versions/{version_id}][%d] PipelineService_DeletePipelineVersionV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/pipeline_versions/{version_id}][%d] PipelineService_DeletePipelineVersionV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceDeletePipelineVersionV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/pipeline_versions/{version_id}][%d] PipelineService_DeletePipelineVersionV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceDeletePipelineVersionV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceDeletePipelineVersionV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_v1_parameters.go index 7e44ccc295c..316b2d14375 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_v1_parameters.go @@ -13,65 +13,66 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceGetPipelineByNameV1Params creates a new PipelineServiceGetPipelineByNameV1Params object -// with the default values initialized. +// NewPipelineServiceGetPipelineByNameV1Params creates a new PipelineServiceGetPipelineByNameV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceGetPipelineByNameV1Params() *PipelineServiceGetPipelineByNameV1Params { - var () return &PipelineServiceGetPipelineByNameV1Params{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceGetPipelineByNameV1ParamsWithTimeout creates a new PipelineServiceGetPipelineByNameV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceGetPipelineByNameV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineByNameV1Params { - var () return &PipelineServiceGetPipelineByNameV1Params{ - timeout: timeout, } } // NewPipelineServiceGetPipelineByNameV1ParamsWithContext creates a new PipelineServiceGetPipelineByNameV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceGetPipelineByNameV1ParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineByNameV1Params { - var () return &PipelineServiceGetPipelineByNameV1Params{ - Context: ctx, } } // NewPipelineServiceGetPipelineByNameV1ParamsWithHTTPClient creates a new PipelineServiceGetPipelineByNameV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceGetPipelineByNameV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineByNameV1Params { - var () return &PipelineServiceGetPipelineByNameV1Params{ HTTPClient: client, } } -/*PipelineServiceGetPipelineByNameV1Params contains all the parameters to send to the API endpoint -for the pipeline service get pipeline by name v1 operation typically these are written to a http.Request +/* +PipelineServiceGetPipelineByNameV1Params contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline by name v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceGetPipelineByNameV1Params struct { - /*Name - The Name of the pipeline to be retrieved. + /* Name. + The Name of the pipeline to be retrieved. */ Name string - /*Namespace - The Namespace the pipeline belongs to. + + /* Namespace. + + The Namespace the pipeline belongs to. In the case of shared pipelines and KFPipeline standalone installation, the pipeline name is the only needed field for unique resource lookup (namespace is not required). In those case, please provide hyphen (dash character, "-"). - */ Namespace string @@ -80,6 +81,21 @@ type PipelineServiceGetPipelineByNameV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service get pipeline by name v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineByNameV1Params) WithDefaults() *PipelineServiceGetPipelineByNameV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline by name v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineByNameV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service get pipeline by name v1 params func (o *PipelineServiceGetPipelineByNameV1Params) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineByNameV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_v1_responses.go index b7bed7c899e..36f3420b630 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceGetPipelineByNameV1Reader is a Reader for the PipelineServiceGetPipelineByNameV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceGetPipelineByNameV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceGetPipelineByNameV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceGetPipelineByNameV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceGetPipelineByNameV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceGetPipelineByNameV1OK() *PipelineServiceGetPipelineByName return &PipelineServiceGetPipelineByNameV1OK{} } -/*PipelineServiceGetPipelineByNameV1OK handles this case with default header values. +/* +PipelineServiceGetPipelineByNameV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceGetPipelineByNameV1OK struct { Payload *pipeline_model.APIPipeline } +// IsSuccess returns true when this pipeline service get pipeline by name v1 o k response has a 2xx status code +func (o *PipelineServiceGetPipelineByNameV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline by name v1 o k response has a 3xx status code +func (o *PipelineServiceGetPipelineByNameV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline by name v1 o k response has a 4xx status code +func (o *PipelineServiceGetPipelineByNameV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline by name v1 o k response has a 5xx status code +func (o *PipelineServiceGetPipelineByNameV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline by name v1 o k response a status code equal to that given +func (o *PipelineServiceGetPipelineByNameV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline by name v1 o k response +func (o *PipelineServiceGetPipelineByNameV1OK) Code() int { + return 200 +} + func (o *PipelineServiceGetPipelineByNameV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/namespaces/{namespace}/pipelines/{name}][%d] pipelineServiceGetPipelineByNameV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/namespaces/{namespace}/pipelines/{name}][%d] pipelineServiceGetPipelineByNameV1OK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineByNameV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/namespaces/{namespace}/pipelines/{name}][%d] pipelineServiceGetPipelineByNameV1OK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineByNameV1OK) GetPayload() *pipeline_model.APIPipeline { + return o.Payload } func (o *PipelineServiceGetPipelineByNameV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceGetPipelineByNameV1Default(code int) *PipelineServiceGetP } } -/*PipelineServiceGetPipelineByNameV1Default handles this case with default header values. +/* +PipelineServiceGetPipelineByNameV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceGetPipelineByNameV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline by name v1 default response has a 2xx status code +func (o *PipelineServiceGetPipelineByNameV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline by name v1 default response has a 3xx status code +func (o *PipelineServiceGetPipelineByNameV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline by name v1 default response has a 4xx status code +func (o *PipelineServiceGetPipelineByNameV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline by name v1 default response has a 5xx status code +func (o *PipelineServiceGetPipelineByNameV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline by name v1 default response a status code equal to that given +func (o *PipelineServiceGetPipelineByNameV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service get pipeline by name v1 default response @@ -96,12 +161,22 @@ func (o *PipelineServiceGetPipelineByNameV1Default) Code() int { } func (o *PipelineServiceGetPipelineByNameV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/namespaces/{namespace}/pipelines/{name}][%d] PipelineService_GetPipelineByNameV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/namespaces/{namespace}/pipelines/{name}][%d] PipelineService_GetPipelineByNameV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineByNameV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/namespaces/{namespace}/pipelines/{name}][%d] PipelineService_GetPipelineByNameV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineByNameV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceGetPipelineByNameV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_v1_parameters.go index 8f2d9313336..5db0e9cf5d9 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceGetPipelineV1Params creates a new PipelineServiceGetPipelineV1Params object -// with the default values initialized. +// NewPipelineServiceGetPipelineV1Params creates a new PipelineServiceGetPipelineV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceGetPipelineV1Params() *PipelineServiceGetPipelineV1Params { - var () return &PipelineServiceGetPipelineV1Params{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceGetPipelineV1ParamsWithTimeout creates a new PipelineServiceGetPipelineV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceGetPipelineV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineV1Params { - var () return &PipelineServiceGetPipelineV1Params{ - timeout: timeout, } } // NewPipelineServiceGetPipelineV1ParamsWithContext creates a new PipelineServiceGetPipelineV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceGetPipelineV1ParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineV1Params { - var () return &PipelineServiceGetPipelineV1Params{ - Context: ctx, } } // NewPipelineServiceGetPipelineV1ParamsWithHTTPClient creates a new PipelineServiceGetPipelineV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceGetPipelineV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineV1Params { - var () return &PipelineServiceGetPipelineV1Params{ HTTPClient: client, } } -/*PipelineServiceGetPipelineV1Params contains all the parameters to send to the API endpoint -for the pipeline service get pipeline v1 operation typically these are written to a http.Request +/* +PipelineServiceGetPipelineV1Params contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceGetPipelineV1Params struct { - /*ID - The ID of the pipeline to be retrieved. + /* ID. + The ID of the pipeline to be retrieved. */ ID string @@ -72,6 +72,21 @@ type PipelineServiceGetPipelineV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service get pipeline v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineV1Params) WithDefaults() *PipelineServiceGetPipelineV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service get pipeline v1 params func (o *PipelineServiceGetPipelineV1Params) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_v1_responses.go index 7596457b514..da3b09f4b1e 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceGetPipelineV1Reader is a Reader for the PipelineServiceGetPipelineV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceGetPipelineV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceGetPipelineV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceGetPipelineV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceGetPipelineV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceGetPipelineV1OK() *PipelineServiceGetPipelineV1OK { return &PipelineServiceGetPipelineV1OK{} } -/*PipelineServiceGetPipelineV1OK handles this case with default header values. +/* +PipelineServiceGetPipelineV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceGetPipelineV1OK struct { Payload *pipeline_model.APIPipeline } +// IsSuccess returns true when this pipeline service get pipeline v1 o k response has a 2xx status code +func (o *PipelineServiceGetPipelineV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline v1 o k response has a 3xx status code +func (o *PipelineServiceGetPipelineV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline v1 o k response has a 4xx status code +func (o *PipelineServiceGetPipelineV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline v1 o k response has a 5xx status code +func (o *PipelineServiceGetPipelineV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline v1 o k response a status code equal to that given +func (o *PipelineServiceGetPipelineV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline v1 o k response +func (o *PipelineServiceGetPipelineV1OK) Code() int { + return 200 +} + func (o *PipelineServiceGetPipelineV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}][%d] pipelineServiceGetPipelineV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}][%d] pipelineServiceGetPipelineV1OK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}][%d] pipelineServiceGetPipelineV1OK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineV1OK) GetPayload() *pipeline_model.APIPipeline { + return o.Payload } func (o *PipelineServiceGetPipelineV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceGetPipelineV1Default(code int) *PipelineServiceGetPipelin } } -/*PipelineServiceGetPipelineV1Default handles this case with default header values. +/* +PipelineServiceGetPipelineV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceGetPipelineV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline v1 default response has a 2xx status code +func (o *PipelineServiceGetPipelineV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline v1 default response has a 3xx status code +func (o *PipelineServiceGetPipelineV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline v1 default response has a 4xx status code +func (o *PipelineServiceGetPipelineV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline v1 default response has a 5xx status code +func (o *PipelineServiceGetPipelineV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline v1 default response a status code equal to that given +func (o *PipelineServiceGetPipelineV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service get pipeline v1 default response @@ -96,12 +161,22 @@ func (o *PipelineServiceGetPipelineV1Default) Code() int { } func (o *PipelineServiceGetPipelineV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}][%d] PipelineService_GetPipelineV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}][%d] PipelineService_GetPipelineV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}][%d] PipelineService_GetPipelineV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceGetPipelineV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_parameters.go index 1e388d5d459..ad434eefd7c 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceGetPipelineVersionTemplateParams creates a new PipelineServiceGetPipelineVersionTemplateParams object -// with the default values initialized. +// NewPipelineServiceGetPipelineVersionTemplateParams creates a new PipelineServiceGetPipelineVersionTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceGetPipelineVersionTemplateParams() *PipelineServiceGetPipelineVersionTemplateParams { - var () return &PipelineServiceGetPipelineVersionTemplateParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceGetPipelineVersionTemplateParamsWithTimeout creates a new PipelineServiceGetPipelineVersionTemplateParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceGetPipelineVersionTemplateParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionTemplateParams { - var () return &PipelineServiceGetPipelineVersionTemplateParams{ - timeout: timeout, } } // NewPipelineServiceGetPipelineVersionTemplateParamsWithContext creates a new PipelineServiceGetPipelineVersionTemplateParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceGetPipelineVersionTemplateParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineVersionTemplateParams { - var () return &PipelineServiceGetPipelineVersionTemplateParams{ - Context: ctx, } } // NewPipelineServiceGetPipelineVersionTemplateParamsWithHTTPClient creates a new PipelineServiceGetPipelineVersionTemplateParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceGetPipelineVersionTemplateParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineVersionTemplateParams { - var () return &PipelineServiceGetPipelineVersionTemplateParams{ HTTPClient: client, } } -/*PipelineServiceGetPipelineVersionTemplateParams contains all the parameters to send to the API endpoint -for the pipeline service get pipeline version template operation typically these are written to a http.Request +/* +PipelineServiceGetPipelineVersionTemplateParams contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline version template operation. + + Typically these are written to a http.Request. */ type PipelineServiceGetPipelineVersionTemplateParams struct { - /*VersionID - The ID of the pipeline version whose template is to be retrieved. + /* VersionID. + The ID of the pipeline version whose template is to be retrieved. */ VersionID string @@ -72,6 +72,21 @@ type PipelineServiceGetPipelineVersionTemplateParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service get pipeline version template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionTemplateParams) WithDefaults() *PipelineServiceGetPipelineVersionTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline version template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service get pipeline version template params func (o *PipelineServiceGetPipelineVersionTemplateParams) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionTemplateParams { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_responses.go index 164b7378eac..1f2a631417a 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_template_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceGetPipelineVersionTemplateReader is a Reader for the PipelineServiceGetPipelineVersionTemplate structure. @@ -24,14 +24,12 @@ type PipelineServiceGetPipelineVersionTemplateReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceGetPipelineVersionTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceGetPipelineVersionTemplateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceGetPipelineVersionTemplateDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceGetPipelineVersionTemplateOK() *PipelineServiceGetPipelin return &PipelineServiceGetPipelineVersionTemplateOK{} } -/*PipelineServiceGetPipelineVersionTemplateOK handles this case with default header values. +/* +PipelineServiceGetPipelineVersionTemplateOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceGetPipelineVersionTemplateOK struct { Payload *pipeline_model.APIGetTemplateResponse } +// IsSuccess returns true when this pipeline service get pipeline version template o k response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline version template o k response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline version template o k response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline version template o k response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline version template o k response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionTemplateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline version template o k response +func (o *PipelineServiceGetPipelineVersionTemplateOK) Code() int { + return 200 +} + func (o *PipelineServiceGetPipelineVersionTemplateOK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}/templates][%d] pipelineServiceGetPipelineVersionTemplateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}/templates][%d] pipelineServiceGetPipelineVersionTemplateOK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineVersionTemplateOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}/templates][%d] pipelineServiceGetPipelineVersionTemplateOK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineVersionTemplateOK) GetPayload() *pipeline_model.APIGetTemplateResponse { + return o.Payload } func (o *PipelineServiceGetPipelineVersionTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceGetPipelineVersionTemplateDefault(code int) *PipelineServ } } -/*PipelineServiceGetPipelineVersionTemplateDefault handles this case with default header values. +/* +PipelineServiceGetPipelineVersionTemplateDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceGetPipelineVersionTemplateDefault struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline version template default response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline version template default response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline version template default response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline version template default response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline version template default response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionTemplateDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service get pipeline version template default response @@ -96,12 +161,22 @@ func (o *PipelineServiceGetPipelineVersionTemplateDefault) Code() int { } func (o *PipelineServiceGetPipelineVersionTemplateDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}/templates][%d] PipelineService_GetPipelineVersionTemplate default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}/templates][%d] PipelineService_GetPipelineVersionTemplate default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineVersionTemplateDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}/templates][%d] PipelineService_GetPipelineVersionTemplate default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineVersionTemplateDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceGetPipelineVersionTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_v1_parameters.go index 8267909c064..526af64a269 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceGetPipelineVersionV1Params creates a new PipelineServiceGetPipelineVersionV1Params object -// with the default values initialized. +// NewPipelineServiceGetPipelineVersionV1Params creates a new PipelineServiceGetPipelineVersionV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceGetPipelineVersionV1Params() *PipelineServiceGetPipelineVersionV1Params { - var () return &PipelineServiceGetPipelineVersionV1Params{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceGetPipelineVersionV1ParamsWithTimeout creates a new PipelineServiceGetPipelineVersionV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceGetPipelineVersionV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionV1Params { - var () return &PipelineServiceGetPipelineVersionV1Params{ - timeout: timeout, } } // NewPipelineServiceGetPipelineVersionV1ParamsWithContext creates a new PipelineServiceGetPipelineVersionV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceGetPipelineVersionV1ParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineVersionV1Params { - var () return &PipelineServiceGetPipelineVersionV1Params{ - Context: ctx, } } // NewPipelineServiceGetPipelineVersionV1ParamsWithHTTPClient creates a new PipelineServiceGetPipelineVersionV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceGetPipelineVersionV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineVersionV1Params { - var () return &PipelineServiceGetPipelineVersionV1Params{ HTTPClient: client, } } -/*PipelineServiceGetPipelineVersionV1Params contains all the parameters to send to the API endpoint -for the pipeline service get pipeline version v1 operation typically these are written to a http.Request +/* +PipelineServiceGetPipelineVersionV1Params contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline version v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceGetPipelineVersionV1Params struct { - /*VersionID - The ID of the pipeline version to be retrieved. + /* VersionID. + The ID of the pipeline version to be retrieved. */ VersionID string @@ -72,6 +72,21 @@ type PipelineServiceGetPipelineVersionV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service get pipeline version v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionV1Params) WithDefaults() *PipelineServiceGetPipelineVersionV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline version v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service get pipeline version v1 params func (o *PipelineServiceGetPipelineVersionV1Params) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_v1_responses.go index d2d963077ce..16801097449 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceGetPipelineVersionV1Reader is a Reader for the PipelineServiceGetPipelineVersionV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceGetPipelineVersionV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceGetPipelineVersionV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceGetPipelineVersionV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceGetPipelineVersionV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceGetPipelineVersionV1OK() *PipelineServiceGetPipelineVersi return &PipelineServiceGetPipelineVersionV1OK{} } -/*PipelineServiceGetPipelineVersionV1OK handles this case with default header values. +/* +PipelineServiceGetPipelineVersionV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceGetPipelineVersionV1OK struct { Payload *pipeline_model.APIPipelineVersion } +// IsSuccess returns true when this pipeline service get pipeline version v1 o k response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline version v1 o k response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline version v1 o k response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline version v1 o k response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline version v1 o k response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline version v1 o k response +func (o *PipelineServiceGetPipelineVersionV1OK) Code() int { + return 200 +} + func (o *PipelineServiceGetPipelineVersionV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}][%d] pipelineServiceGetPipelineVersionV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}][%d] pipelineServiceGetPipelineVersionV1OK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineVersionV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}][%d] pipelineServiceGetPipelineVersionV1OK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineVersionV1OK) GetPayload() *pipeline_model.APIPipelineVersion { + return o.Payload } func (o *PipelineServiceGetPipelineVersionV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceGetPipelineVersionV1Default(code int) *PipelineServiceGet } } -/*PipelineServiceGetPipelineVersionV1Default handles this case with default header values. +/* +PipelineServiceGetPipelineVersionV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceGetPipelineVersionV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline version v1 default response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline version v1 default response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline version v1 default response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline version v1 default response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline version v1 default response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service get pipeline version v1 default response @@ -96,12 +161,22 @@ func (o *PipelineServiceGetPipelineVersionV1Default) Code() int { } func (o *PipelineServiceGetPipelineVersionV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}][%d] PipelineService_GetPipelineVersionV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}][%d] PipelineService_GetPipelineVersionV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineVersionV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions/{version_id}][%d] PipelineService_GetPipelineVersionV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineVersionV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceGetPipelineVersionV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_parameters.go index 695319577eb..c6df8fca736 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceGetTemplateParams creates a new PipelineServiceGetTemplateParams object -// with the default values initialized. +// NewPipelineServiceGetTemplateParams creates a new PipelineServiceGetTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceGetTemplateParams() *PipelineServiceGetTemplateParams { - var () return &PipelineServiceGetTemplateParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceGetTemplateParamsWithTimeout creates a new PipelineServiceGetTemplateParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceGetTemplateParamsWithTimeout(timeout time.Duration) *PipelineServiceGetTemplateParams { - var () return &PipelineServiceGetTemplateParams{ - timeout: timeout, } } // NewPipelineServiceGetTemplateParamsWithContext creates a new PipelineServiceGetTemplateParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceGetTemplateParamsWithContext(ctx context.Context) *PipelineServiceGetTemplateParams { - var () return &PipelineServiceGetTemplateParams{ - Context: ctx, } } // NewPipelineServiceGetTemplateParamsWithHTTPClient creates a new PipelineServiceGetTemplateParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceGetTemplateParamsWithHTTPClient(client *http.Client) *PipelineServiceGetTemplateParams { - var () return &PipelineServiceGetTemplateParams{ HTTPClient: client, } } -/*PipelineServiceGetTemplateParams contains all the parameters to send to the API endpoint -for the pipeline service get template operation typically these are written to a http.Request +/* +PipelineServiceGetTemplateParams contains all the parameters to send to the API endpoint + + for the pipeline service get template operation. + + Typically these are written to a http.Request. */ type PipelineServiceGetTemplateParams struct { - /*ID - The ID of the pipeline whose template is to be retrieved. + /* ID. + The ID of the pipeline whose template is to be retrieved. */ ID string @@ -72,6 +72,21 @@ type PipelineServiceGetTemplateParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service get template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetTemplateParams) WithDefaults() *PipelineServiceGetTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service get template params func (o *PipelineServiceGetTemplateParams) WithTimeout(timeout time.Duration) *PipelineServiceGetTemplateParams { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_responses.go index f4197d60615..471c67ab315 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_template_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceGetTemplateReader is a Reader for the PipelineServiceGetTemplate structure. @@ -24,14 +24,12 @@ type PipelineServiceGetTemplateReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceGetTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceGetTemplateOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceGetTemplateDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceGetTemplateOK() *PipelineServiceGetTemplateOK { return &PipelineServiceGetTemplateOK{} } -/*PipelineServiceGetTemplateOK handles this case with default header values. +/* +PipelineServiceGetTemplateOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceGetTemplateOK struct { Payload *pipeline_model.APIGetTemplateResponse } +// IsSuccess returns true when this pipeline service get template o k response has a 2xx status code +func (o *PipelineServiceGetTemplateOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get template o k response has a 3xx status code +func (o *PipelineServiceGetTemplateOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get template o k response has a 4xx status code +func (o *PipelineServiceGetTemplateOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get template o k response has a 5xx status code +func (o *PipelineServiceGetTemplateOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get template o k response a status code equal to that given +func (o *PipelineServiceGetTemplateOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get template o k response +func (o *PipelineServiceGetTemplateOK) Code() int { + return 200 +} + func (o *PipelineServiceGetTemplateOK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}/templates][%d] pipelineServiceGetTemplateOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}/templates][%d] pipelineServiceGetTemplateOK %s", 200, payload) +} + +func (o *PipelineServiceGetTemplateOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}/templates][%d] pipelineServiceGetTemplateOK %s", 200, payload) +} + +func (o *PipelineServiceGetTemplateOK) GetPayload() *pipeline_model.APIGetTemplateResponse { + return o.Payload } func (o *PipelineServiceGetTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceGetTemplateDefault(code int) *PipelineServiceGetTemplateD } } -/*PipelineServiceGetTemplateDefault handles this case with default header values. +/* +PipelineServiceGetTemplateDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceGetTemplateDefault struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get template default response has a 2xx status code +func (o *PipelineServiceGetTemplateDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get template default response has a 3xx status code +func (o *PipelineServiceGetTemplateDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get template default response has a 4xx status code +func (o *PipelineServiceGetTemplateDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get template default response has a 5xx status code +func (o *PipelineServiceGetTemplateDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get template default response a status code equal to that given +func (o *PipelineServiceGetTemplateDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service get template default response @@ -96,12 +161,22 @@ func (o *PipelineServiceGetTemplateDefault) Code() int { } func (o *PipelineServiceGetTemplateDefault) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}/templates][%d] PipelineService_GetTemplate default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}/templates][%d] PipelineService_GetTemplate default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetTemplateDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines/{id}/templates][%d] PipelineService_GetTemplate default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetTemplateDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceGetTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_v1_parameters.go index a94c61876dc..33a12cc4f8d 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_v1_parameters.go @@ -13,101 +13,98 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewPipelineServiceListPipelineVersionsV1Params creates a new PipelineServiceListPipelineVersionsV1Params object -// with the default values initialized. +// NewPipelineServiceListPipelineVersionsV1Params creates a new PipelineServiceListPipelineVersionsV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceListPipelineVersionsV1Params() *PipelineServiceListPipelineVersionsV1Params { - var ( - resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &PipelineServiceListPipelineVersionsV1Params{ - ResourceKeyType: &resourceKeyTypeDefault, - timeout: cr.DefaultTimeout, } } // NewPipelineServiceListPipelineVersionsV1ParamsWithTimeout creates a new PipelineServiceListPipelineVersionsV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceListPipelineVersionsV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceListPipelineVersionsV1Params { - var ( - resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &PipelineServiceListPipelineVersionsV1Params{ - ResourceKeyType: &resourceKeyTypeDefault, - timeout: timeout, } } // NewPipelineServiceListPipelineVersionsV1ParamsWithContext creates a new PipelineServiceListPipelineVersionsV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceListPipelineVersionsV1ParamsWithContext(ctx context.Context) *PipelineServiceListPipelineVersionsV1Params { - var ( - resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &PipelineServiceListPipelineVersionsV1Params{ - ResourceKeyType: &resourceKeyTypeDefault, - Context: ctx, } } // NewPipelineServiceListPipelineVersionsV1ParamsWithHTTPClient creates a new PipelineServiceListPipelineVersionsV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceListPipelineVersionsV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceListPipelineVersionsV1Params { - var ( - resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &PipelineServiceListPipelineVersionsV1Params{ - ResourceKeyType: &resourceKeyTypeDefault, - HTTPClient: client, + HTTPClient: client, } } -/*PipelineServiceListPipelineVersionsV1Params contains all the parameters to send to the API endpoint -for the pipeline service list pipeline versions v1 operation typically these are written to a http.Request +/* +PipelineServiceListPipelineVersionsV1Params contains all the parameters to send to the API endpoint + + for the pipeline service list pipeline versions v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceListPipelineVersionsV1Params struct { - /*Filter - A base-64 encoded, JSON-serialized Filter protocol buffer (see - filter.proto). + /* Filter. + A base-64 encoded, JSON-serialized Filter protocol buffer (see + filter.proto). */ Filter *string - /*PageSize - The number of pipeline versions to be listed per page. If there are more + + /* PageSize. + + The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the next page of results. The token is acquried + + /* PageToken. + + A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelineVersions call or can be omitted when fetching the first page. - */ PageToken *string - /*ResourceKeyID - The ID of the resource that referred to. + /* ResourceKeyID. + + The ID of the resource that referred to. */ ResourceKeyID *string - /*ResourceKeyType - The type of the resource that referred to. + /* ResourceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" */ ResourceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - Ascending by default. + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + Ascending by default. */ SortBy *string @@ -116,6 +113,32 @@ type PipelineServiceListPipelineVersionsV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service list pipeline versions v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelineVersionsV1Params) WithDefaults() *PipelineServiceListPipelineVersionsV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service list pipeline versions v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelineVersionsV1Params) SetDefaults() { + var ( + resourceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := PipelineServiceListPipelineVersionsV1Params{ + ResourceKeyType: &resourceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + // WithTimeout adds the timeout to the pipeline service list pipeline versions v1 params func (o *PipelineServiceListPipelineVersionsV1Params) WithTimeout(timeout time.Duration) *PipelineServiceListPipelineVersionsV1Params { o.SetTimeout(timeout) @@ -227,96 +250,102 @@ func (o *PipelineServiceListPipelineVersionsV1Params) WriteToRequest(r runtime.C // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.ResourceKeyID != nil { // query param resource_key.id var qrResourceKeyID string + if o.ResourceKeyID != nil { qrResourceKeyID = *o.ResourceKeyID } qResourceKeyID := qrResourceKeyID if qResourceKeyID != "" { + if err := r.SetQueryParam("resource_key.id", qResourceKeyID); err != nil { return err } } - } if o.ResourceKeyType != nil { // query param resource_key.type var qrResourceKeyType string + if o.ResourceKeyType != nil { qrResourceKeyType = *o.ResourceKeyType } qResourceKeyType := qrResourceKeyType if qResourceKeyType != "" { + if err := r.SetQueryParam("resource_key.type", qResourceKeyType); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_v1_responses.go index 647b826e2c8..a40f72c05c5 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceListPipelineVersionsV1Reader is a Reader for the PipelineServiceListPipelineVersionsV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceListPipelineVersionsV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceListPipelineVersionsV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceListPipelineVersionsV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceListPipelineVersionsV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceListPipelineVersionsV1OK() *PipelineServiceListPipelineVe return &PipelineServiceListPipelineVersionsV1OK{} } -/*PipelineServiceListPipelineVersionsV1OK handles this case with default header values. +/* +PipelineServiceListPipelineVersionsV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceListPipelineVersionsV1OK struct { Payload *pipeline_model.APIListPipelineVersionsResponse } +// IsSuccess returns true when this pipeline service list pipeline versions v1 o k response has a 2xx status code +func (o *PipelineServiceListPipelineVersionsV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service list pipeline versions v1 o k response has a 3xx status code +func (o *PipelineServiceListPipelineVersionsV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service list pipeline versions v1 o k response has a 4xx status code +func (o *PipelineServiceListPipelineVersionsV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service list pipeline versions v1 o k response has a 5xx status code +func (o *PipelineServiceListPipelineVersionsV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service list pipeline versions v1 o k response a status code equal to that given +func (o *PipelineServiceListPipelineVersionsV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service list pipeline versions v1 o k response +func (o *PipelineServiceListPipelineVersionsV1OK) Code() int { + return 200 +} + func (o *PipelineServiceListPipelineVersionsV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions][%d] pipelineServiceListPipelineVersionsV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions][%d] pipelineServiceListPipelineVersionsV1OK %s", 200, payload) +} + +func (o *PipelineServiceListPipelineVersionsV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions][%d] pipelineServiceListPipelineVersionsV1OK %s", 200, payload) +} + +func (o *PipelineServiceListPipelineVersionsV1OK) GetPayload() *pipeline_model.APIListPipelineVersionsResponse { + return o.Payload } func (o *PipelineServiceListPipelineVersionsV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceListPipelineVersionsV1Default(code int) *PipelineServiceL } } -/*PipelineServiceListPipelineVersionsV1Default handles this case with default header values. +/* +PipelineServiceListPipelineVersionsV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceListPipelineVersionsV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service list pipeline versions v1 default response has a 2xx status code +func (o *PipelineServiceListPipelineVersionsV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service list pipeline versions v1 default response has a 3xx status code +func (o *PipelineServiceListPipelineVersionsV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service list pipeline versions v1 default response has a 4xx status code +func (o *PipelineServiceListPipelineVersionsV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service list pipeline versions v1 default response has a 5xx status code +func (o *PipelineServiceListPipelineVersionsV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service list pipeline versions v1 default response a status code equal to that given +func (o *PipelineServiceListPipelineVersionsV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service list pipeline versions v1 default response @@ -96,12 +161,22 @@ func (o *PipelineServiceListPipelineVersionsV1Default) Code() int { } func (o *PipelineServiceListPipelineVersionsV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions][%d] PipelineService_ListPipelineVersionsV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions][%d] PipelineService_ListPipelineVersionsV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceListPipelineVersionsV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipeline_versions][%d] PipelineService_ListPipelineVersionsV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceListPipelineVersionsV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceListPipelineVersionsV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_v1_parameters.go index 8481d4c25b6..60bb336f964 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_v1_parameters.go @@ -13,101 +13,98 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewPipelineServiceListPipelinesV1Params creates a new PipelineServiceListPipelinesV1Params object -// with the default values initialized. +// NewPipelineServiceListPipelinesV1Params creates a new PipelineServiceListPipelinesV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceListPipelinesV1Params() *PipelineServiceListPipelinesV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &PipelineServiceListPipelinesV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - timeout: cr.DefaultTimeout, } } // NewPipelineServiceListPipelinesV1ParamsWithTimeout creates a new PipelineServiceListPipelinesV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceListPipelinesV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceListPipelinesV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &PipelineServiceListPipelinesV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - timeout: timeout, } } // NewPipelineServiceListPipelinesV1ParamsWithContext creates a new PipelineServiceListPipelinesV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceListPipelinesV1ParamsWithContext(ctx context.Context) *PipelineServiceListPipelinesV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &PipelineServiceListPipelinesV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - Context: ctx, } } // NewPipelineServiceListPipelinesV1ParamsWithHTTPClient creates a new PipelineServiceListPipelinesV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceListPipelinesV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceListPipelinesV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &PipelineServiceListPipelinesV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - HTTPClient: client, + HTTPClient: client, } } -/*PipelineServiceListPipelinesV1Params contains all the parameters to send to the API endpoint -for the pipeline service list pipelines v1 operation typically these are written to a http.Request +/* +PipelineServiceListPipelinesV1Params contains all the parameters to send to the API endpoint + + for the pipeline service list pipelines v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceListPipelinesV1Params struct { - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). + /* Filter. + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). */ Filter *string - /*PageSize - The number of pipelines to be listed per page. If there are more pipelines + + /* PageSize. + + The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the next page of results. The token is acquried + + /* PageToken. + + A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListPipelines call. - */ PageToken *string - /*ResourceReferenceKeyID - The ID of the resource that referred to. + /* ResourceReferenceKeyID. + + The ID of the resource that referred to. */ ResourceReferenceKeyID *string - /*ResourceReferenceKeyType - The type of the resource that referred to. + /* ResourceReferenceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" */ ResourceReferenceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - Ascending by default. + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + Ascending by default. */ SortBy *string @@ -116,6 +113,32 @@ type PipelineServiceListPipelinesV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service list pipelines v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelinesV1Params) WithDefaults() *PipelineServiceListPipelinesV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service list pipelines v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelinesV1Params) SetDefaults() { + var ( + resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := PipelineServiceListPipelinesV1Params{ + ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + // WithTimeout adds the timeout to the pipeline service list pipelines v1 params func (o *PipelineServiceListPipelinesV1Params) WithTimeout(timeout time.Duration) *PipelineServiceListPipelinesV1Params { o.SetTimeout(timeout) @@ -227,96 +250,102 @@ func (o *PipelineServiceListPipelinesV1Params) WriteToRequest(r runtime.ClientRe // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.ResourceReferenceKeyID != nil { // query param resource_reference_key.id var qrResourceReferenceKeyID string + if o.ResourceReferenceKeyID != nil { qrResourceReferenceKeyID = *o.ResourceReferenceKeyID } qResourceReferenceKeyID := qrResourceReferenceKeyID if qResourceReferenceKeyID != "" { + if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { return err } } - } if o.ResourceReferenceKeyType != nil { // query param resource_reference_key.type var qrResourceReferenceKeyType string + if o.ResourceReferenceKeyType != nil { qrResourceReferenceKeyType = *o.ResourceReferenceKeyType } qResourceReferenceKeyType := qrResourceReferenceKeyType if qResourceReferenceKeyType != "" { + if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_v1_responses.go index 1add38aa4ad..becb45766c8 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceListPipelinesV1Reader is a Reader for the PipelineServiceListPipelinesV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceListPipelinesV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceListPipelinesV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceListPipelinesV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceListPipelinesV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceListPipelinesV1OK() *PipelineServiceListPipelinesV1OK { return &PipelineServiceListPipelinesV1OK{} } -/*PipelineServiceListPipelinesV1OK handles this case with default header values. +/* +PipelineServiceListPipelinesV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceListPipelinesV1OK struct { Payload *pipeline_model.APIListPipelinesResponse } +// IsSuccess returns true when this pipeline service list pipelines v1 o k response has a 2xx status code +func (o *PipelineServiceListPipelinesV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service list pipelines v1 o k response has a 3xx status code +func (o *PipelineServiceListPipelinesV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service list pipelines v1 o k response has a 4xx status code +func (o *PipelineServiceListPipelinesV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service list pipelines v1 o k response has a 5xx status code +func (o *PipelineServiceListPipelinesV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service list pipelines v1 o k response a status code equal to that given +func (o *PipelineServiceListPipelinesV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service list pipelines v1 o k response +func (o *PipelineServiceListPipelinesV1OK) Code() int { + return 200 +} + func (o *PipelineServiceListPipelinesV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipelines][%d] pipelineServiceListPipelinesV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines][%d] pipelineServiceListPipelinesV1OK %s", 200, payload) +} + +func (o *PipelineServiceListPipelinesV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines][%d] pipelineServiceListPipelinesV1OK %s", 200, payload) +} + +func (o *PipelineServiceListPipelinesV1OK) GetPayload() *pipeline_model.APIListPipelinesResponse { + return o.Payload } func (o *PipelineServiceListPipelinesV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceListPipelinesV1Default(code int) *PipelineServiceListPipe } } -/*PipelineServiceListPipelinesV1Default handles this case with default header values. +/* +PipelineServiceListPipelinesV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceListPipelinesV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service list pipelines v1 default response has a 2xx status code +func (o *PipelineServiceListPipelinesV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service list pipelines v1 default response has a 3xx status code +func (o *PipelineServiceListPipelinesV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service list pipelines v1 default response has a 4xx status code +func (o *PipelineServiceListPipelinesV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service list pipelines v1 default response has a 5xx status code +func (o *PipelineServiceListPipelinesV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service list pipelines v1 default response a status code equal to that given +func (o *PipelineServiceListPipelinesV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service list pipelines v1 default response @@ -96,12 +161,22 @@ func (o *PipelineServiceListPipelinesV1Default) Code() int { } func (o *PipelineServiceListPipelinesV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/pipelines][%d] PipelineService_ListPipelinesV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines][%d] PipelineService_ListPipelinesV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceListPipelinesV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/pipelines][%d] PipelineService_ListPipelinesV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceListPipelinesV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceListPipelinesV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_v1_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_v1_parameters.go index cc3bcf04593..efddd9f37c4 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_v1_parameters.go @@ -13,62 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceUpdatePipelineDefaultVersionV1Params creates a new PipelineServiceUpdatePipelineDefaultVersionV1Params object -// with the default values initialized. +// NewPipelineServiceUpdatePipelineDefaultVersionV1Params creates a new PipelineServiceUpdatePipelineDefaultVersionV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceUpdatePipelineDefaultVersionV1Params() *PipelineServiceUpdatePipelineDefaultVersionV1Params { - var () return &PipelineServiceUpdatePipelineDefaultVersionV1Params{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceUpdatePipelineDefaultVersionV1ParamsWithTimeout creates a new PipelineServiceUpdatePipelineDefaultVersionV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceUpdatePipelineDefaultVersionV1ParamsWithTimeout(timeout time.Duration) *PipelineServiceUpdatePipelineDefaultVersionV1Params { - var () return &PipelineServiceUpdatePipelineDefaultVersionV1Params{ - timeout: timeout, } } // NewPipelineServiceUpdatePipelineDefaultVersionV1ParamsWithContext creates a new PipelineServiceUpdatePipelineDefaultVersionV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceUpdatePipelineDefaultVersionV1ParamsWithContext(ctx context.Context) *PipelineServiceUpdatePipelineDefaultVersionV1Params { - var () return &PipelineServiceUpdatePipelineDefaultVersionV1Params{ - Context: ctx, } } // NewPipelineServiceUpdatePipelineDefaultVersionV1ParamsWithHTTPClient creates a new PipelineServiceUpdatePipelineDefaultVersionV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceUpdatePipelineDefaultVersionV1ParamsWithHTTPClient(client *http.Client) *PipelineServiceUpdatePipelineDefaultVersionV1Params { - var () return &PipelineServiceUpdatePipelineDefaultVersionV1Params{ HTTPClient: client, } } -/*PipelineServiceUpdatePipelineDefaultVersionV1Params contains all the parameters to send to the API endpoint -for the pipeline service update pipeline default version v1 operation typically these are written to a http.Request +/* +PipelineServiceUpdatePipelineDefaultVersionV1Params contains all the parameters to send to the API endpoint + + for the pipeline service update pipeline default version v1 operation. + + Typically these are written to a http.Request. */ type PipelineServiceUpdatePipelineDefaultVersionV1Params struct { - /*PipelineID - The ID of the pipeline to be updated. + /* PipelineID. + The ID of the pipeline to be updated. */ PipelineID string - /*VersionID - The ID of the default version. + /* VersionID. + + The ID of the default version. */ VersionID string @@ -77,6 +78,21 @@ type PipelineServiceUpdatePipelineDefaultVersionV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service update pipeline default version v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Params) WithDefaults() *PipelineServiceUpdatePipelineDefaultVersionV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service update pipeline default version v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service update pipeline default version v1 params func (o *PipelineServiceUpdatePipelineDefaultVersionV1Params) WithTimeout(timeout time.Duration) *PipelineServiceUpdatePipelineDefaultVersionV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_v1_responses.go b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_v1_responses.go index 77967ba81d7..4b3c643ff80 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_update_pipeline_default_version_v1_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_model" ) // PipelineServiceUpdatePipelineDefaultVersionV1Reader is a Reader for the PipelineServiceUpdatePipelineDefaultVersionV1 structure. @@ -24,14 +24,12 @@ type PipelineServiceUpdatePipelineDefaultVersionV1Reader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceUpdatePipelineDefaultVersionV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceUpdatePipelineDefaultVersionV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceUpdatePipelineDefaultVersionV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceUpdatePipelineDefaultVersionV1OK() *PipelineServiceUpdate return &PipelineServiceUpdatePipelineDefaultVersionV1OK{} } -/*PipelineServiceUpdatePipelineDefaultVersionV1OK handles this case with default header values. +/* +PipelineServiceUpdatePipelineDefaultVersionV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceUpdatePipelineDefaultVersionV1OK struct { Payload interface{} } +// IsSuccess returns true when this pipeline service update pipeline default version v1 o k response has a 2xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service update pipeline default version v1 o k response has a 3xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service update pipeline default version v1 o k response has a 4xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service update pipeline default version v1 o k response has a 5xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service update pipeline default version v1 o k response a status code equal to that given +func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service update pipeline default version v1 o k response +func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) Code() int { + return 200 +} + func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}][%d] pipelineServiceUpdatePipelineDefaultVersionV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}][%d] pipelineServiceUpdatePipelineDefaultVersionV1OK %s", 200, payload) +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}][%d] pipelineServiceUpdatePipelineDefaultVersionV1OK %s", 200, payload) +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) GetPayload() interface{} { + return o.Payload } func (o *PipelineServiceUpdatePipelineDefaultVersionV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewPipelineServiceUpdatePipelineDefaultVersionV1Default(code int) *Pipeline } } -/*PipelineServiceUpdatePipelineDefaultVersionV1Default handles this case with default header values. +/* +PipelineServiceUpdatePipelineDefaultVersionV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceUpdatePipelineDefaultVersionV1Default struct { _statusCode int - Payload *pipeline_model.GatewayruntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service update pipeline default version v1 default response has a 2xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service update pipeline default version v1 default response has a 3xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service update pipeline default version v1 default response has a 4xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service update pipeline default version v1 default response has a 5xx status code +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service update pipeline default version v1 default response a status code equal to that given +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service update pipeline default version v1 default response @@ -94,12 +159,22 @@ func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) Code() int { } func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}][%d] PipelineService_UpdatePipelineDefaultVersionV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}][%d] PipelineService_UpdatePipelineDefaultVersionV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/{pipeline_id}/default_version/{version_id}][%d] PipelineService_UpdatePipelineDefaultVersionV1 default %s", o._statusCode, payload) +} + +func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceUpdatePipelineDefaultVersionV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.GatewayruntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_get_template_response.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_get_template_response.go index bf3917f7f83..c537dd8325a 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_get_template_response.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_get_template_response.go @@ -6,12 +6,14 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIGetTemplateResponse api get template response +// // swagger:model apiGetTemplateResponse type APIGetTemplateResponse struct { @@ -25,6 +27,11 @@ func (m *APIGetTemplateResponse) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api get template response based on context it is used +func (m *APIGetTemplateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIGetTemplateResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_list_pipeline_versions_response.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_list_pipeline_versions_response.go index 4c4cc8e6a0a..6d6e87edc82 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_list_pipeline_versions_response.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_list_pipeline_versions_response.go @@ -6,15 +6,16 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIListPipelineVersionsResponse api list pipeline versions response +// // swagger:model apiListPipelineVersionsResponse type APIListPipelineVersionsResponse struct { @@ -43,7 +44,6 @@ func (m *APIListPipelineVersionsResponse) Validate(formats strfmt.Registry) erro } func (m *APIListPipelineVersionsResponse) validateVersions(formats strfmt.Registry) error { - if swag.IsZero(m.Versions) { // not required return nil } @@ -57,6 +57,47 @@ func (m *APIListPipelineVersionsResponse) validateVersions(formats strfmt.Regist if err := m.Versions[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("versions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("versions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api list pipeline versions response based on the context it is used +func (m *APIListPipelineVersionsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateVersions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIListPipelineVersionsResponse) contextValidateVersions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Versions); i++ { + + if m.Versions[i] != nil { + + if swag.IsZero(m.Versions[i]) { // not required + return nil + } + + if err := m.Versions[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("versions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("versions" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_list_pipelines_response.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_list_pipelines_response.go index 4f3dfc30744..97a2e2fa338 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_list_pipelines_response.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_list_pipelines_response.go @@ -6,15 +6,16 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIListPipelinesResponse api list pipelines response +// // swagger:model apiListPipelinesResponse type APIListPipelinesResponse struct { @@ -43,7 +44,6 @@ func (m *APIListPipelinesResponse) Validate(formats strfmt.Registry) error { } func (m *APIListPipelinesResponse) validatePipelines(formats strfmt.Registry) error { - if swag.IsZero(m.Pipelines) { // not required return nil } @@ -57,6 +57,47 @@ func (m *APIListPipelinesResponse) validatePipelines(formats strfmt.Registry) er if err := m.Pipelines[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api list pipelines response based on the context it is used +func (m *APIListPipelinesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePipelines(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIListPipelinesResponse) contextValidatePipelines(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Pipelines); i++ { + + if m.Pipelines[i] != nil { + + if swag.IsZero(m.Pipelines[i]) { // not required + return nil + } + + if err := m.Pipelines[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipelines" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_parameter.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_parameter.go index 68fa4288480..2b361318330 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_parameter.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_parameter.go @@ -6,12 +6,14 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIParameter api parameter +// // swagger:model apiParameter type APIParameter struct { @@ -27,6 +29,11 @@ func (m *APIParameter) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api parameter based on context it is used +func (m *APIParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIParameter) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_pipeline.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_pipeline.go index 53f03984bb8..91c073f9583 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_pipeline.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_pipeline.go @@ -6,16 +6,17 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APIPipeline api pipeline +// // swagger:model apiPipeline type APIPipeline struct { @@ -90,7 +91,6 @@ func (m *APIPipeline) Validate(formats strfmt.Registry) error { } func (m *APIPipeline) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -103,7 +103,6 @@ func (m *APIPipeline) validateCreatedAt(formats strfmt.Registry) error { } func (m *APIPipeline) validateDefaultVersion(formats strfmt.Registry) error { - if swag.IsZero(m.DefaultVersion) { // not required return nil } @@ -112,6 +111,8 @@ func (m *APIPipeline) validateDefaultVersion(formats strfmt.Registry) error { if err := m.DefaultVersion.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("default_version") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("default_version") } return err } @@ -121,7 +122,6 @@ func (m *APIPipeline) validateDefaultVersion(formats strfmt.Registry) error { } func (m *APIPipeline) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -135,6 +135,8 @@ func (m *APIPipeline) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -146,7 +148,6 @@ func (m *APIPipeline) validateParameters(formats strfmt.Registry) error { } func (m *APIPipeline) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -160,6 +161,8 @@ func (m *APIPipeline) validateResourceReferences(formats strfmt.Registry) error if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } @@ -171,7 +174,6 @@ func (m *APIPipeline) validateResourceReferences(formats strfmt.Registry) error } func (m *APIPipeline) validateURL(formats strfmt.Registry) error { - if swag.IsZero(m.URL) { // not required return nil } @@ -180,6 +182,126 @@ func (m *APIPipeline) validateURL(formats strfmt.Registry) error { if err := m.URL.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("url") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api pipeline based on the context it is used +func (m *APIPipeline) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDefaultVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIPipeline) contextValidateDefaultVersion(ctx context.Context, formats strfmt.Registry) error { + + if m.DefaultVersion != nil { + + if swag.IsZero(m.DefaultVersion) { // not required + return nil + } + + if err := m.DefaultVersion.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("default_version") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("default_version") + } + return err + } + } + + return nil +} + +func (m *APIPipeline) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + + if swag.IsZero(m.Parameters[i]) { // not required + return nil + } + + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIPipeline) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + + if swag.IsZero(m.ResourceReferences[i]) { // not required + return nil + } + + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIPipeline) contextValidateURL(ctx context.Context, formats strfmt.Registry) error { + + if m.URL != nil { + + if swag.IsZero(m.URL) { // not required + return nil + } + + if err := m.URL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("url") } return err } diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_pipeline_version.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_pipeline_version.go index 7c3b26bec3c..8756a52c9d2 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_pipeline_version.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_pipeline_version.go @@ -6,16 +6,17 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APIPipelineVersion api pipeline version +// // swagger:model apiPipelineVersion type APIPipelineVersion struct { @@ -78,7 +79,6 @@ func (m *APIPipelineVersion) Validate(formats strfmt.Registry) error { } func (m *APIPipelineVersion) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -91,7 +91,6 @@ func (m *APIPipelineVersion) validateCreatedAt(formats strfmt.Registry) error { } func (m *APIPipelineVersion) validatePackageURL(formats strfmt.Registry) error { - if swag.IsZero(m.PackageURL) { // not required return nil } @@ -100,6 +99,8 @@ func (m *APIPipelineVersion) validatePackageURL(formats strfmt.Registry) error { if err := m.PackageURL.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") } return err } @@ -109,7 +110,6 @@ func (m *APIPipelineVersion) validatePackageURL(formats strfmt.Registry) error { } func (m *APIPipelineVersion) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -123,6 +123,8 @@ func (m *APIPipelineVersion) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -134,7 +136,6 @@ func (m *APIPipelineVersion) validateParameters(formats strfmt.Registry) error { } func (m *APIPipelineVersion) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -148,6 +149,101 @@ func (m *APIPipelineVersion) validateResourceReferences(formats strfmt.Registry) if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api pipeline version based on the context it is used +func (m *APIPipelineVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePackageURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIPipelineVersion) contextValidatePackageURL(ctx context.Context, formats strfmt.Registry) error { + + if m.PackageURL != nil { + + if swag.IsZero(m.PackageURL) { // not required + return nil + } + + if err := m.PackageURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") + } + return err + } + } + + return nil +} + +func (m *APIPipelineVersion) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + + if swag.IsZero(m.Parameters[i]) { // not required + return nil + } + + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIPipelineVersion) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + + if swag.IsZero(m.ResourceReferences[i]) { // not required + return nil + } + + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_relationship.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_relationship.go index ab414853c95..bdf835420da 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_relationship.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_relationship.go @@ -6,18 +6,28 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIRelationship api relationship +// // swagger:model apiRelationship type APIRelationship string +func NewAPIRelationship(value APIRelationship) *APIRelationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIRelationship. +func (m APIRelationship) Pointer() *APIRelationship { + return &m +} + const ( // APIRelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m APIRelationship) validateAPIRelationshipEnum(path, location string, value APIRelationship) error { - if err := validate.Enum(path, location, value, apiRelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiRelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m APIRelationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api relationship based on context it is used +func (m APIRelationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_key.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_key.go index c0fb0fae089..b0647df0afd 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_key.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_key.go @@ -6,13 +6,15 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceKey api resource key +// // swagger:model apiResourceKey type APIResourceKey struct { @@ -20,7 +22,7 @@ type APIResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type APIResourceType `json:"type,omitempty"` + Type *APIResourceType `json:"type,omitempty"` } // Validate validates this api resource key @@ -38,16 +40,54 @@ func (m *APIResourceKey) Validate(formats strfmt.Registry) error { } func (m *APIResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource key based on the context it is used +func (m *APIResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_reference.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_reference.go index 975fe1f830a..5f9ee1ebda1 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_reference.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_reference.go @@ -6,13 +6,15 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceReference api resource reference +// // swagger:model apiResourceReference type APIResourceReference struct { @@ -23,7 +25,7 @@ type APIResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship APIRelationship `json:"relationship,omitempty"` + Relationship *APIRelationship `json:"relationship,omitempty"` } // Validate validates this api resource reference @@ -45,7 +47,6 @@ func (m *APIResourceReference) Validate(formats strfmt.Registry) error { } func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,79 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { } func (m *APIResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource reference based on the context it is used +func (m *APIResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + + if swag.IsZero(m.Key) { // not required + return nil + } + + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *APIResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + + if swag.IsZero(m.Relationship) { // not required + return nil + } + + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_type.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_type.go index 8df611d77ff..0dd46e058bd 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_type.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_resource_type.go @@ -6,18 +6,28 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIResourceType api resource type +// // swagger:model apiResourceType type APIResourceType string +func NewAPIResourceType(value APIResourceType) *APIResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIResourceType. +func (m APIResourceType) Pointer() *APIResourceType { + return &m +} + const ( // APIResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m APIResourceType) validateAPIResourceTypeEnum(path, location string, value APIResourceType) error { - if err := validate.Enum(path, location, value, apiResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m APIResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api resource type based on context it is used +func (m APIResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/api_url.go b/backend/api/v1beta1/go_http_client/pipeline_model/api_url.go index 69be2fc2277..4abcd729b9f 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/api_url.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/api_url.go @@ -6,12 +6,14 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIURL api Url +// // swagger:model apiUrl type APIURL struct { @@ -24,6 +26,11 @@ func (m *APIURL) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api Url based on context it is used +func (m *APIURL) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIURL) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/gatewayruntime_error.go b/backend/api/v1beta1/go_http_client/pipeline_model/gatewayruntime_error.go deleted file mode 100644 index edc8cf46ff9..00000000000 --- a/backend/api/v1beta1/go_http_client/pipeline_model/gatewayruntime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// GatewayruntimeError gatewayruntime error -// swagger:model gatewayruntimeError -type GatewayruntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this gatewayruntime error -func (m *GatewayruntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GatewayruntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GatewayruntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GatewayruntimeError) UnmarshalBinary(b []byte) error { - var res GatewayruntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/googlerpc_status.go b/backend/api/v1beta1/go_http_client/pipeline_model/googlerpc_status.go new file mode 100644 index 00000000000..67080c9a32e --- /dev/null +++ b/backend/api/v1beta1/go_http_client/pipeline_model/googlerpc_status.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package pipeline_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1beta1/go_http_client/pipeline_model/protobuf_any.go b/backend/api/v1beta1/go_http_client/pipeline_model/protobuf_any.go index fb51adb0990..fba86c1d06b 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_model/protobuf_any.go +++ b/backend/api/v1beta1/go_http_client/pipeline_model/protobuf_any.go @@ -6,9 +6,10 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_client.go b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_client.go index d0d7059ecb9..e0c459f0bd2 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_client.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_client.go @@ -8,8 +8,7 @@ package pipeline_upload_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PipelineUp cli := new(PipelineUpload) cli.Transport = transport - cli.PipelineUploadService = pipeline_upload_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // PipelineUpload is a client for pipeline upload type PipelineUpload struct { - PipelineUploadService *pipeline_upload_service.Client + PipelineUploadService pipeline_upload_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type PipelineUpload struct { // SetTransport changes the transport on the client and all its subresources func (c *PipelineUpload) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.PipelineUploadService.SetTransport(transport) - } diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go index 42494cf4755..1bfc8666f4b 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go @@ -7,15 +7,40 @@ package pipeline_upload_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new pipeline upload service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new pipeline upload service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new pipeline upload service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for pipeline upload service API */ @@ -24,16 +49,51 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// This client is generated with a few options you might find useful for your swagger spec. +// +// Feel free to add you own set of options. + +// WithContentType allows the client to force the Content-Type header +// to negotiate a specific Consumer from the server. +// +// You may use this option to set arbitrary extensions to your MIME media type. +func WithContentType(mime string) ClientOption { + return func(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{mime} + } +} + +// WithContentTypeApplicationJSON sets the Content-Type header to "application/json". +func WithContentTypeApplicationJSON(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{"application/json"} +} + +// WithContentTypeMultipartFormData sets the Content-Type header to "multipart/form-data". +func WithContentTypeMultipartFormData(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{"multipart/form-data"} +} + +// ClientService is the interface for Client methods +type ClientService interface { + UploadPipeline(params *UploadPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPipelineOK, error) + + UploadPipelineVersion(params *UploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPipelineVersionOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* UploadPipeline upload pipeline API */ -func (a *Client) UploadPipeline(params *UploadPipelineParams, authInfo runtime.ClientAuthInfoWriter) (*UploadPipelineOK, error) { +func (a *Client) UploadPipeline(params *UploadPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPipelineOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUploadPipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "UploadPipeline", Method: "POST", PathPattern: "/apis/v1beta1/pipelines/upload", @@ -45,24 +105,33 @@ func (a *Client) UploadPipeline(params *UploadPipelineParams, authInfo runtime.C AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UploadPipelineOK), nil - + success, ok := result.(*UploadPipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*UploadPipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* UploadPipelineVersion upload pipeline version API */ -func (a *Client) UploadPipelineVersion(params *UploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*UploadPipelineVersionOK, error) { +func (a *Client) UploadPipelineVersion(params *UploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUploadPipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "UploadPipelineVersion", Method: "POST", PathPattern: "/apis/v1beta1/pipelines/upload_version", @@ -74,12 +143,22 @@ func (a *Client) UploadPipelineVersion(params *UploadPipelineVersionParams, auth AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UploadPipelineVersionOK), nil - + success, ok := result.(*UploadPipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*UploadPipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go index 3945ae005a7..5ab15cc6509 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go @@ -13,63 +13,66 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewUploadPipelineParams creates a new UploadPipelineParams object -// with the default values initialized. +// NewUploadPipelineParams creates a new UploadPipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewUploadPipelineParams() *UploadPipelineParams { - var () return &UploadPipelineParams{ - timeout: cr.DefaultTimeout, } } // NewUploadPipelineParamsWithTimeout creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewUploadPipelineParamsWithTimeout(timeout time.Duration) *UploadPipelineParams { - var () return &UploadPipelineParams{ - timeout: timeout, } } // NewUploadPipelineParamsWithContext creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewUploadPipelineParamsWithContext(ctx context.Context) *UploadPipelineParams { - var () return &UploadPipelineParams{ - Context: ctx, } } // NewUploadPipelineParamsWithHTTPClient creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewUploadPipelineParamsWithHTTPClient(client *http.Client) *UploadPipelineParams { - var () return &UploadPipelineParams{ HTTPClient: client, } } -/*UploadPipelineParams contains all the parameters to send to the API endpoint -for the upload pipeline operation typically these are written to a http.Request +/* +UploadPipelineParams contains all the parameters to send to the API endpoint + + for the upload pipeline operation. + + Typically these are written to a http.Request. */ type UploadPipelineParams struct { - /*Description*/ + // Description. Description *string - /*Name*/ + + // Name. Name *string - /*Namespace*/ + + // Namespace. Namespace *string - /*Uploadfile - The pipeline to upload. Maximum size of 32MB is supported. + /* Uploadfile. + + The pipeline to upload. Maximum size of 32MB is supported. */ Uploadfile runtime.NamedReadCloser @@ -78,6 +81,21 @@ type UploadPipelineParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the upload pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadPipelineParams) WithDefaults() *UploadPipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the upload pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadPipelineParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the upload pipeline params func (o *UploadPipelineParams) WithTimeout(timeout time.Duration) *UploadPipelineParams { o.SetTimeout(timeout) @@ -167,50 +185,52 @@ func (o *UploadPipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfm // query param description var qrDescription string + if o.Description != nil { qrDescription = *o.Description } qDescription := qrDescription if qDescription != "" { + if err := r.SetQueryParam("description", qDescription); err != nil { return err } } - } if o.Name != nil { // query param name var qrName string + if o.Name != nil { qrName = *o.Name } qName := qrName if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { return err } } - } if o.Namespace != nil { // query param namespace var qrNamespace string + if o.Namespace != nil { qrNamespace = *o.Namespace } qNamespace := qrNamespace if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { return err } } - } - // form file param uploadfile if err := r.SetFileParam("uploadfile", o.Uploadfile); err != nil { return err diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go index 0e40fa36663..0be5a05c0d4 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go @@ -6,14 +6,14 @@ package pipeline_upload_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_upload_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_upload_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_upload_model" ) // UploadPipelineReader is a Reader for the UploadPipeline structure. @@ -24,14 +24,12 @@ type UploadPipelineReader struct { // ReadResponse reads a server response into the received o. func (o *UploadPipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewUploadPipelineOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewUploadPipelineDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewUploadPipelineOK() *UploadPipelineOK { return &UploadPipelineOK{} } -/*UploadPipelineOK handles this case with default header values. +/* +UploadPipelineOK describes a response with status code 200, with default header values. UploadPipelineOK upload pipeline o k */ @@ -57,8 +56,48 @@ type UploadPipelineOK struct { Payload *pipeline_upload_model.APIPipeline } +// IsSuccess returns true when this upload pipeline o k response has a 2xx status code +func (o *UploadPipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this upload pipeline o k response has a 3xx status code +func (o *UploadPipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this upload pipeline o k response has a 4xx status code +func (o *UploadPipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this upload pipeline o k response has a 5xx status code +func (o *UploadPipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this upload pipeline o k response a status code equal to that given +func (o *UploadPipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the upload pipeline o k response +func (o *UploadPipelineOK) Code() int { + return 200 +} + func (o *UploadPipelineOK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload][%d] uploadPipelineOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload][%d] uploadPipelineOK %s", 200, payload) +} + +func (o *UploadPipelineOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload][%d] uploadPipelineOK %s", 200, payload) +} + +func (o *UploadPipelineOK) GetPayload() *pipeline_upload_model.APIPipeline { + return o.Payload } func (o *UploadPipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,7 +119,8 @@ func NewUploadPipelineDefault(code int) *UploadPipelineDefault { } } -/*UploadPipelineDefault handles this case with default header values. +/* +UploadPipelineDefault describes a response with status code -1, with default header values. UploadPipelineDefault upload pipeline default */ @@ -90,13 +130,48 @@ type UploadPipelineDefault struct { Payload *pipeline_upload_model.APIStatus } +// IsSuccess returns true when this upload pipeline default response has a 2xx status code +func (o *UploadPipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this upload pipeline default response has a 3xx status code +func (o *UploadPipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this upload pipeline default response has a 4xx status code +func (o *UploadPipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this upload pipeline default response has a 5xx status code +func (o *UploadPipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this upload pipeline default response a status code equal to that given +func (o *UploadPipelineDefault) IsCode(code int) bool { + return o._statusCode == code +} + // Code gets the status code for the upload pipeline default response func (o *UploadPipelineDefault) Code() int { return o._statusCode } func (o *UploadPipelineDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload][%d] UploadPipeline default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload][%d] UploadPipeline default %s", o._statusCode, payload) +} + +func (o *UploadPipelineDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload][%d] UploadPipeline default %s", o._statusCode, payload) +} + +func (o *UploadPipelineDefault) GetPayload() *pipeline_upload_model.APIStatus { + return o.Payload } func (o *UploadPipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go index 863e9c58741..e6d3e84fc0f 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go @@ -13,65 +13,69 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewUploadPipelineVersionParams creates a new UploadPipelineVersionParams object -// with the default values initialized. +// NewUploadPipelineVersionParams creates a new UploadPipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewUploadPipelineVersionParams() *UploadPipelineVersionParams { - var () return &UploadPipelineVersionParams{ - timeout: cr.DefaultTimeout, } } // NewUploadPipelineVersionParamsWithTimeout creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewUploadPipelineVersionParamsWithTimeout(timeout time.Duration) *UploadPipelineVersionParams { - var () return &UploadPipelineVersionParams{ - timeout: timeout, } } // NewUploadPipelineVersionParamsWithContext creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewUploadPipelineVersionParamsWithContext(ctx context.Context) *UploadPipelineVersionParams { - var () return &UploadPipelineVersionParams{ - Context: ctx, } } // NewUploadPipelineVersionParamsWithHTTPClient creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewUploadPipelineVersionParamsWithHTTPClient(client *http.Client) *UploadPipelineVersionParams { - var () return &UploadPipelineVersionParams{ HTTPClient: client, } } -/*UploadPipelineVersionParams contains all the parameters to send to the API endpoint -for the upload pipeline version operation typically these are written to a http.Request +/* +UploadPipelineVersionParams contains all the parameters to send to the API endpoint + + for the upload pipeline version operation. + + Typically these are written to a http.Request. */ type UploadPipelineVersionParams struct { - /*Description*/ + // Description. Description *string - /*Name*/ + + // Name. Name *string - /*Namespace*/ + + // Namespace. Namespace *string - /*Pipelineid*/ + + // Pipelineid. Pipelineid *string - /*Uploadfile - The pipeline to upload. Maximum size of 32MB is supported. + /* Uploadfile. + + The pipeline to upload. Maximum size of 32MB is supported. */ Uploadfile runtime.NamedReadCloser @@ -80,6 +84,21 @@ type UploadPipelineVersionParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the upload pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadPipelineVersionParams) WithDefaults() *UploadPipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the upload pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadPipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the upload pipeline version params func (o *UploadPipelineVersionParams) WithTimeout(timeout time.Duration) *UploadPipelineVersionParams { o.SetTimeout(timeout) @@ -180,66 +199,69 @@ func (o *UploadPipelineVersionParams) WriteToRequest(r runtime.ClientRequest, re // query param description var qrDescription string + if o.Description != nil { qrDescription = *o.Description } qDescription := qrDescription if qDescription != "" { + if err := r.SetQueryParam("description", qDescription); err != nil { return err } } - } if o.Name != nil { // query param name var qrName string + if o.Name != nil { qrName = *o.Name } qName := qrName if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { return err } } - } if o.Namespace != nil { // query param namespace var qrNamespace string + if o.Namespace != nil { qrNamespace = *o.Namespace } qNamespace := qrNamespace if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { return err } } - } if o.Pipelineid != nil { // query param pipelineid var qrPipelineid string + if o.Pipelineid != nil { qrPipelineid = *o.Pipelineid } qPipelineid := qrPipelineid if qPipelineid != "" { + if err := r.SetQueryParam("pipelineid", qPipelineid); err != nil { return err } } - } - // form file param uploadfile if err := r.SetFileParam("uploadfile", o.Uploadfile); err != nil { return err diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go index fcb2e88dc1c..5b1790b916f 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go @@ -6,14 +6,14 @@ package pipeline_upload_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_upload_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_upload_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/pipeline_upload_model" ) // UploadPipelineVersionReader is a Reader for the UploadPipelineVersion structure. @@ -24,14 +24,12 @@ type UploadPipelineVersionReader struct { // ReadResponse reads a server response into the received o. func (o *UploadPipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewUploadPipelineVersionOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewUploadPipelineVersionDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewUploadPipelineVersionOK() *UploadPipelineVersionOK { return &UploadPipelineVersionOK{} } -/*UploadPipelineVersionOK handles this case with default header values. +/* +UploadPipelineVersionOK describes a response with status code 200, with default header values. UploadPipelineVersionOK upload pipeline version o k */ @@ -57,8 +56,48 @@ type UploadPipelineVersionOK struct { Payload *pipeline_upload_model.APIPipelineVersion } +// IsSuccess returns true when this upload pipeline version o k response has a 2xx status code +func (o *UploadPipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this upload pipeline version o k response has a 3xx status code +func (o *UploadPipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this upload pipeline version o k response has a 4xx status code +func (o *UploadPipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this upload pipeline version o k response has a 5xx status code +func (o *UploadPipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this upload pipeline version o k response a status code equal to that given +func (o *UploadPipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the upload pipeline version o k response +func (o *UploadPipelineVersionOK) Code() int { + return 200 +} + func (o *UploadPipelineVersionOK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload_version][%d] uploadPipelineVersionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload_version][%d] uploadPipelineVersionOK %s", 200, payload) +} + +func (o *UploadPipelineVersionOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload_version][%d] uploadPipelineVersionOK %s", 200, payload) +} + +func (o *UploadPipelineVersionOK) GetPayload() *pipeline_upload_model.APIPipelineVersion { + return o.Payload } func (o *UploadPipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,7 +119,8 @@ func NewUploadPipelineVersionDefault(code int) *UploadPipelineVersionDefault { } } -/*UploadPipelineVersionDefault handles this case with default header values. +/* +UploadPipelineVersionDefault describes a response with status code -1, with default header values. UploadPipelineVersionDefault upload pipeline version default */ @@ -90,13 +130,48 @@ type UploadPipelineVersionDefault struct { Payload *pipeline_upload_model.APIStatus } +// IsSuccess returns true when this upload pipeline version default response has a 2xx status code +func (o *UploadPipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this upload pipeline version default response has a 3xx status code +func (o *UploadPipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this upload pipeline version default response has a 4xx status code +func (o *UploadPipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this upload pipeline version default response has a 5xx status code +func (o *UploadPipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this upload pipeline version default response a status code equal to that given +func (o *UploadPipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + // Code gets the status code for the upload pipeline version default response func (o *UploadPipelineVersionDefault) Code() int { return o._statusCode } func (o *UploadPipelineVersionDefault) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload_version][%d] UploadPipelineVersion default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload_version][%d] UploadPipelineVersion default %s", o._statusCode, payload) +} + +func (o *UploadPipelineVersionDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/pipelines/upload_version][%d] UploadPipelineVersion default %s", o._statusCode, payload) +} + +func (o *UploadPipelineVersionDefault) GetPayload() *pipeline_upload_model.APIStatus { + return o.Payload } func (o *UploadPipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_parameter.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_parameter.go index f46f394429a..e9d8ab70597 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_parameter.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_parameter.go @@ -6,12 +6,14 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIParameter api parameter +// // swagger:model apiParameter type APIParameter struct { @@ -27,6 +29,11 @@ func (m *APIParameter) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api parameter based on context it is used +func (m *APIParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIParameter) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_pipeline.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_pipeline.go index ba9aa33bb04..c30926d0454 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_pipeline.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_pipeline.go @@ -6,16 +6,17 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APIPipeline api pipeline +// // swagger:model apiPipeline type APIPipeline struct { @@ -60,7 +61,6 @@ func (m *APIPipeline) Validate(formats strfmt.Registry) error { } func (m *APIPipeline) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -73,7 +73,6 @@ func (m *APIPipeline) validateCreatedAt(formats strfmt.Registry) error { } func (m *APIPipeline) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -87,6 +86,47 @@ func (m *APIPipeline) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api pipeline based on the context it is used +func (m *APIPipeline) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIPipeline) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + + if swag.IsZero(m.Parameters[i]) { // not required + return nil + } + + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_pipeline_version.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_pipeline_version.go index 1d6f169f7f0..3821c33972a 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_pipeline_version.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_pipeline_version.go @@ -6,16 +6,17 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APIPipelineVersion api pipeline version +// // swagger:model apiPipelineVersion type APIPipelineVersion struct { @@ -72,7 +73,6 @@ func (m *APIPipelineVersion) Validate(formats strfmt.Registry) error { } func (m *APIPipelineVersion) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -85,7 +85,6 @@ func (m *APIPipelineVersion) validateCreatedAt(formats strfmt.Registry) error { } func (m *APIPipelineVersion) validatePackageURL(formats strfmt.Registry) error { - if swag.IsZero(m.PackageURL) { // not required return nil } @@ -94,6 +93,8 @@ func (m *APIPipelineVersion) validatePackageURL(formats strfmt.Registry) error { if err := m.PackageURL.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") } return err } @@ -103,7 +104,6 @@ func (m *APIPipelineVersion) validatePackageURL(formats strfmt.Registry) error { } func (m *APIPipelineVersion) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -117,6 +117,8 @@ func (m *APIPipelineVersion) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -128,7 +130,6 @@ func (m *APIPipelineVersion) validateParameters(formats strfmt.Registry) error { } func (m *APIPipelineVersion) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -142,6 +143,101 @@ func (m *APIPipelineVersion) validateResourceReferences(formats strfmt.Registry) if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api pipeline version based on the context it is used +func (m *APIPipelineVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePackageURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIPipelineVersion) contextValidatePackageURL(ctx context.Context, formats strfmt.Registry) error { + + if m.PackageURL != nil { + + if swag.IsZero(m.PackageURL) { // not required + return nil + } + + if err := m.PackageURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") + } + return err + } + } + + return nil +} + +func (m *APIPipelineVersion) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + + if swag.IsZero(m.Parameters[i]) { // not required + return nil + } + + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIPipelineVersion) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + + if swag.IsZero(m.ResourceReferences[i]) { // not required + return nil + } + + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_relationship.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_relationship.go index b4f85b6da9a..9305d8e165b 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_relationship.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_relationship.go @@ -6,18 +6,28 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIRelationship api relationship +// // swagger:model apiRelationship type APIRelationship string +func NewAPIRelationship(value APIRelationship) *APIRelationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIRelationship. +func (m APIRelationship) Pointer() *APIRelationship { + return &m +} + const ( // APIRelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m APIRelationship) validateAPIRelationshipEnum(path, location string, value APIRelationship) error { - if err := validate.Enum(path, location, value, apiRelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiRelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m APIRelationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api relationship based on context it is used +func (m APIRelationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_key.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_key.go index 2242421be03..23bd4912f0d 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_key.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_key.go @@ -6,13 +6,15 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceKey api resource key +// // swagger:model apiResourceKey type APIResourceKey struct { @@ -20,7 +22,7 @@ type APIResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type APIResourceType `json:"type,omitempty"` + Type *APIResourceType `json:"type,omitempty"` } // Validate validates this api resource key @@ -38,16 +40,54 @@ func (m *APIResourceKey) Validate(formats strfmt.Registry) error { } func (m *APIResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource key based on the context it is used +func (m *APIResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_reference.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_reference.go index c5fcfce9441..501c4e3af4f 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_reference.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_reference.go @@ -6,13 +6,15 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceReference api resource reference +// // swagger:model apiResourceReference type APIResourceReference struct { @@ -23,7 +25,7 @@ type APIResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship APIRelationship `json:"relationship,omitempty"` + Relationship *APIRelationship `json:"relationship,omitempty"` } // Validate validates this api resource reference @@ -45,7 +47,6 @@ func (m *APIResourceReference) Validate(formats strfmt.Registry) error { } func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,79 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { } func (m *APIResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource reference based on the context it is used +func (m *APIResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + + if swag.IsZero(m.Key) { // not required + return nil + } + + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *APIResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + + if swag.IsZero(m.Relationship) { // not required + return nil + } + + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_type.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_type.go index b0fe8702d6e..39bc66c54f5 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_type.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_resource_type.go @@ -6,18 +6,28 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIResourceType api resource type +// // swagger:model apiResourceType type APIResourceType string +func NewAPIResourceType(value APIResourceType) *APIResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIResourceType. +func (m APIResourceType) Pointer() *APIResourceType { + return &m +} + const ( // APIResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m APIResourceType) validateAPIResourceTypeEnum(path, location string, value APIResourceType) error { - if err := validate.Enum(path, location, value, apiResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m APIResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api resource type based on context it is used +func (m APIResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_status.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_status.go index a1df8518689..2c9b53e2998 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_status.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_status.go @@ -6,15 +6,16 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIStatus api status +// // swagger:model apiStatus type APIStatus struct { @@ -43,7 +44,6 @@ func (m *APIStatus) Validate(formats strfmt.Registry) error { } func (m *APIStatus) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(m.Details) { // not required return nil } @@ -57,6 +57,47 @@ func (m *APIStatus) validateDetails(formats strfmt.Registry) error { if err := m.Details[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api status based on the context it is used +func (m *APIStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_url.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_url.go index b1ebfac3c25..19e9cb06865 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_url.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/api_url.go @@ -6,12 +6,14 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIURL api Url +// // swagger:model apiUrl type APIURL struct { @@ -24,6 +26,11 @@ func (m *APIURL) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api Url based on context it is used +func (m *APIURL) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIURL) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/pipeline_upload_model/protobuf_any.go b/backend/api/v1beta1/go_http_client/pipeline_upload_model/protobuf_any.go index 80a4d4cd71f..3031bdebdde 100644 --- a/backend/api/v1beta1/go_http_client/pipeline_upload_model/protobuf_any.go +++ b/backend/api/v1beta1/go_http_client/pipeline_upload_model/protobuf_any.go @@ -6,9 +6,9 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,42 +20,42 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -63,34 +63,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON // ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -129,26 +129,11 @@ type ProtobufAny struct { // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1beta1/go_http_client/run_client/run_client.go b/backend/api/v1beta1/go_http_client/run_client/run_client.go index bb259aa215b..3107d976141 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_client.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_client.go @@ -8,8 +8,7 @@ package run_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_client/run_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Run { cli := new(Run) cli.Transport = transport - cli.RunService = run_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Run is a client for run type Run struct { - RunService *run_service.Client + RunService run_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Run struct { // SetTransport changes the transport on the client and all its subresources func (c *Run) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.RunService.SetTransport(transport) - } diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_archive_run_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_archive_run_v1_parameters.go index bc5669fdc15..b6e0f6d8c72 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_archive_run_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_archive_run_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceArchiveRunV1Params creates a new RunServiceArchiveRunV1Params object -// with the default values initialized. +// NewRunServiceArchiveRunV1Params creates a new RunServiceArchiveRunV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceArchiveRunV1Params() *RunServiceArchiveRunV1Params { - var () return &RunServiceArchiveRunV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceArchiveRunV1ParamsWithTimeout creates a new RunServiceArchiveRunV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceArchiveRunV1ParamsWithTimeout(timeout time.Duration) *RunServiceArchiveRunV1Params { - var () return &RunServiceArchiveRunV1Params{ - timeout: timeout, } } // NewRunServiceArchiveRunV1ParamsWithContext creates a new RunServiceArchiveRunV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceArchiveRunV1ParamsWithContext(ctx context.Context) *RunServiceArchiveRunV1Params { - var () return &RunServiceArchiveRunV1Params{ - Context: ctx, } } // NewRunServiceArchiveRunV1ParamsWithHTTPClient creates a new RunServiceArchiveRunV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceArchiveRunV1ParamsWithHTTPClient(client *http.Client) *RunServiceArchiveRunV1Params { - var () return &RunServiceArchiveRunV1Params{ HTTPClient: client, } } -/*RunServiceArchiveRunV1Params contains all the parameters to send to the API endpoint -for the run service archive run v1 operation typically these are written to a http.Request +/* +RunServiceArchiveRunV1Params contains all the parameters to send to the API endpoint + + for the run service archive run v1 operation. + + Typically these are written to a http.Request. */ type RunServiceArchiveRunV1Params struct { - /*ID - The ID of the run to be archived. + /* ID. + The ID of the run to be archived. */ ID string @@ -72,6 +72,21 @@ type RunServiceArchiveRunV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service archive run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceArchiveRunV1Params) WithDefaults() *RunServiceArchiveRunV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service archive run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceArchiveRunV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service archive run v1 params func (o *RunServiceArchiveRunV1Params) WithTimeout(timeout time.Duration) *RunServiceArchiveRunV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_archive_run_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_archive_run_v1_responses.go index 3a9ae712c67..17611c8ed1c 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_archive_run_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_archive_run_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceArchiveRunV1Reader is a Reader for the RunServiceArchiveRunV1 structure. @@ -24,14 +24,12 @@ type RunServiceArchiveRunV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceArchiveRunV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceArchiveRunV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceArchiveRunV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceArchiveRunV1OK() *RunServiceArchiveRunV1OK { return &RunServiceArchiveRunV1OK{} } -/*RunServiceArchiveRunV1OK handles this case with default header values. +/* +RunServiceArchiveRunV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceArchiveRunV1OK struct { Payload interface{} } +// IsSuccess returns true when this run service archive run v1 o k response has a 2xx status code +func (o *RunServiceArchiveRunV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service archive run v1 o k response has a 3xx status code +func (o *RunServiceArchiveRunV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service archive run v1 o k response has a 4xx status code +func (o *RunServiceArchiveRunV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service archive run v1 o k response has a 5xx status code +func (o *RunServiceArchiveRunV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service archive run v1 o k response a status code equal to that given +func (o *RunServiceArchiveRunV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service archive run v1 o k response +func (o *RunServiceArchiveRunV1OK) Code() int { + return 200 +} + func (o *RunServiceArchiveRunV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:archive][%d] runServiceArchiveRunV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:archive][%d] runServiceArchiveRunV1OK %s", 200, payload) +} + +func (o *RunServiceArchiveRunV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:archive][%d] runServiceArchiveRunV1OK %s", 200, payload) +} + +func (o *RunServiceArchiveRunV1OK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceArchiveRunV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceArchiveRunV1Default(code int) *RunServiceArchiveRunV1Default { } } -/*RunServiceArchiveRunV1Default handles this case with default header values. +/* +RunServiceArchiveRunV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceArchiveRunV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service archive run v1 default response has a 2xx status code +func (o *RunServiceArchiveRunV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service archive run v1 default response has a 3xx status code +func (o *RunServiceArchiveRunV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service archive run v1 default response has a 4xx status code +func (o *RunServiceArchiveRunV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service archive run v1 default response has a 5xx status code +func (o *RunServiceArchiveRunV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service archive run v1 default response a status code equal to that given +func (o *RunServiceArchiveRunV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service archive run v1 default response @@ -94,12 +159,22 @@ func (o *RunServiceArchiveRunV1Default) Code() int { } func (o *RunServiceArchiveRunV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:archive][%d] RunService_ArchiveRunV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:archive][%d] RunService_ArchiveRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceArchiveRunV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:archive][%d] RunService_ArchiveRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceArchiveRunV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceArchiveRunV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_client.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_client.go index 2f1bc1883a2..0ded4c15bba 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_client.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_client.go @@ -7,15 +7,40 @@ package run_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new run service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new run service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new run service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for run service API */ @@ -24,16 +49,43 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + RunServiceArchiveRunV1(params *RunServiceArchiveRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceArchiveRunV1OK, error) + + RunServiceCreateRunV1(params *RunServiceCreateRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceCreateRunV1OK, error) + + RunServiceDeleteRunV1(params *RunServiceDeleteRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceDeleteRunV1OK, error) + + RunServiceGetRunV1(params *RunServiceGetRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceGetRunV1OK, error) + + RunServiceListRunsV1(params *RunServiceListRunsV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceListRunsV1OK, error) + + RunServiceReadArtifactV1(params *RunServiceReadArtifactV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReadArtifactV1OK, error) + + RunServiceReportRunMetricsV1(params *RunServiceReportRunMetricsV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReportRunMetricsV1OK, error) + + RunServiceRetryRunV1(params *RunServiceRetryRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceRetryRunV1OK, error) + + RunServiceTerminateRunV1(params *RunServiceTerminateRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceTerminateRunV1OK, error) + + RunServiceUnarchiveRunV1(params *RunServiceUnarchiveRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceUnarchiveRunV1OK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* RunServiceArchiveRunV1 archives a run */ -func (a *Client) RunServiceArchiveRunV1(params *RunServiceArchiveRunV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceArchiveRunV1OK, error) { +func (a *Client) RunServiceArchiveRunV1(params *RunServiceArchiveRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceArchiveRunV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceArchiveRunV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_ArchiveRunV1", Method: "POST", PathPattern: "/apis/v1beta1/runs/{id}:archive", @@ -45,24 +97,33 @@ func (a *Client) RunServiceArchiveRunV1(params *RunServiceArchiveRunV1Params, au AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceArchiveRunV1OK), nil - + success, ok := result.(*RunServiceArchiveRunV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceArchiveRunV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceCreateRunV1 creates a new run */ -func (a *Client) RunServiceCreateRunV1(params *RunServiceCreateRunV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceCreateRunV1OK, error) { +func (a *Client) RunServiceCreateRunV1(params *RunServiceCreateRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceCreateRunV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceCreateRunV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_CreateRunV1", Method: "POST", PathPattern: "/apis/v1beta1/runs", @@ -74,24 +135,33 @@ func (a *Client) RunServiceCreateRunV1(params *RunServiceCreateRunV1Params, auth AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceCreateRunV1OK), nil - + success, ok := result.(*RunServiceCreateRunV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceCreateRunV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceDeleteRunV1 deletes a run */ -func (a *Client) RunServiceDeleteRunV1(params *RunServiceDeleteRunV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceDeleteRunV1OK, error) { +func (a *Client) RunServiceDeleteRunV1(params *RunServiceDeleteRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceDeleteRunV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceDeleteRunV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_DeleteRunV1", Method: "DELETE", PathPattern: "/apis/v1beta1/runs/{id}", @@ -103,24 +173,33 @@ func (a *Client) RunServiceDeleteRunV1(params *RunServiceDeleteRunV1Params, auth AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceDeleteRunV1OK), nil - + success, ok := result.(*RunServiceDeleteRunV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceDeleteRunV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceGetRunV1 finds a specific run by ID */ -func (a *Client) RunServiceGetRunV1(params *RunServiceGetRunV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceGetRunV1OK, error) { +func (a *Client) RunServiceGetRunV1(params *RunServiceGetRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceGetRunV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceGetRunV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_GetRunV1", Method: "GET", PathPattern: "/apis/v1beta1/runs/{run_id}", @@ -132,24 +211,33 @@ func (a *Client) RunServiceGetRunV1(params *RunServiceGetRunV1Params, authInfo r AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceGetRunV1OK), nil - + success, ok := result.(*RunServiceGetRunV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceGetRunV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceListRunsV1 finds all runs */ -func (a *Client) RunServiceListRunsV1(params *RunServiceListRunsV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceListRunsV1OK, error) { +func (a *Client) RunServiceListRunsV1(params *RunServiceListRunsV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceListRunsV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceListRunsV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_ListRunsV1", Method: "GET", PathPattern: "/apis/v1beta1/runs", @@ -161,24 +249,33 @@ func (a *Client) RunServiceListRunsV1(params *RunServiceListRunsV1Params, authIn AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceListRunsV1OK), nil - + success, ok := result.(*RunServiceListRunsV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceListRunsV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceReadArtifactV1 finds a run s artifact data */ -func (a *Client) RunServiceReadArtifactV1(params *RunServiceReadArtifactV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceReadArtifactV1OK, error) { +func (a *Client) RunServiceReadArtifactV1(params *RunServiceReadArtifactV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReadArtifactV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceReadArtifactV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_ReadArtifactV1", Method: "GET", PathPattern: "/apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read", @@ -190,24 +287,33 @@ func (a *Client) RunServiceReadArtifactV1(params *RunServiceReadArtifactV1Params AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceReadArtifactV1OK), nil - + success, ok := result.(*RunServiceReadArtifactV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceReadArtifactV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceReportRunMetricsV1 reports run metrics reports metrics of a run each metric is reported in its own transaction so this API accepts partial failures metric can be uniquely identified by run id node id name duplicate reporting will be ignored by the API first reporting wins */ -func (a *Client) RunServiceReportRunMetricsV1(params *RunServiceReportRunMetricsV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceReportRunMetricsV1OK, error) { +func (a *Client) RunServiceReportRunMetricsV1(params *RunServiceReportRunMetricsV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReportRunMetricsV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceReportRunMetricsV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_ReportRunMetricsV1", Method: "POST", PathPattern: "/apis/v1beta1/runs/{run_id}:reportMetrics", @@ -219,24 +325,33 @@ func (a *Client) RunServiceReportRunMetricsV1(params *RunServiceReportRunMetrics AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceReportRunMetricsV1OK), nil - + success, ok := result.(*RunServiceReportRunMetricsV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceReportRunMetricsV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceRetryRunV1 res initiates a failed or terminated run */ -func (a *Client) RunServiceRetryRunV1(params *RunServiceRetryRunV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceRetryRunV1OK, error) { +func (a *Client) RunServiceRetryRunV1(params *RunServiceRetryRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceRetryRunV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceRetryRunV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_RetryRunV1", Method: "POST", PathPattern: "/apis/v1beta1/runs/{run_id}/retry", @@ -248,24 +363,33 @@ func (a *Client) RunServiceRetryRunV1(params *RunServiceRetryRunV1Params, authIn AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceRetryRunV1OK), nil - + success, ok := result.(*RunServiceRetryRunV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceRetryRunV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceTerminateRunV1 terminates an active run */ -func (a *Client) RunServiceTerminateRunV1(params *RunServiceTerminateRunV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceTerminateRunV1OK, error) { +func (a *Client) RunServiceTerminateRunV1(params *RunServiceTerminateRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceTerminateRunV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceTerminateRunV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_TerminateRunV1", Method: "POST", PathPattern: "/apis/v1beta1/runs/{run_id}/terminate", @@ -277,24 +401,33 @@ func (a *Client) RunServiceTerminateRunV1(params *RunServiceTerminateRunV1Params AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceTerminateRunV1OK), nil - + success, ok := result.(*RunServiceTerminateRunV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceTerminateRunV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceUnarchiveRunV1 restores an archived run */ -func (a *Client) RunServiceUnarchiveRunV1(params *RunServiceUnarchiveRunV1Params, authInfo runtime.ClientAuthInfoWriter) (*RunServiceUnarchiveRunV1OK, error) { +func (a *Client) RunServiceUnarchiveRunV1(params *RunServiceUnarchiveRunV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceUnarchiveRunV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceUnarchiveRunV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_UnarchiveRunV1", Method: "POST", PathPattern: "/apis/v1beta1/runs/{id}:unarchive", @@ -306,12 +439,22 @@ func (a *Client) RunServiceUnarchiveRunV1(params *RunServiceUnarchiveRunV1Params AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceUnarchiveRunV1OK), nil - + success, ok := result.(*RunServiceUnarchiveRunV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceUnarchiveRunV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_create_run_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_create_run_v1_parameters.go index 39f756db49f..ec0e00f67f9 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_create_run_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_create_run_v1_parameters.go @@ -13,64 +13,79 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) -// NewRunServiceCreateRunV1Params creates a new RunServiceCreateRunV1Params object -// with the default values initialized. +// NewRunServiceCreateRunV1Params creates a new RunServiceCreateRunV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceCreateRunV1Params() *RunServiceCreateRunV1Params { - var () return &RunServiceCreateRunV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceCreateRunV1ParamsWithTimeout creates a new RunServiceCreateRunV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceCreateRunV1ParamsWithTimeout(timeout time.Duration) *RunServiceCreateRunV1Params { - var () return &RunServiceCreateRunV1Params{ - timeout: timeout, } } // NewRunServiceCreateRunV1ParamsWithContext creates a new RunServiceCreateRunV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceCreateRunV1ParamsWithContext(ctx context.Context) *RunServiceCreateRunV1Params { - var () return &RunServiceCreateRunV1Params{ - Context: ctx, } } // NewRunServiceCreateRunV1ParamsWithHTTPClient creates a new RunServiceCreateRunV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceCreateRunV1ParamsWithHTTPClient(client *http.Client) *RunServiceCreateRunV1Params { - var () return &RunServiceCreateRunV1Params{ HTTPClient: client, } } -/*RunServiceCreateRunV1Params contains all the parameters to send to the API endpoint -for the run service create run v1 operation typically these are written to a http.Request +/* +RunServiceCreateRunV1Params contains all the parameters to send to the API endpoint + + for the run service create run v1 operation. + + Typically these are written to a http.Request. */ type RunServiceCreateRunV1Params struct { - /*Body*/ - Body *run_model.APIRun + // Run. + Run *run_model.APIRun timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service create run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceCreateRunV1Params) WithDefaults() *RunServiceCreateRunV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service create run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceCreateRunV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service create run v1 params func (o *RunServiceCreateRunV1Params) WithTimeout(timeout time.Duration) *RunServiceCreateRunV1Params { o.SetTimeout(timeout) @@ -104,15 +119,15 @@ func (o *RunServiceCreateRunV1Params) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the run service create run v1 params -func (o *RunServiceCreateRunV1Params) WithBody(body *run_model.APIRun) *RunServiceCreateRunV1Params { - o.SetBody(body) +// WithRun adds the run to the run service create run v1 params +func (o *RunServiceCreateRunV1Params) WithRun(run *run_model.APIRun) *RunServiceCreateRunV1Params { + o.SetRun(run) return o } -// SetBody adds the body to the run service create run v1 params -func (o *RunServiceCreateRunV1Params) SetBody(body *run_model.APIRun) { - o.Body = body +// SetRun adds the run to the run service create run v1 params +func (o *RunServiceCreateRunV1Params) SetRun(run *run_model.APIRun) { + o.Run = run } // WriteToRequest writes these params to a swagger request @@ -122,9 +137,8 @@ func (o *RunServiceCreateRunV1Params) WriteToRequest(r runtime.ClientRequest, re return err } var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { + if o.Run != nil { + if err := r.SetBodyParam(o.Run); err != nil { return err } } diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_create_run_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_create_run_v1_responses.go index 76f91566331..9f7f9bda9f4 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_create_run_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_create_run_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceCreateRunV1Reader is a Reader for the RunServiceCreateRunV1 structure. @@ -24,14 +24,12 @@ type RunServiceCreateRunV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceCreateRunV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceCreateRunV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceCreateRunV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceCreateRunV1OK() *RunServiceCreateRunV1OK { return &RunServiceCreateRunV1OK{} } -/*RunServiceCreateRunV1OK handles this case with default header values. +/* +RunServiceCreateRunV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceCreateRunV1OK struct { Payload *run_model.APIRunDetail } +// IsSuccess returns true when this run service create run v1 o k response has a 2xx status code +func (o *RunServiceCreateRunV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service create run v1 o k response has a 3xx status code +func (o *RunServiceCreateRunV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service create run v1 o k response has a 4xx status code +func (o *RunServiceCreateRunV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service create run v1 o k response has a 5xx status code +func (o *RunServiceCreateRunV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service create run v1 o k response a status code equal to that given +func (o *RunServiceCreateRunV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service create run v1 o k response +func (o *RunServiceCreateRunV1OK) Code() int { + return 200 +} + func (o *RunServiceCreateRunV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs][%d] runServiceCreateRunV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs][%d] runServiceCreateRunV1OK %s", 200, payload) +} + +func (o *RunServiceCreateRunV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs][%d] runServiceCreateRunV1OK %s", 200, payload) +} + +func (o *RunServiceCreateRunV1OK) GetPayload() *run_model.APIRunDetail { + return o.Payload } func (o *RunServiceCreateRunV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceCreateRunV1Default(code int) *RunServiceCreateRunV1Default { } } -/*RunServiceCreateRunV1Default handles this case with default header values. +/* +RunServiceCreateRunV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceCreateRunV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service create run v1 default response has a 2xx status code +func (o *RunServiceCreateRunV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service create run v1 default response has a 3xx status code +func (o *RunServiceCreateRunV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service create run v1 default response has a 4xx status code +func (o *RunServiceCreateRunV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service create run v1 default response has a 5xx status code +func (o *RunServiceCreateRunV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service create run v1 default response a status code equal to that given +func (o *RunServiceCreateRunV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service create run v1 default response @@ -96,12 +161,22 @@ func (o *RunServiceCreateRunV1Default) Code() int { } func (o *RunServiceCreateRunV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs][%d] RunService_CreateRunV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs][%d] RunService_CreateRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceCreateRunV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs][%d] RunService_CreateRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceCreateRunV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceCreateRunV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_delete_run_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_delete_run_v1_parameters.go index 1196b4c0ac1..ff9d11d039e 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_delete_run_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_delete_run_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceDeleteRunV1Params creates a new RunServiceDeleteRunV1Params object -// with the default values initialized. +// NewRunServiceDeleteRunV1Params creates a new RunServiceDeleteRunV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceDeleteRunV1Params() *RunServiceDeleteRunV1Params { - var () return &RunServiceDeleteRunV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceDeleteRunV1ParamsWithTimeout creates a new RunServiceDeleteRunV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceDeleteRunV1ParamsWithTimeout(timeout time.Duration) *RunServiceDeleteRunV1Params { - var () return &RunServiceDeleteRunV1Params{ - timeout: timeout, } } // NewRunServiceDeleteRunV1ParamsWithContext creates a new RunServiceDeleteRunV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceDeleteRunV1ParamsWithContext(ctx context.Context) *RunServiceDeleteRunV1Params { - var () return &RunServiceDeleteRunV1Params{ - Context: ctx, } } // NewRunServiceDeleteRunV1ParamsWithHTTPClient creates a new RunServiceDeleteRunV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceDeleteRunV1ParamsWithHTTPClient(client *http.Client) *RunServiceDeleteRunV1Params { - var () return &RunServiceDeleteRunV1Params{ HTTPClient: client, } } -/*RunServiceDeleteRunV1Params contains all the parameters to send to the API endpoint -for the run service delete run v1 operation typically these are written to a http.Request +/* +RunServiceDeleteRunV1Params contains all the parameters to send to the API endpoint + + for the run service delete run v1 operation. + + Typically these are written to a http.Request. */ type RunServiceDeleteRunV1Params struct { - /*ID - The ID of the run to be deleted. + /* ID. + The ID of the run to be deleted. */ ID string @@ -72,6 +72,21 @@ type RunServiceDeleteRunV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service delete run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceDeleteRunV1Params) WithDefaults() *RunServiceDeleteRunV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service delete run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceDeleteRunV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service delete run v1 params func (o *RunServiceDeleteRunV1Params) WithTimeout(timeout time.Duration) *RunServiceDeleteRunV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_delete_run_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_delete_run_v1_responses.go index 22f486f9183..6940f001be5 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_delete_run_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_delete_run_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceDeleteRunV1Reader is a Reader for the RunServiceDeleteRunV1 structure. @@ -24,14 +24,12 @@ type RunServiceDeleteRunV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceDeleteRunV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceDeleteRunV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceDeleteRunV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceDeleteRunV1OK() *RunServiceDeleteRunV1OK { return &RunServiceDeleteRunV1OK{} } -/*RunServiceDeleteRunV1OK handles this case with default header values. +/* +RunServiceDeleteRunV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceDeleteRunV1OK struct { Payload interface{} } +// IsSuccess returns true when this run service delete run v1 o k response has a 2xx status code +func (o *RunServiceDeleteRunV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service delete run v1 o k response has a 3xx status code +func (o *RunServiceDeleteRunV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service delete run v1 o k response has a 4xx status code +func (o *RunServiceDeleteRunV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service delete run v1 o k response has a 5xx status code +func (o *RunServiceDeleteRunV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service delete run v1 o k response a status code equal to that given +func (o *RunServiceDeleteRunV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service delete run v1 o k response +func (o *RunServiceDeleteRunV1OK) Code() int { + return 200 +} + func (o *RunServiceDeleteRunV1OK) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/runs/{id}][%d] runServiceDeleteRunV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/runs/{id}][%d] runServiceDeleteRunV1OK %s", 200, payload) +} + +func (o *RunServiceDeleteRunV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/runs/{id}][%d] runServiceDeleteRunV1OK %s", 200, payload) +} + +func (o *RunServiceDeleteRunV1OK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceDeleteRunV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceDeleteRunV1Default(code int) *RunServiceDeleteRunV1Default { } } -/*RunServiceDeleteRunV1Default handles this case with default header values. +/* +RunServiceDeleteRunV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceDeleteRunV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service delete run v1 default response has a 2xx status code +func (o *RunServiceDeleteRunV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service delete run v1 default response has a 3xx status code +func (o *RunServiceDeleteRunV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service delete run v1 default response has a 4xx status code +func (o *RunServiceDeleteRunV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service delete run v1 default response has a 5xx status code +func (o *RunServiceDeleteRunV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service delete run v1 default response a status code equal to that given +func (o *RunServiceDeleteRunV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service delete run v1 default response @@ -94,12 +159,22 @@ func (o *RunServiceDeleteRunV1Default) Code() int { } func (o *RunServiceDeleteRunV1Default) Error() string { - return fmt.Sprintf("[DELETE /apis/v1beta1/runs/{id}][%d] RunService_DeleteRunV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/runs/{id}][%d] RunService_DeleteRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceDeleteRunV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v1beta1/runs/{id}][%d] RunService_DeleteRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceDeleteRunV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceDeleteRunV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_get_run_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_get_run_v1_parameters.go index f29b799f4d8..860756a1b39 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_get_run_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_get_run_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceGetRunV1Params creates a new RunServiceGetRunV1Params object -// with the default values initialized. +// NewRunServiceGetRunV1Params creates a new RunServiceGetRunV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceGetRunV1Params() *RunServiceGetRunV1Params { - var () return &RunServiceGetRunV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceGetRunV1ParamsWithTimeout creates a new RunServiceGetRunV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceGetRunV1ParamsWithTimeout(timeout time.Duration) *RunServiceGetRunV1Params { - var () return &RunServiceGetRunV1Params{ - timeout: timeout, } } // NewRunServiceGetRunV1ParamsWithContext creates a new RunServiceGetRunV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceGetRunV1ParamsWithContext(ctx context.Context) *RunServiceGetRunV1Params { - var () return &RunServiceGetRunV1Params{ - Context: ctx, } } // NewRunServiceGetRunV1ParamsWithHTTPClient creates a new RunServiceGetRunV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceGetRunV1ParamsWithHTTPClient(client *http.Client) *RunServiceGetRunV1Params { - var () return &RunServiceGetRunV1Params{ HTTPClient: client, } } -/*RunServiceGetRunV1Params contains all the parameters to send to the API endpoint -for the run service get run v1 operation typically these are written to a http.Request +/* +RunServiceGetRunV1Params contains all the parameters to send to the API endpoint + + for the run service get run v1 operation. + + Typically these are written to a http.Request. */ type RunServiceGetRunV1Params struct { - /*RunID - The ID of the run to be retrieved. + /* RunID. + The ID of the run to be retrieved. */ RunID string @@ -72,6 +72,21 @@ type RunServiceGetRunV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service get run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceGetRunV1Params) WithDefaults() *RunServiceGetRunV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service get run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceGetRunV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service get run v1 params func (o *RunServiceGetRunV1Params) WithTimeout(timeout time.Duration) *RunServiceGetRunV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_get_run_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_get_run_v1_responses.go index 93c31defca7..e35617ef39c 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_get_run_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_get_run_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceGetRunV1Reader is a Reader for the RunServiceGetRunV1 structure. @@ -24,14 +24,12 @@ type RunServiceGetRunV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceGetRunV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceGetRunV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceGetRunV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceGetRunV1OK() *RunServiceGetRunV1OK { return &RunServiceGetRunV1OK{} } -/*RunServiceGetRunV1OK handles this case with default header values. +/* +RunServiceGetRunV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceGetRunV1OK struct { Payload *run_model.APIRunDetail } +// IsSuccess returns true when this run service get run v1 o k response has a 2xx status code +func (o *RunServiceGetRunV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service get run v1 o k response has a 3xx status code +func (o *RunServiceGetRunV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service get run v1 o k response has a 4xx status code +func (o *RunServiceGetRunV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service get run v1 o k response has a 5xx status code +func (o *RunServiceGetRunV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service get run v1 o k response a status code equal to that given +func (o *RunServiceGetRunV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service get run v1 o k response +func (o *RunServiceGetRunV1OK) Code() int { + return 200 +} + func (o *RunServiceGetRunV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}][%d] runServiceGetRunV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}][%d] runServiceGetRunV1OK %s", 200, payload) +} + +func (o *RunServiceGetRunV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}][%d] runServiceGetRunV1OK %s", 200, payload) +} + +func (o *RunServiceGetRunV1OK) GetPayload() *run_model.APIRunDetail { + return o.Payload } func (o *RunServiceGetRunV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceGetRunV1Default(code int) *RunServiceGetRunV1Default { } } -/*RunServiceGetRunV1Default handles this case with default header values. +/* +RunServiceGetRunV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceGetRunV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service get run v1 default response has a 2xx status code +func (o *RunServiceGetRunV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service get run v1 default response has a 3xx status code +func (o *RunServiceGetRunV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service get run v1 default response has a 4xx status code +func (o *RunServiceGetRunV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service get run v1 default response has a 5xx status code +func (o *RunServiceGetRunV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service get run v1 default response a status code equal to that given +func (o *RunServiceGetRunV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service get run v1 default response @@ -96,12 +161,22 @@ func (o *RunServiceGetRunV1Default) Code() int { } func (o *RunServiceGetRunV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}][%d] RunService_GetRunV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}][%d] RunService_GetRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceGetRunV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}][%d] RunService_GetRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceGetRunV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceGetRunV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_list_runs_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_list_runs_v1_parameters.go index ab84f6e5485..2d51a20b2ca 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_list_runs_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_list_runs_v1_parameters.go @@ -13,101 +13,98 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewRunServiceListRunsV1Params creates a new RunServiceListRunsV1Params object -// with the default values initialized. +// NewRunServiceListRunsV1Params creates a new RunServiceListRunsV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceListRunsV1Params() *RunServiceListRunsV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &RunServiceListRunsV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - timeout: cr.DefaultTimeout, } } // NewRunServiceListRunsV1ParamsWithTimeout creates a new RunServiceListRunsV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceListRunsV1ParamsWithTimeout(timeout time.Duration) *RunServiceListRunsV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &RunServiceListRunsV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - timeout: timeout, } } // NewRunServiceListRunsV1ParamsWithContext creates a new RunServiceListRunsV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceListRunsV1ParamsWithContext(ctx context.Context) *RunServiceListRunsV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &RunServiceListRunsV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - Context: ctx, } } // NewRunServiceListRunsV1ParamsWithHTTPClient creates a new RunServiceListRunsV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceListRunsV1ParamsWithHTTPClient(client *http.Client) *RunServiceListRunsV1Params { - var ( - resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") - ) return &RunServiceListRunsV1Params{ - ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, - HTTPClient: client, + HTTPClient: client, } } -/*RunServiceListRunsV1Params contains all the parameters to send to the API endpoint -for the run service list runs v1 operation typically these are written to a http.Request +/* +RunServiceListRunsV1Params contains all the parameters to send to the API endpoint + + for the run service list runs v1 operation. + + Typically these are written to a http.Request. */ type RunServiceListRunsV1Params struct { - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). + /* Filter. + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). */ Filter *string - /*PageSize - The number of runs to be listed per page. If there are more runs than this + + /* PageSize. + + The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the next page of results. The token is acquried + + /* PageToken. + + A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page. - */ PageToken *string - /*ResourceReferenceKeyID - The ID of the resource that referred to. + /* ResourceReferenceKeyID. + + The ID of the resource that referred to. */ ResourceReferenceKeyID *string - /*ResourceReferenceKeyType - The type of the resource that referred to. + /* ResourceReferenceKeyType. + + The type of the resource that referred to. + + Default: "UNKNOWN_RESOURCE_TYPE" */ ResourceReferenceKeyType *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - (Example, "name asc" or "id desc"). Ascending by default. + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + (Example, "name asc" or "id desc"). Ascending by default. */ SortBy *string @@ -116,6 +113,32 @@ type RunServiceListRunsV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service list runs v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceListRunsV1Params) WithDefaults() *RunServiceListRunsV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service list runs v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceListRunsV1Params) SetDefaults() { + var ( + resourceReferenceKeyTypeDefault = string("UNKNOWN_RESOURCE_TYPE") + ) + + val := RunServiceListRunsV1Params{ + ResourceReferenceKeyType: &resourceReferenceKeyTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + // WithTimeout adds the timeout to the run service list runs v1 params func (o *RunServiceListRunsV1Params) WithTimeout(timeout time.Duration) *RunServiceListRunsV1Params { o.SetTimeout(timeout) @@ -227,96 +250,102 @@ func (o *RunServiceListRunsV1Params) WriteToRequest(r runtime.ClientRequest, reg // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.ResourceReferenceKeyID != nil { // query param resource_reference_key.id var qrResourceReferenceKeyID string + if o.ResourceReferenceKeyID != nil { qrResourceReferenceKeyID = *o.ResourceReferenceKeyID } qResourceReferenceKeyID := qrResourceReferenceKeyID if qResourceReferenceKeyID != "" { + if err := r.SetQueryParam("resource_reference_key.id", qResourceReferenceKeyID); err != nil { return err } } - } if o.ResourceReferenceKeyType != nil { // query param resource_reference_key.type var qrResourceReferenceKeyType string + if o.ResourceReferenceKeyType != nil { qrResourceReferenceKeyType = *o.ResourceReferenceKeyType } qResourceReferenceKeyType := qrResourceReferenceKeyType if qResourceReferenceKeyType != "" { + if err := r.SetQueryParam("resource_reference_key.type", qResourceReferenceKeyType); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_list_runs_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_list_runs_v1_responses.go index a3054546c3f..fe0b5d0c8bb 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_list_runs_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_list_runs_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceListRunsV1Reader is a Reader for the RunServiceListRunsV1 structure. @@ -24,14 +24,12 @@ type RunServiceListRunsV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceListRunsV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceListRunsV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceListRunsV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceListRunsV1OK() *RunServiceListRunsV1OK { return &RunServiceListRunsV1OK{} } -/*RunServiceListRunsV1OK handles this case with default header values. +/* +RunServiceListRunsV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceListRunsV1OK struct { Payload *run_model.APIListRunsResponse } +// IsSuccess returns true when this run service list runs v1 o k response has a 2xx status code +func (o *RunServiceListRunsV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service list runs v1 o k response has a 3xx status code +func (o *RunServiceListRunsV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service list runs v1 o k response has a 4xx status code +func (o *RunServiceListRunsV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service list runs v1 o k response has a 5xx status code +func (o *RunServiceListRunsV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service list runs v1 o k response a status code equal to that given +func (o *RunServiceListRunsV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service list runs v1 o k response +func (o *RunServiceListRunsV1OK) Code() int { + return 200 +} + func (o *RunServiceListRunsV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/runs][%d] runServiceListRunsV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs][%d] runServiceListRunsV1OK %s", 200, payload) +} + +func (o *RunServiceListRunsV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs][%d] runServiceListRunsV1OK %s", 200, payload) +} + +func (o *RunServiceListRunsV1OK) GetPayload() *run_model.APIListRunsResponse { + return o.Payload } func (o *RunServiceListRunsV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceListRunsV1Default(code int) *RunServiceListRunsV1Default { } } -/*RunServiceListRunsV1Default handles this case with default header values. +/* +RunServiceListRunsV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceListRunsV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service list runs v1 default response has a 2xx status code +func (o *RunServiceListRunsV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service list runs v1 default response has a 3xx status code +func (o *RunServiceListRunsV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service list runs v1 default response has a 4xx status code +func (o *RunServiceListRunsV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service list runs v1 default response has a 5xx status code +func (o *RunServiceListRunsV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service list runs v1 default response a status code equal to that given +func (o *RunServiceListRunsV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service list runs v1 default response @@ -96,12 +161,22 @@ func (o *RunServiceListRunsV1Default) Code() int { } func (o *RunServiceListRunsV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/runs][%d] RunService_ListRunsV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs][%d] RunService_ListRunsV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceListRunsV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs][%d] RunService_ListRunsV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceListRunsV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceListRunsV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_read_artifact_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_read_artifact_v1_parameters.go index 3eddf4d2933..5425fdfa71a 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_read_artifact_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_read_artifact_v1_parameters.go @@ -13,67 +13,69 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceReadArtifactV1Params creates a new RunServiceReadArtifactV1Params object -// with the default values initialized. +// NewRunServiceReadArtifactV1Params creates a new RunServiceReadArtifactV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceReadArtifactV1Params() *RunServiceReadArtifactV1Params { - var () return &RunServiceReadArtifactV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceReadArtifactV1ParamsWithTimeout creates a new RunServiceReadArtifactV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceReadArtifactV1ParamsWithTimeout(timeout time.Duration) *RunServiceReadArtifactV1Params { - var () return &RunServiceReadArtifactV1Params{ - timeout: timeout, } } // NewRunServiceReadArtifactV1ParamsWithContext creates a new RunServiceReadArtifactV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceReadArtifactV1ParamsWithContext(ctx context.Context) *RunServiceReadArtifactV1Params { - var () return &RunServiceReadArtifactV1Params{ - Context: ctx, } } // NewRunServiceReadArtifactV1ParamsWithHTTPClient creates a new RunServiceReadArtifactV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceReadArtifactV1ParamsWithHTTPClient(client *http.Client) *RunServiceReadArtifactV1Params { - var () return &RunServiceReadArtifactV1Params{ HTTPClient: client, } } -/*RunServiceReadArtifactV1Params contains all the parameters to send to the API endpoint -for the run service read artifact v1 operation typically these are written to a http.Request +/* +RunServiceReadArtifactV1Params contains all the parameters to send to the API endpoint + + for the run service read artifact v1 operation. + + Typically these are written to a http.Request. */ type RunServiceReadArtifactV1Params struct { - /*ArtifactName - The name of the artifact. + /* ArtifactName. + The name of the artifact. */ ArtifactName string - /*NodeID - The ID of the running node. + /* NodeID. + + The ID of the running node. */ NodeID string - /*RunID - The ID of the run. + /* RunID. + + The ID of the run. */ RunID string @@ -82,6 +84,21 @@ type RunServiceReadArtifactV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service read artifact v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReadArtifactV1Params) WithDefaults() *RunServiceReadArtifactV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service read artifact v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReadArtifactV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service read artifact v1 params func (o *RunServiceReadArtifactV1Params) WithTimeout(timeout time.Duration) *RunServiceReadArtifactV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_read_artifact_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_read_artifact_v1_responses.go index b0ff739c376..5bbcdae862c 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_read_artifact_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_read_artifact_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceReadArtifactV1Reader is a Reader for the RunServiceReadArtifactV1 structure. @@ -24,14 +24,12 @@ type RunServiceReadArtifactV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceReadArtifactV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceReadArtifactV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceReadArtifactV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceReadArtifactV1OK() *RunServiceReadArtifactV1OK { return &RunServiceReadArtifactV1OK{} } -/*RunServiceReadArtifactV1OK handles this case with default header values. +/* +RunServiceReadArtifactV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceReadArtifactV1OK struct { Payload *run_model.APIReadArtifactResponse } +// IsSuccess returns true when this run service read artifact v1 o k response has a 2xx status code +func (o *RunServiceReadArtifactV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service read artifact v1 o k response has a 3xx status code +func (o *RunServiceReadArtifactV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service read artifact v1 o k response has a 4xx status code +func (o *RunServiceReadArtifactV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service read artifact v1 o k response has a 5xx status code +func (o *RunServiceReadArtifactV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service read artifact v1 o k response a status code equal to that given +func (o *RunServiceReadArtifactV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service read artifact v1 o k response +func (o *RunServiceReadArtifactV1OK) Code() int { + return 200 +} + func (o *RunServiceReadArtifactV1OK) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] runServiceReadArtifactV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] runServiceReadArtifactV1OK %s", 200, payload) +} + +func (o *RunServiceReadArtifactV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] runServiceReadArtifactV1OK %s", 200, payload) +} + +func (o *RunServiceReadArtifactV1OK) GetPayload() *run_model.APIReadArtifactResponse { + return o.Payload } func (o *RunServiceReadArtifactV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceReadArtifactV1Default(code int) *RunServiceReadArtifactV1Defau } } -/*RunServiceReadArtifactV1Default handles this case with default header values. +/* +RunServiceReadArtifactV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceReadArtifactV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service read artifact v1 default response has a 2xx status code +func (o *RunServiceReadArtifactV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service read artifact v1 default response has a 3xx status code +func (o *RunServiceReadArtifactV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service read artifact v1 default response has a 4xx status code +func (o *RunServiceReadArtifactV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service read artifact v1 default response has a 5xx status code +func (o *RunServiceReadArtifactV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service read artifact v1 default response a status code equal to that given +func (o *RunServiceReadArtifactV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service read artifact v1 default response @@ -96,12 +161,22 @@ func (o *RunServiceReadArtifactV1Default) Code() int { } func (o *RunServiceReadArtifactV1Default) Error() string { - return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] RunService_ReadArtifactV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] RunService_ReadArtifactV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceReadArtifactV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v1beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] RunService_ReadArtifactV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceReadArtifactV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceReadArtifactV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_report_run_metrics_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_report_run_metrics_v1_parameters.go index 606aaa9ca44..07f2dfd22fd 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_report_run_metrics_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_report_run_metrics_v1_parameters.go @@ -13,61 +13,62 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) -// NewRunServiceReportRunMetricsV1Params creates a new RunServiceReportRunMetricsV1Params object -// with the default values initialized. +// NewRunServiceReportRunMetricsV1Params creates a new RunServiceReportRunMetricsV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceReportRunMetricsV1Params() *RunServiceReportRunMetricsV1Params { - var () return &RunServiceReportRunMetricsV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceReportRunMetricsV1ParamsWithTimeout creates a new RunServiceReportRunMetricsV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceReportRunMetricsV1ParamsWithTimeout(timeout time.Duration) *RunServiceReportRunMetricsV1Params { - var () return &RunServiceReportRunMetricsV1Params{ - timeout: timeout, } } // NewRunServiceReportRunMetricsV1ParamsWithContext creates a new RunServiceReportRunMetricsV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceReportRunMetricsV1ParamsWithContext(ctx context.Context) *RunServiceReportRunMetricsV1Params { - var () return &RunServiceReportRunMetricsV1Params{ - Context: ctx, } } // NewRunServiceReportRunMetricsV1ParamsWithHTTPClient creates a new RunServiceReportRunMetricsV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceReportRunMetricsV1ParamsWithHTTPClient(client *http.Client) *RunServiceReportRunMetricsV1Params { - var () return &RunServiceReportRunMetricsV1Params{ HTTPClient: client, } } -/*RunServiceReportRunMetricsV1Params contains all the parameters to send to the API endpoint -for the run service report run metrics v1 operation typically these are written to a http.Request +/* +RunServiceReportRunMetricsV1Params contains all the parameters to send to the API endpoint + + for the run service report run metrics v1 operation. + + Typically these are written to a http.Request. */ type RunServiceReportRunMetricsV1Params struct { - /*Body*/ - Body *run_model.APIReportRunMetricsRequest - /*RunID - Required. The parent run ID of the metric. + // Body. + Body *run_model.RunServiceReportRunMetricsV1Body + + /* RunID. + Required. The parent run ID of the metric. */ RunID string @@ -76,6 +77,21 @@ type RunServiceReportRunMetricsV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service report run metrics v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReportRunMetricsV1Params) WithDefaults() *RunServiceReportRunMetricsV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service report run metrics v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReportRunMetricsV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service report run metrics v1 params func (o *RunServiceReportRunMetricsV1Params) WithTimeout(timeout time.Duration) *RunServiceReportRunMetricsV1Params { o.SetTimeout(timeout) @@ -110,13 +126,13 @@ func (o *RunServiceReportRunMetricsV1Params) SetHTTPClient(client *http.Client) } // WithBody adds the body to the run service report run metrics v1 params -func (o *RunServiceReportRunMetricsV1Params) WithBody(body *run_model.APIReportRunMetricsRequest) *RunServiceReportRunMetricsV1Params { +func (o *RunServiceReportRunMetricsV1Params) WithBody(body *run_model.RunServiceReportRunMetricsV1Body) *RunServiceReportRunMetricsV1Params { o.SetBody(body) return o } // SetBody adds the body to the run service report run metrics v1 params -func (o *RunServiceReportRunMetricsV1Params) SetBody(body *run_model.APIReportRunMetricsRequest) { +func (o *RunServiceReportRunMetricsV1Params) SetBody(body *run_model.RunServiceReportRunMetricsV1Body) { o.Body = body } @@ -138,7 +154,6 @@ func (o *RunServiceReportRunMetricsV1Params) WriteToRequest(r runtime.ClientRequ return err } var res []error - if o.Body != nil { if err := r.SetBodyParam(o.Body); err != nil { return err diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_report_run_metrics_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_report_run_metrics_v1_responses.go index 1bd778cee7a..f3d31269452 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_report_run_metrics_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_report_run_metrics_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceReportRunMetricsV1Reader is a Reader for the RunServiceReportRunMetricsV1 structure. @@ -24,14 +24,12 @@ type RunServiceReportRunMetricsV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceReportRunMetricsV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceReportRunMetricsV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceReportRunMetricsV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceReportRunMetricsV1OK() *RunServiceReportRunMetricsV1OK { return &RunServiceReportRunMetricsV1OK{} } -/*RunServiceReportRunMetricsV1OK handles this case with default header values. +/* +RunServiceReportRunMetricsV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceReportRunMetricsV1OK struct { Payload *run_model.APIReportRunMetricsResponse } +// IsSuccess returns true when this run service report run metrics v1 o k response has a 2xx status code +func (o *RunServiceReportRunMetricsV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service report run metrics v1 o k response has a 3xx status code +func (o *RunServiceReportRunMetricsV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service report run metrics v1 o k response has a 4xx status code +func (o *RunServiceReportRunMetricsV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service report run metrics v1 o k response has a 5xx status code +func (o *RunServiceReportRunMetricsV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service report run metrics v1 o k response a status code equal to that given +func (o *RunServiceReportRunMetricsV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service report run metrics v1 o k response +func (o *RunServiceReportRunMetricsV1OK) Code() int { + return 200 +} + func (o *RunServiceReportRunMetricsV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}:reportMetrics][%d] runServiceReportRunMetricsV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}:reportMetrics][%d] runServiceReportRunMetricsV1OK %s", 200, payload) +} + +func (o *RunServiceReportRunMetricsV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}:reportMetrics][%d] runServiceReportRunMetricsV1OK %s", 200, payload) +} + +func (o *RunServiceReportRunMetricsV1OK) GetPayload() *run_model.APIReportRunMetricsResponse { + return o.Payload } func (o *RunServiceReportRunMetricsV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceReportRunMetricsV1Default(code int) *RunServiceReportRunMetric } } -/*RunServiceReportRunMetricsV1Default handles this case with default header values. +/* +RunServiceReportRunMetricsV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceReportRunMetricsV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service report run metrics v1 default response has a 2xx status code +func (o *RunServiceReportRunMetricsV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service report run metrics v1 default response has a 3xx status code +func (o *RunServiceReportRunMetricsV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service report run metrics v1 default response has a 4xx status code +func (o *RunServiceReportRunMetricsV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service report run metrics v1 default response has a 5xx status code +func (o *RunServiceReportRunMetricsV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service report run metrics v1 default response a status code equal to that given +func (o *RunServiceReportRunMetricsV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service report run metrics v1 default response @@ -96,12 +161,22 @@ func (o *RunServiceReportRunMetricsV1Default) Code() int { } func (o *RunServiceReportRunMetricsV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}:reportMetrics][%d] RunService_ReportRunMetricsV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}:reportMetrics][%d] RunService_ReportRunMetricsV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceReportRunMetricsV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}:reportMetrics][%d] RunService_ReportRunMetricsV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceReportRunMetricsV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceReportRunMetricsV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_retry_run_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_retry_run_v1_parameters.go index 2fd57779d01..fa05af305c5 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_retry_run_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_retry_run_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceRetryRunV1Params creates a new RunServiceRetryRunV1Params object -// with the default values initialized. +// NewRunServiceRetryRunV1Params creates a new RunServiceRetryRunV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceRetryRunV1Params() *RunServiceRetryRunV1Params { - var () return &RunServiceRetryRunV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceRetryRunV1ParamsWithTimeout creates a new RunServiceRetryRunV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceRetryRunV1ParamsWithTimeout(timeout time.Duration) *RunServiceRetryRunV1Params { - var () return &RunServiceRetryRunV1Params{ - timeout: timeout, } } // NewRunServiceRetryRunV1ParamsWithContext creates a new RunServiceRetryRunV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceRetryRunV1ParamsWithContext(ctx context.Context) *RunServiceRetryRunV1Params { - var () return &RunServiceRetryRunV1Params{ - Context: ctx, } } // NewRunServiceRetryRunV1ParamsWithHTTPClient creates a new RunServiceRetryRunV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceRetryRunV1ParamsWithHTTPClient(client *http.Client) *RunServiceRetryRunV1Params { - var () return &RunServiceRetryRunV1Params{ HTTPClient: client, } } -/*RunServiceRetryRunV1Params contains all the parameters to send to the API endpoint -for the run service retry run v1 operation typically these are written to a http.Request +/* +RunServiceRetryRunV1Params contains all the parameters to send to the API endpoint + + for the run service retry run v1 operation. + + Typically these are written to a http.Request. */ type RunServiceRetryRunV1Params struct { - /*RunID - The ID of the run to be retried. + /* RunID. + The ID of the run to be retried. */ RunID string @@ -72,6 +72,21 @@ type RunServiceRetryRunV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service retry run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceRetryRunV1Params) WithDefaults() *RunServiceRetryRunV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service retry run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceRetryRunV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service retry run v1 params func (o *RunServiceRetryRunV1Params) WithTimeout(timeout time.Duration) *RunServiceRetryRunV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_retry_run_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_retry_run_v1_responses.go index 15343c4cd44..c9a944e9cdb 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_retry_run_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_retry_run_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceRetryRunV1Reader is a Reader for the RunServiceRetryRunV1 structure. @@ -24,14 +24,12 @@ type RunServiceRetryRunV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceRetryRunV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceRetryRunV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceRetryRunV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceRetryRunV1OK() *RunServiceRetryRunV1OK { return &RunServiceRetryRunV1OK{} } -/*RunServiceRetryRunV1OK handles this case with default header values. +/* +RunServiceRetryRunV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceRetryRunV1OK struct { Payload interface{} } +// IsSuccess returns true when this run service retry run v1 o k response has a 2xx status code +func (o *RunServiceRetryRunV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service retry run v1 o k response has a 3xx status code +func (o *RunServiceRetryRunV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service retry run v1 o k response has a 4xx status code +func (o *RunServiceRetryRunV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service retry run v1 o k response has a 5xx status code +func (o *RunServiceRetryRunV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service retry run v1 o k response a status code equal to that given +func (o *RunServiceRetryRunV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service retry run v1 o k response +func (o *RunServiceRetryRunV1OK) Code() int { + return 200 +} + func (o *RunServiceRetryRunV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/retry][%d] runServiceRetryRunV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/retry][%d] runServiceRetryRunV1OK %s", 200, payload) +} + +func (o *RunServiceRetryRunV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/retry][%d] runServiceRetryRunV1OK %s", 200, payload) +} + +func (o *RunServiceRetryRunV1OK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceRetryRunV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceRetryRunV1Default(code int) *RunServiceRetryRunV1Default { } } -/*RunServiceRetryRunV1Default handles this case with default header values. +/* +RunServiceRetryRunV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceRetryRunV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service retry run v1 default response has a 2xx status code +func (o *RunServiceRetryRunV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service retry run v1 default response has a 3xx status code +func (o *RunServiceRetryRunV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service retry run v1 default response has a 4xx status code +func (o *RunServiceRetryRunV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service retry run v1 default response has a 5xx status code +func (o *RunServiceRetryRunV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service retry run v1 default response a status code equal to that given +func (o *RunServiceRetryRunV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service retry run v1 default response @@ -94,12 +159,22 @@ func (o *RunServiceRetryRunV1Default) Code() int { } func (o *RunServiceRetryRunV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/retry][%d] RunService_RetryRunV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/retry][%d] RunService_RetryRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceRetryRunV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/retry][%d] RunService_RetryRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceRetryRunV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceRetryRunV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_terminate_run_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_terminate_run_v1_parameters.go index 16301885d27..d202c39d3c9 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_terminate_run_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_terminate_run_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceTerminateRunV1Params creates a new RunServiceTerminateRunV1Params object -// with the default values initialized. +// NewRunServiceTerminateRunV1Params creates a new RunServiceTerminateRunV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceTerminateRunV1Params() *RunServiceTerminateRunV1Params { - var () return &RunServiceTerminateRunV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceTerminateRunV1ParamsWithTimeout creates a new RunServiceTerminateRunV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceTerminateRunV1ParamsWithTimeout(timeout time.Duration) *RunServiceTerminateRunV1Params { - var () return &RunServiceTerminateRunV1Params{ - timeout: timeout, } } // NewRunServiceTerminateRunV1ParamsWithContext creates a new RunServiceTerminateRunV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceTerminateRunV1ParamsWithContext(ctx context.Context) *RunServiceTerminateRunV1Params { - var () return &RunServiceTerminateRunV1Params{ - Context: ctx, } } // NewRunServiceTerminateRunV1ParamsWithHTTPClient creates a new RunServiceTerminateRunV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceTerminateRunV1ParamsWithHTTPClient(client *http.Client) *RunServiceTerminateRunV1Params { - var () return &RunServiceTerminateRunV1Params{ HTTPClient: client, } } -/*RunServiceTerminateRunV1Params contains all the parameters to send to the API endpoint -for the run service terminate run v1 operation typically these are written to a http.Request +/* +RunServiceTerminateRunV1Params contains all the parameters to send to the API endpoint + + for the run service terminate run v1 operation. + + Typically these are written to a http.Request. */ type RunServiceTerminateRunV1Params struct { - /*RunID - The ID of the run to be terminated. + /* RunID. + The ID of the run to be terminated. */ RunID string @@ -72,6 +72,21 @@ type RunServiceTerminateRunV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service terminate run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceTerminateRunV1Params) WithDefaults() *RunServiceTerminateRunV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service terminate run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceTerminateRunV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service terminate run v1 params func (o *RunServiceTerminateRunV1Params) WithTimeout(timeout time.Duration) *RunServiceTerminateRunV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_terminate_run_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_terminate_run_v1_responses.go index 0156d8a5bd5..60de7a421a2 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_terminate_run_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_terminate_run_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceTerminateRunV1Reader is a Reader for the RunServiceTerminateRunV1 structure. @@ -24,14 +24,12 @@ type RunServiceTerminateRunV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceTerminateRunV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceTerminateRunV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceTerminateRunV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceTerminateRunV1OK() *RunServiceTerminateRunV1OK { return &RunServiceTerminateRunV1OK{} } -/*RunServiceTerminateRunV1OK handles this case with default header values. +/* +RunServiceTerminateRunV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceTerminateRunV1OK struct { Payload interface{} } +// IsSuccess returns true when this run service terminate run v1 o k response has a 2xx status code +func (o *RunServiceTerminateRunV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service terminate run v1 o k response has a 3xx status code +func (o *RunServiceTerminateRunV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service terminate run v1 o k response has a 4xx status code +func (o *RunServiceTerminateRunV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service terminate run v1 o k response has a 5xx status code +func (o *RunServiceTerminateRunV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service terminate run v1 o k response a status code equal to that given +func (o *RunServiceTerminateRunV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service terminate run v1 o k response +func (o *RunServiceTerminateRunV1OK) Code() int { + return 200 +} + func (o *RunServiceTerminateRunV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/terminate][%d] runServiceTerminateRunV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/terminate][%d] runServiceTerminateRunV1OK %s", 200, payload) +} + +func (o *RunServiceTerminateRunV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/terminate][%d] runServiceTerminateRunV1OK %s", 200, payload) +} + +func (o *RunServiceTerminateRunV1OK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceTerminateRunV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceTerminateRunV1Default(code int) *RunServiceTerminateRunV1Defau } } -/*RunServiceTerminateRunV1Default handles this case with default header values. +/* +RunServiceTerminateRunV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceTerminateRunV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service terminate run v1 default response has a 2xx status code +func (o *RunServiceTerminateRunV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service terminate run v1 default response has a 3xx status code +func (o *RunServiceTerminateRunV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service terminate run v1 default response has a 4xx status code +func (o *RunServiceTerminateRunV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service terminate run v1 default response has a 5xx status code +func (o *RunServiceTerminateRunV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service terminate run v1 default response a status code equal to that given +func (o *RunServiceTerminateRunV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service terminate run v1 default response @@ -94,12 +159,22 @@ func (o *RunServiceTerminateRunV1Default) Code() int { } func (o *RunServiceTerminateRunV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/terminate][%d] RunService_TerminateRunV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/terminate][%d] RunService_TerminateRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceTerminateRunV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{run_id}/terminate][%d] RunService_TerminateRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceTerminateRunV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceTerminateRunV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_unarchive_run_v1_parameters.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_unarchive_run_v1_parameters.go index 5eeeb9d4d9a..9648529a45b 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_unarchive_run_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_unarchive_run_v1_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceUnarchiveRunV1Params creates a new RunServiceUnarchiveRunV1Params object -// with the default values initialized. +// NewRunServiceUnarchiveRunV1Params creates a new RunServiceUnarchiveRunV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceUnarchiveRunV1Params() *RunServiceUnarchiveRunV1Params { - var () return &RunServiceUnarchiveRunV1Params{ - timeout: cr.DefaultTimeout, } } // NewRunServiceUnarchiveRunV1ParamsWithTimeout creates a new RunServiceUnarchiveRunV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceUnarchiveRunV1ParamsWithTimeout(timeout time.Duration) *RunServiceUnarchiveRunV1Params { - var () return &RunServiceUnarchiveRunV1Params{ - timeout: timeout, } } // NewRunServiceUnarchiveRunV1ParamsWithContext creates a new RunServiceUnarchiveRunV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceUnarchiveRunV1ParamsWithContext(ctx context.Context) *RunServiceUnarchiveRunV1Params { - var () return &RunServiceUnarchiveRunV1Params{ - Context: ctx, } } // NewRunServiceUnarchiveRunV1ParamsWithHTTPClient creates a new RunServiceUnarchiveRunV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceUnarchiveRunV1ParamsWithHTTPClient(client *http.Client) *RunServiceUnarchiveRunV1Params { - var () return &RunServiceUnarchiveRunV1Params{ HTTPClient: client, } } -/*RunServiceUnarchiveRunV1Params contains all the parameters to send to the API endpoint -for the run service unarchive run v1 operation typically these are written to a http.Request +/* +RunServiceUnarchiveRunV1Params contains all the parameters to send to the API endpoint + + for the run service unarchive run v1 operation. + + Typically these are written to a http.Request. */ type RunServiceUnarchiveRunV1Params struct { - /*ID - The ID of the run to be restored. + /* ID. + The ID of the run to be restored. */ ID string @@ -72,6 +72,21 @@ type RunServiceUnarchiveRunV1Params struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service unarchive run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceUnarchiveRunV1Params) WithDefaults() *RunServiceUnarchiveRunV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service unarchive run v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceUnarchiveRunV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service unarchive run v1 params func (o *RunServiceUnarchiveRunV1Params) WithTimeout(timeout time.Duration) *RunServiceUnarchiveRunV1Params { o.SetTimeout(timeout) diff --git a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_unarchive_run_v1_responses.go b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_unarchive_run_v1_responses.go index 384515fd6bd..f40954ae6ef 100644 --- a/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_unarchive_run_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/run_client/run_service/run_service_unarchive_run_v1_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/run_model" ) // RunServiceUnarchiveRunV1Reader is a Reader for the RunServiceUnarchiveRunV1 structure. @@ -24,14 +24,12 @@ type RunServiceUnarchiveRunV1Reader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceUnarchiveRunV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceUnarchiveRunV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceUnarchiveRunV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceUnarchiveRunV1OK() *RunServiceUnarchiveRunV1OK { return &RunServiceUnarchiveRunV1OK{} } -/*RunServiceUnarchiveRunV1OK handles this case with default header values. +/* +RunServiceUnarchiveRunV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceUnarchiveRunV1OK struct { Payload interface{} } +// IsSuccess returns true when this run service unarchive run v1 o k response has a 2xx status code +func (o *RunServiceUnarchiveRunV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service unarchive run v1 o k response has a 3xx status code +func (o *RunServiceUnarchiveRunV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service unarchive run v1 o k response has a 4xx status code +func (o *RunServiceUnarchiveRunV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service unarchive run v1 o k response has a 5xx status code +func (o *RunServiceUnarchiveRunV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service unarchive run v1 o k response a status code equal to that given +func (o *RunServiceUnarchiveRunV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service unarchive run v1 o k response +func (o *RunServiceUnarchiveRunV1OK) Code() int { + return 200 +} + func (o *RunServiceUnarchiveRunV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:unarchive][%d] runServiceUnarchiveRunV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:unarchive][%d] runServiceUnarchiveRunV1OK %s", 200, payload) +} + +func (o *RunServiceUnarchiveRunV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:unarchive][%d] runServiceUnarchiveRunV1OK %s", 200, payload) +} + +func (o *RunServiceUnarchiveRunV1OK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceUnarchiveRunV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceUnarchiveRunV1Default(code int) *RunServiceUnarchiveRunV1Defau } } -/*RunServiceUnarchiveRunV1Default handles this case with default header values. +/* +RunServiceUnarchiveRunV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceUnarchiveRunV1Default struct { _statusCode int - Payload *run_model.GatewayruntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service unarchive run v1 default response has a 2xx status code +func (o *RunServiceUnarchiveRunV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service unarchive run v1 default response has a 3xx status code +func (o *RunServiceUnarchiveRunV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service unarchive run v1 default response has a 4xx status code +func (o *RunServiceUnarchiveRunV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service unarchive run v1 default response has a 5xx status code +func (o *RunServiceUnarchiveRunV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service unarchive run v1 default response a status code equal to that given +func (o *RunServiceUnarchiveRunV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service unarchive run v1 default response @@ -94,12 +159,22 @@ func (o *RunServiceUnarchiveRunV1Default) Code() int { } func (o *RunServiceUnarchiveRunV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:unarchive][%d] RunService_UnarchiveRunV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:unarchive][%d] RunService_UnarchiveRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceUnarchiveRunV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/runs/{id}:unarchive][%d] RunService_UnarchiveRunV1 default %s", o._statusCode, payload) +} + +func (o *RunServiceUnarchiveRunV1Default) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceUnarchiveRunV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.GatewayruntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/run_model/api_list_runs_response.go b/backend/api/v1beta1/go_http_client/run_model/api_list_runs_response.go index 3681e0edc4a..a00e587b8e4 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_list_runs_response.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_list_runs_response.go @@ -6,15 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIListRunsResponse api list runs response +// // swagger:model apiListRunsResponse type APIListRunsResponse struct { @@ -43,7 +44,6 @@ func (m *APIListRunsResponse) Validate(formats strfmt.Registry) error { } func (m *APIListRunsResponse) validateRuns(formats strfmt.Registry) error { - if swag.IsZero(m.Runs) { // not required return nil } @@ -57,6 +57,47 @@ func (m *APIListRunsResponse) validateRuns(formats strfmt.Registry) error { if err := m.Runs[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api list runs response based on the context it is used +func (m *APIListRunsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRuns(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIListRunsResponse) contextValidateRuns(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Runs); i++ { + + if m.Runs[i] != nil { + + if swag.IsZero(m.Runs[i]) { // not required + return nil + } + + if err := m.Runs[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runs" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/run_model/api_parameter.go b/backend/api/v1beta1/go_http_client/run_model/api_parameter.go index a6d010007a4..9339ce4d06e 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_parameter.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_parameter.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIParameter api parameter +// // swagger:model apiParameter type APIParameter struct { @@ -27,6 +29,11 @@ func (m *APIParameter) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api parameter based on context it is used +func (m *APIParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIParameter) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/run_model/api_pipeline_runtime.go b/backend/api/v1beta1/go_http_client/run_model/api_pipeline_runtime.go index 74c255842ed..80d410b3079 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_pipeline_runtime.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_pipeline_runtime.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIPipelineRuntime api pipeline runtime +// // swagger:model apiPipelineRuntime type APIPipelineRuntime struct { @@ -29,6 +31,11 @@ func (m *APIPipelineRuntime) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this api pipeline runtime based on context it is used +func (m *APIPipelineRuntime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *APIPipelineRuntime) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/run_model/api_pipeline_spec.go b/backend/api/v1beta1/go_http_client/run_model/api_pipeline_spec.go index 49edc9a4d80..eebf3874e41 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_pipeline_spec.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_pipeline_spec.go @@ -6,15 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIPipelineSpec api pipeline spec +// // swagger:model apiPipelineSpec type APIPipelineSpec struct { @@ -60,7 +61,6 @@ func (m *APIPipelineSpec) Validate(formats strfmt.Registry) error { } func (m *APIPipelineSpec) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required return nil } @@ -74,6 +74,8 @@ func (m *APIPipelineSpec) validateParameters(formats strfmt.Registry) error { if err := m.Parameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) } return err } @@ -85,7 +87,6 @@ func (m *APIPipelineSpec) validateParameters(formats strfmt.Registry) error { } func (m *APIPipelineSpec) validateRuntimeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RuntimeConfig) { // not required return nil } @@ -94,6 +95,72 @@ func (m *APIPipelineSpec) validateRuntimeConfig(formats strfmt.Registry) error { if err := m.RuntimeConfig.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api pipeline spec based on the context it is used +func (m *APIPipelineSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateParameters(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRuntimeConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIPipelineSpec) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Parameters); i++ { + + if m.Parameters[i] != nil { + + if swag.IsZero(m.Parameters[i]) { // not required + return nil + } + + if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIPipelineSpec) contextValidateRuntimeConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.RuntimeConfig != nil { + + if swag.IsZero(m.RuntimeConfig) { // not required + return nil + } + + if err := m.RuntimeConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") } return err } diff --git a/backend/api/v1beta1/go_http_client/run_model/api_read_artifact_response.go b/backend/api/v1beta1/go_http_client/run_model/api_read_artifact_response.go index c8add16464f..4a68666c516 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_read_artifact_response.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_read_artifact_response.go @@ -6,13 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIReadArtifactResponse api read artifact response +// // swagger:model apiReadArtifactResponse type APIReadArtifactResponse struct { @@ -23,26 +24,11 @@ type APIReadArtifactResponse struct { // Validate validates this api read artifact response func (m *APIReadArtifactResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateData(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *APIReadArtifactResponse) validateData(formats strfmt.Registry) error { - - if swag.IsZero(m.Data) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this api read artifact response based on context it is used +func (m *APIReadArtifactResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1beta1/go_http_client/run_model/api_relationship.go b/backend/api/v1beta1/go_http_client/run_model/api_relationship.go index 48c2be62cc1..addf51afd4d 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_relationship.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_relationship.go @@ -6,18 +6,28 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIRelationship api relationship +// // swagger:model apiRelationship type APIRelationship string +func NewAPIRelationship(value APIRelationship) *APIRelationship { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIRelationship. +func (m APIRelationship) Pointer() *APIRelationship { + return &m +} + const ( // APIRelationshipUNKNOWNRELATIONSHIP captures enum value "UNKNOWN_RELATIONSHIP" @@ -44,7 +54,7 @@ func init() { } func (m APIRelationship) validateAPIRelationshipEnum(path, location string, value APIRelationship) error { - if err := validate.Enum(path, location, value, apiRelationshipEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiRelationshipEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m APIRelationship) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api relationship based on context it is used +func (m APIRelationship) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/run_model/api_report_run_metrics_request.go b/backend/api/v1beta1/go_http_client/run_model/api_report_run_metrics_request.go deleted file mode 100644 index 7cf45d35d8f..00000000000 --- a/backend/api/v1beta1/go_http_client/run_model/api_report_run_metrics_request.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// APIReportRunMetricsRequest api report run metrics request -// swagger:model apiReportRunMetricsRequest -type APIReportRunMetricsRequest struct { - - // List of metrics to report. - Metrics []*APIRunMetric `json:"metrics"` - - // Required. The parent run ID of the metric. - RunID string `json:"run_id,omitempty"` -} - -// Validate validates this api report run metrics request -func (m *APIReportRunMetricsRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetrics(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *APIReportRunMetricsRequest) validateMetrics(formats strfmt.Registry) error { - - if swag.IsZero(m.Metrics) { // not required - return nil - } - - for i := 0; i < len(m.Metrics); i++ { - if swag.IsZero(m.Metrics[i]) { // not required - continue - } - - if m.Metrics[i] != nil { - if err := m.Metrics[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *APIReportRunMetricsRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *APIReportRunMetricsRequest) UnmarshalBinary(b []byte) error { - var res APIReportRunMetricsRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1beta1/go_http_client/run_model/api_report_run_metrics_response.go b/backend/api/v1beta1/go_http_client/run_model/api_report_run_metrics_response.go index 5afa15d6eef..79dd433464f 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_report_run_metrics_response.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_report_run_metrics_response.go @@ -6,15 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIReportRunMetricsResponse api report run metrics response +// // swagger:model apiReportRunMetricsResponse type APIReportRunMetricsResponse struct { @@ -37,7 +38,6 @@ func (m *APIReportRunMetricsResponse) Validate(formats strfmt.Registry) error { } func (m *APIReportRunMetricsResponse) validateResults(formats strfmt.Registry) error { - if swag.IsZero(m.Results) { // not required return nil } @@ -51,6 +51,47 @@ func (m *APIReportRunMetricsResponse) validateResults(formats strfmt.Registry) e if err := m.Results[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this api report run metrics response based on the context it is used +func (m *APIReportRunMetricsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateResults(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIReportRunMetricsResponse) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Results); i++ { + + if m.Results[i] != nil { + + if swag.IsZero(m.Results[i]) { // not required + return nil + } + + if err := m.Results[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("results" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("results" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v1beta1/go_http_client/run_model/api_resource_key.go b/backend/api/v1beta1/go_http_client/run_model/api_resource_key.go index 606d5c956c3..3a0fd53836c 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_resource_key.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_resource_key.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceKey api resource key +// // swagger:model apiResourceKey type APIResourceKey struct { @@ -20,7 +22,7 @@ type APIResourceKey struct { ID string `json:"id,omitempty"` // The type of the resource that referred to. - Type APIResourceType `json:"type,omitempty"` + Type *APIResourceType `json:"type,omitempty"` } // Validate validates this api resource key @@ -38,16 +40,54 @@ func (m *APIResourceKey) Validate(formats strfmt.Registry) error { } func (m *APIResourceKey) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource key based on the context it is used +func (m *APIResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceKey) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/run_model/api_resource_reference.go b/backend/api/v1beta1/go_http_client/run_model/api_resource_reference.go index 5525a679e23..17e2533b6a8 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_resource_reference.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_resource_reference.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIResourceReference api resource reference +// // swagger:model apiResourceReference type APIResourceReference struct { @@ -23,7 +25,7 @@ type APIResourceReference struct { Name string `json:"name,omitempty"` // Required field. The relationship from referred resource to the object. - Relationship APIRelationship `json:"relationship,omitempty"` + Relationship *APIRelationship `json:"relationship,omitempty"` } // Validate validates this api resource reference @@ -45,7 +47,6 @@ func (m *APIResourceReference) Validate(formats strfmt.Registry) error { } func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { - if swag.IsZero(m.Key) { // not required return nil } @@ -54,6 +55,8 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { if err := m.Key.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") } return err } @@ -63,16 +66,79 @@ func (m *APIResourceReference) validateKey(formats strfmt.Registry) error { } func (m *APIResourceReference) validateRelationship(formats strfmt.Registry) error { - if swag.IsZero(m.Relationship) { // not required return nil } - if err := m.Relationship.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("relationship") + if m.Relationship != nil { + if err := m.Relationship.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api resource reference based on the context it is used +func (m *APIResourceReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateKey(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRelationship(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIResourceReference) contextValidateKey(ctx context.Context, formats strfmt.Registry) error { + + if m.Key != nil { + + if swag.IsZero(m.Key) { // not required + return nil + } + + if err := m.Key.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("key") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("key") + } + return err + } + } + + return nil +} + +func (m *APIResourceReference) contextValidateRelationship(ctx context.Context, formats strfmt.Registry) error { + + if m.Relationship != nil { + + if swag.IsZero(m.Relationship) { // not required + return nil + } + + if err := m.Relationship.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relationship") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("relationship") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/run_model/api_resource_type.go b/backend/api/v1beta1/go_http_client/run_model/api_resource_type.go index b686a8783ed..84fba358efc 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_resource_type.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_resource_type.go @@ -6,18 +6,28 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIResourceType api resource type +// // swagger:model apiResourceType type APIResourceType string +func NewAPIResourceType(value APIResourceType) *APIResourceType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIResourceType. +func (m APIResourceType) Pointer() *APIResourceType { + return &m +} + const ( // APIResourceTypeUNKNOWNRESOURCETYPE captures enum value "UNKNOWN_RESOURCE_TYPE" @@ -53,7 +63,7 @@ func init() { } func (m APIResourceType) validateAPIResourceTypeEnum(path, location string, value APIResourceType) error { - if err := validate.Enum(path, location, value, apiResourceTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiResourceTypeEnum, true); err != nil { return err } return nil @@ -73,3 +83,8 @@ func (m APIResourceType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api resource type based on context it is used +func (m APIResourceType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/run_model/api_run.go b/backend/api/v1beta1/go_http_client/run_model/api_run.go index b03d8ca9bf4..1ed83310d57 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_run.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_run.go @@ -6,16 +6,17 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // APIRun api run +// // swagger:model apiRun type APIRun struct { @@ -70,7 +71,7 @@ type APIRun struct { Status string `json:"status,omitempty"` // Output. Specify whether this run is in archived or available mode. - StorageState APIRunStorageState `json:"storage_state,omitempty"` + StorageState *APIRunStorageState `json:"storage_state,omitempty"` } // Validate validates this api run @@ -112,7 +113,6 @@ func (m *APIRun) Validate(formats strfmt.Registry) error { } func (m *APIRun) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -125,7 +125,6 @@ func (m *APIRun) validateCreatedAt(formats strfmt.Registry) error { } func (m *APIRun) validateFinishedAt(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedAt) { // not required return nil } @@ -138,7 +137,6 @@ func (m *APIRun) validateFinishedAt(formats strfmt.Registry) error { } func (m *APIRun) validateMetrics(formats strfmt.Registry) error { - if swag.IsZero(m.Metrics) { // not required return nil } @@ -152,6 +150,8 @@ func (m *APIRun) validateMetrics(formats strfmt.Registry) error { if err := m.Metrics[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metrics" + "." + strconv.Itoa(i)) } return err } @@ -163,7 +163,6 @@ func (m *APIRun) validateMetrics(formats strfmt.Registry) error { } func (m *APIRun) validatePipelineSpec(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineSpec) { // not required return nil } @@ -172,6 +171,8 @@ func (m *APIRun) validatePipelineSpec(formats strfmt.Registry) error { if err := m.PipelineSpec.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") } return err } @@ -181,7 +182,6 @@ func (m *APIRun) validatePipelineSpec(formats strfmt.Registry) error { } func (m *APIRun) validateResourceReferences(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceReferences) { // not required return nil } @@ -195,6 +195,8 @@ func (m *APIRun) validateResourceReferences(formats strfmt.Registry) error { if err := m.ResourceReferences[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) } return err } @@ -206,7 +208,6 @@ func (m *APIRun) validateResourceReferences(formats strfmt.Registry) error { } func (m *APIRun) validateScheduledAt(formats strfmt.Registry) error { - if swag.IsZero(m.ScheduledAt) { // not required return nil } @@ -219,16 +220,137 @@ func (m *APIRun) validateScheduledAt(formats strfmt.Registry) error { } func (m *APIRun) validateStorageState(formats strfmt.Registry) error { - if swag.IsZero(m.StorageState) { // not required return nil } - if err := m.StorageState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storage_state") + if m.StorageState != nil { + if err := m.StorageState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api run based on the context it is used +func (m *APIRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMetrics(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePipelineSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStorageState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIRun) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Metrics); i++ { + + if m.Metrics[i] != nil { + + if swag.IsZero(m.Metrics[i]) { // not required + return nil + } + + if err := m.Metrics[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metrics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIRun) contextValidatePipelineSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineSpec != nil { + + if swag.IsZero(m.PipelineSpec) { // not required + return nil + } + + if err := m.PipelineSpec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_spec") + } + return err + } + } + + return nil +} + +func (m *APIRun) contextValidateResourceReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ResourceReferences); i++ { + + if m.ResourceReferences[i] != nil { + + if swag.IsZero(m.ResourceReferences[i]) { // not required + return nil + } + + if err := m.ResourceReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resource_references" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *APIRun) contextValidateStorageState(ctx context.Context, formats strfmt.Registry) error { + + if m.StorageState != nil { + + if swag.IsZero(m.StorageState) { // not required + return nil + } + + if err := m.StorageState.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/run_model/api_run_detail.go b/backend/api/v1beta1/go_http_client/run_model/api_run_detail.go index 53e76c303b6..145018fdf3e 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_run_detail.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_run_detail.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIRunDetail api run detail +// // swagger:model apiRunDetail type APIRunDetail struct { @@ -42,7 +44,6 @@ func (m *APIRunDetail) Validate(formats strfmt.Registry) error { } func (m *APIRunDetail) validatePipelineRuntime(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineRuntime) { // not required return nil } @@ -51,6 +52,8 @@ func (m *APIRunDetail) validatePipelineRuntime(formats strfmt.Registry) error { if err := m.PipelineRuntime.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_runtime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_runtime") } return err } @@ -60,7 +63,6 @@ func (m *APIRunDetail) validatePipelineRuntime(formats strfmt.Registry) error { } func (m *APIRunDetail) validateRun(formats strfmt.Registry) error { - if swag.IsZero(m.Run) { // not required return nil } @@ -69,6 +71,68 @@ func (m *APIRunDetail) validateRun(formats strfmt.Registry) error { if err := m.Run.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("run") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("run") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api run detail based on the context it is used +func (m *APIRunDetail) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePipelineRuntime(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRun(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIRunDetail) contextValidatePipelineRuntime(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineRuntime != nil { + + if swag.IsZero(m.PipelineRuntime) { // not required + return nil + } + + if err := m.PipelineRuntime.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_runtime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_runtime") + } + return err + } + } + + return nil +} + +func (m *APIRunDetail) contextValidateRun(ctx context.Context, formats strfmt.Registry) error { + + if m.Run != nil { + + if swag.IsZero(m.Run) { // not required + return nil + } + + if err := m.Run.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("run") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("run") } return err } diff --git a/backend/api/v1beta1/go_http_client/run_model/api_run_metric.go b/backend/api/v1beta1/go_http_client/run_model/api_run_metric.go index 9ea781b0b6d..9a61408b3b3 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_run_metric.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_run_metric.go @@ -6,18 +6,20 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIRunMetric api run metric +// // swagger:model apiRunMetric type APIRunMetric struct { // The display format of metric. - Format RunMetricFormat `json:"format,omitempty"` + Format *RunMetricFormat `json:"format,omitempty"` // Required. The user defined name of the metric. It must between 1 and 63 // characters long and must conform to the following regular expression: @@ -49,16 +51,54 @@ func (m *APIRunMetric) Validate(formats strfmt.Registry) error { } func (m *APIRunMetric) validateFormat(formats strfmt.Registry) error { - if swag.IsZero(m.Format) { // not required return nil } - if err := m.Format.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("format") + if m.Format != nil { + if err := m.Format.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("format") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("format") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api run metric based on the context it is used +func (m *APIRunMetric) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateFormat(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIRunMetric) contextValidateFormat(ctx context.Context, formats strfmt.Registry) error { + + if m.Format != nil { + + if swag.IsZero(m.Format) { // not required + return nil + } + + if err := m.Format.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("format") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("format") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/run_model/api_run_storage_state.go b/backend/api/v1beta1/go_http_client/run_model/api_run_storage_state.go index 04ed0e9e976..8995cc44099 100644 --- a/backend/api/v1beta1/go_http_client/run_model/api_run_storage_state.go +++ b/backend/api/v1beta1/go_http_client/run_model/api_run_storage_state.go @@ -6,18 +6,28 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIRunStorageState api run storage state +// // swagger:model apiRunStorageState type APIRunStorageState string +func NewAPIRunStorageState(value APIRunStorageState) *APIRunStorageState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIRunStorageState. +func (m APIRunStorageState) Pointer() *APIRunStorageState { + return &m +} + const ( // APIRunStorageStateSTORAGESTATEAVAILABLE captures enum value "STORAGESTATE_AVAILABLE" @@ -41,7 +51,7 @@ func init() { } func (m APIRunStorageState) validateAPIRunStorageStateEnum(path, location string, value APIRunStorageState) error { - if err := validate.Enum(path, location, value, apiRunStorageStateEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiRunStorageStateEnum, true); err != nil { return err } return nil @@ -61,3 +71,8 @@ func (m APIRunStorageState) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api run storage state based on context it is used +func (m APIRunStorageState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/run_model/gatewayruntime_error.go b/backend/api/v1beta1/go_http_client/run_model/gatewayruntime_error.go deleted file mode 100644 index b64134916a3..00000000000 --- a/backend/api/v1beta1/go_http_client/run_model/gatewayruntime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// GatewayruntimeError gatewayruntime error -// swagger:model gatewayruntimeError -type GatewayruntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this gatewayruntime error -func (m *GatewayruntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GatewayruntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GatewayruntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GatewayruntimeError) UnmarshalBinary(b []byte) error { - var res GatewayruntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1beta1/go_http_client/run_model/googlerpc_status.go b/backend/api/v1beta1/go_http_client/run_model/googlerpc_status.go new file mode 100644 index 00000000000..a97eaae8d94 --- /dev/null +++ b/backend/api/v1beta1/go_http_client/run_model/googlerpc_status.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1beta1/go_http_client/run_model/pipeline_spec_runtime_config.go b/backend/api/v1beta1/go_http_client/run_model/pipeline_spec_runtime_config.go index 73c0a4890fe..243eaabbad0 100644 --- a/backend/api/v1beta1/go_http_client/run_model/pipeline_spec_runtime_config.go +++ b/backend/api/v1beta1/go_http_client/run_model/pipeline_spec_runtime_config.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // PipelineSpecRuntimeConfig The runtime config of a PipelineSpec. +// // swagger:model PipelineSpecRuntimeConfig type PipelineSpecRuntimeConfig struct { @@ -31,6 +33,11 @@ func (m *PipelineSpecRuntimeConfig) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this pipeline spec runtime config based on context it is used +func (m *PipelineSpecRuntimeConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *PipelineSpecRuntimeConfig) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v1beta1/go_http_client/run_model/protobuf_any.go b/backend/api/v1beta1/go_http_client/run_model/protobuf_any.go index 9227b6f36df..2b44a6e53c0 100644 --- a/backend/api/v1beta1/go_http_client/run_model/protobuf_any.go +++ b/backend/api/v1beta1/go_http_client/run_model/protobuf_any.go @@ -6,9 +6,10 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1beta1/go_http_client/run_model/protobuf_null_value.go b/backend/api/v1beta1/go_http_client/run_model/protobuf_null_value.go index 852386abfff..22ebd8311f5 100644 --- a/backend/api/v1beta1/go_http_client/run_model/protobuf_null_value.go +++ b/backend/api/v1beta1/go_http_client/run_model/protobuf_null_value.go @@ -6,23 +6,33 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // ProtobufNullValue `NullValue` is a singleton enumeration to represent the null value for the // `Value` type union. // -// The JSON representation for `NullValue` is JSON `null`. +// The JSON representation for `NullValue` is JSON `null`. +// +// - NULL_VALUE: Null value. // -// - NULL_VALUE: Null value. // swagger:model protobufNullValue type ProtobufNullValue string +func NewProtobufNullValue(value ProtobufNullValue) *ProtobufNullValue { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ProtobufNullValue. +func (m ProtobufNullValue) Pointer() *ProtobufNullValue { + return &m +} + const ( // ProtobufNullValueNULLVALUE captures enum value "NULL_VALUE" @@ -43,7 +53,7 @@ func init() { } func (m ProtobufNullValue) validateProtobufNullValueEnum(path, location string, value ProtobufNullValue) error { - if err := validate.Enum(path, location, value, protobufNullValueEnum); err != nil { + if err := validate.EnumCase(path, location, value, protobufNullValueEnum, true); err != nil { return err } return nil @@ -63,3 +73,8 @@ func (m ProtobufNullValue) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this protobuf null value based on context it is used +func (m ProtobufNullValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result.go b/backend/api/v1beta1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result.go index c0ea5f174af..11983fa3499 100644 --- a/backend/api/v1beta1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result.go +++ b/backend/api/v1beta1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // ReportRunMetricsResponseReportRunMetricResult report run metrics response report run metric result +// // swagger:model ReportRunMetricsResponseReportRunMetricResult type ReportRunMetricsResponseReportRunMetricResult struct { @@ -26,7 +28,7 @@ type ReportRunMetricsResponseReportRunMetricResult struct { MetricNodeID string `json:"metric_node_id,omitempty"` // Output. The status of the metric reporting. - Status ReportRunMetricsResponseReportRunMetricResultStatus `json:"status,omitempty"` + Status *ReportRunMetricsResponseReportRunMetricResultStatus `json:"status,omitempty"` } // Validate validates this report run metrics response report run metric result @@ -44,16 +46,54 @@ func (m *ReportRunMetricsResponseReportRunMetricResult) Validate(formats strfmt. } func (m *ReportRunMetricsResponseReportRunMetricResult) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required return nil } - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// ContextValidate validate this report run metrics response report run metric result based on the context it is used +func (m *ReportRunMetricsResponseReportRunMetricResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ReportRunMetricsResponseReportRunMetricResult) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result_status.go b/backend/api/v1beta1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result_status.go index 19f00402eea..5f7b96fe2b4 100644 --- a/backend/api/v1beta1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result_status.go +++ b/backend/api/v1beta1/go_http_client/run_model/report_run_metrics_response_report_run_metric_result_status.go @@ -6,22 +6,32 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // ReportRunMetricsResponseReportRunMetricResultStatus - UNSPECIFIED: Default value if not present. -// - OK: Indicates successful reporting. -// - INVALID_ARGUMENT: Indicates that the payload of the metric is invalid. -// - DUPLICATE_REPORTING: Indicates that the metric has been reported before. -// - INTERNAL_ERROR: Indicates that something went wrong in the server. +// - OK: Indicates successful reporting. +// - INVALID_ARGUMENT: Indicates that the payload of the metric is invalid. +// - DUPLICATE_REPORTING: Indicates that the metric has been reported before. +// - INTERNAL_ERROR: Indicates that something went wrong in the server. +// // swagger:model ReportRunMetricsResponseReportRunMetricResultStatus type ReportRunMetricsResponseReportRunMetricResultStatus string +func NewReportRunMetricsResponseReportRunMetricResultStatus(value ReportRunMetricsResponseReportRunMetricResultStatus) *ReportRunMetricsResponseReportRunMetricResultStatus { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ReportRunMetricsResponseReportRunMetricResultStatus. +func (m ReportRunMetricsResponseReportRunMetricResultStatus) Pointer() *ReportRunMetricsResponseReportRunMetricResultStatus { + return &m +} + const ( // ReportRunMetricsResponseReportRunMetricResultStatusUNSPECIFIED captures enum value "UNSPECIFIED" @@ -54,7 +64,7 @@ func init() { } func (m ReportRunMetricsResponseReportRunMetricResultStatus) validateReportRunMetricsResponseReportRunMetricResultStatusEnum(path, location string, value ReportRunMetricsResponseReportRunMetricResultStatus) error { - if err := validate.Enum(path, location, value, reportRunMetricsResponseReportRunMetricResultStatusEnum); err != nil { + if err := validate.EnumCase(path, location, value, reportRunMetricsResponseReportRunMetricResultStatusEnum, true); err != nil { return err } return nil @@ -74,3 +84,8 @@ func (m ReportRunMetricsResponseReportRunMetricResultStatus) Validate(formats st } return nil } + +// ContextValidate validates this report run metrics response report run metric result status based on context it is used +func (m ReportRunMetricsResponseReportRunMetricResultStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/run_model/run_metric_format.go b/backend/api/v1beta1/go_http_client/run_model/run_metric_format.go index 6a194f501b0..a454bd9be0c 100644 --- a/backend/api/v1beta1/go_http_client/run_model/run_metric_format.go +++ b/backend/api/v1beta1/go_http_client/run_model/run_metric_format.go @@ -6,20 +6,30 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // RunMetricFormat - UNSPECIFIED: Default value if not present. -// - RAW: Display value as its raw format. -// - PERCENTAGE: Display value in percentage format. +// - RAW: Display value as its raw format. +// - PERCENTAGE: Display value in percentage format. +// // swagger:model RunMetricFormat type RunMetricFormat string +func NewRunMetricFormat(value RunMetricFormat) *RunMetricFormat { + return &value +} + +// Pointer returns a pointer to a freshly-allocated RunMetricFormat. +func (m RunMetricFormat) Pointer() *RunMetricFormat { + return &m +} + const ( // RunMetricFormatUNSPECIFIED captures enum value "UNSPECIFIED" @@ -46,7 +56,7 @@ func init() { } func (m RunMetricFormat) validateRunMetricFormatEnum(path, location string, value RunMetricFormat) error { - if err := validate.Enum(path, location, value, runMetricFormatEnum); err != nil { + if err := validate.EnumCase(path, location, value, runMetricFormatEnum, true); err != nil { return err } return nil @@ -66,3 +76,8 @@ func (m RunMetricFormat) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this run metric format based on context it is used +func (m RunMetricFormat) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/run_model/run_service_report_run_metrics_v1_body.go b/backend/api/v1beta1/go_http_client/run_model/run_service_report_run_metrics_v1_body.go new file mode 100644 index 00000000000..8c506c54268 --- /dev/null +++ b/backend/api/v1beta1/go_http_client/run_model/run_service_report_run_metrics_v1_body.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package run_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RunServiceReportRunMetricsV1Body run service report run metrics v1 body +// +// swagger:model RunServiceReportRunMetricsV1Body +type RunServiceReportRunMetricsV1Body struct { + + // List of metrics to report. + Metrics []*APIRunMetric `json:"metrics"` +} + +// Validate validates this run service report run metrics v1 body +func (m *RunServiceReportRunMetricsV1Body) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetrics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RunServiceReportRunMetricsV1Body) validateMetrics(formats strfmt.Registry) error { + if swag.IsZero(m.Metrics) { // not required + return nil + } + + for i := 0; i < len(m.Metrics); i++ { + if swag.IsZero(m.Metrics[i]) { // not required + continue + } + + if m.Metrics[i] != nil { + if err := m.Metrics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metrics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this run service report run metrics v1 body based on the context it is used +func (m *RunServiceReportRunMetricsV1Body) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMetrics(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RunServiceReportRunMetricsV1Body) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Metrics); i++ { + + if m.Metrics[i] != nil { + + if swag.IsZero(m.Metrics[i]) { // not required + return nil + } + + if err := m.Metrics[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metrics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RunServiceReportRunMetricsV1Body) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RunServiceReportRunMetricsV1Body) UnmarshalBinary(b []byte) error { + var res RunServiceReportRunMetricsV1Body + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1beta1/go_http_client/visualization_client/visualization_client.go b/backend/api/v1beta1/go_http_client/visualization_client/visualization_client.go index a5467d284d0..4a13af3f6f1 100644 --- a/backend/api/v1beta1/go_http_client/visualization_client/visualization_client.go +++ b/backend/api/v1beta1/go_http_client/visualization_client/visualization_client.go @@ -8,8 +8,7 @@ package visualization_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/visualization_client/visualization_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Visualizat cli := new(Visualization) cli.Transport = transport - cli.VisualizationService = visualization_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Visualization is a client for visualization type Visualization struct { - VisualizationService *visualization_service.Client + VisualizationService visualization_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Visualization struct { // SetTransport changes the transport on the client and all its subresources func (c *Visualization) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.VisualizationService.SetTransport(transport) - } diff --git a/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_client.go b/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_client.go index 74320936890..dbed783f636 100644 --- a/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_client.go +++ b/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_client.go @@ -7,15 +7,40 @@ package visualization_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new visualization service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new visualization service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new visualization service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for visualization service API */ @@ -24,16 +49,25 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + VisualizationServiceCreateVisualizationV1(params *VisualizationServiceCreateVisualizationV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VisualizationServiceCreateVisualizationV1OK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* VisualizationServiceCreateVisualizationV1 visualization service create visualization v1 API */ -func (a *Client) VisualizationServiceCreateVisualizationV1(params *VisualizationServiceCreateVisualizationV1Params, authInfo runtime.ClientAuthInfoWriter) (*VisualizationServiceCreateVisualizationV1OK, error) { +func (a *Client) VisualizationServiceCreateVisualizationV1(params *VisualizationServiceCreateVisualizationV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VisualizationServiceCreateVisualizationV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewVisualizationServiceCreateVisualizationV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "VisualizationService_CreateVisualizationV1", Method: "POST", PathPattern: "/apis/v1beta1/visualizations/{namespace}", @@ -45,12 +79,22 @@ func (a *Client) VisualizationServiceCreateVisualizationV1(params *Visualization AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*VisualizationServiceCreateVisualizationV1OK), nil - + success, ok := result.(*VisualizationServiceCreateVisualizationV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*VisualizationServiceCreateVisualizationV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_parameters.go b/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_parameters.go index 82086e4e212..cdf433ab924 100644 --- a/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_parameters.go +++ b/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_parameters.go @@ -13,66 +13,82 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - visualization_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/visualization_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/visualization_model" ) -// NewVisualizationServiceCreateVisualizationV1Params creates a new VisualizationServiceCreateVisualizationV1Params object -// with the default values initialized. +// NewVisualizationServiceCreateVisualizationV1Params creates a new VisualizationServiceCreateVisualizationV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewVisualizationServiceCreateVisualizationV1Params() *VisualizationServiceCreateVisualizationV1Params { - var () return &VisualizationServiceCreateVisualizationV1Params{ - timeout: cr.DefaultTimeout, } } // NewVisualizationServiceCreateVisualizationV1ParamsWithTimeout creates a new VisualizationServiceCreateVisualizationV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewVisualizationServiceCreateVisualizationV1ParamsWithTimeout(timeout time.Duration) *VisualizationServiceCreateVisualizationV1Params { - var () return &VisualizationServiceCreateVisualizationV1Params{ - timeout: timeout, } } // NewVisualizationServiceCreateVisualizationV1ParamsWithContext creates a new VisualizationServiceCreateVisualizationV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewVisualizationServiceCreateVisualizationV1ParamsWithContext(ctx context.Context) *VisualizationServiceCreateVisualizationV1Params { - var () return &VisualizationServiceCreateVisualizationV1Params{ - Context: ctx, } } // NewVisualizationServiceCreateVisualizationV1ParamsWithHTTPClient creates a new VisualizationServiceCreateVisualizationV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewVisualizationServiceCreateVisualizationV1ParamsWithHTTPClient(client *http.Client) *VisualizationServiceCreateVisualizationV1Params { - var () return &VisualizationServiceCreateVisualizationV1Params{ HTTPClient: client, } } -/*VisualizationServiceCreateVisualizationV1Params contains all the parameters to send to the API endpoint -for the visualization service create visualization v1 operation typically these are written to a http.Request +/* +VisualizationServiceCreateVisualizationV1Params contains all the parameters to send to the API endpoint + + for the visualization service create visualization v1 operation. + + Typically these are written to a http.Request. */ type VisualizationServiceCreateVisualizationV1Params struct { - /*Body*/ - Body *visualization_model.APIVisualization - /*Namespace*/ + // Namespace. Namespace string + // Visualization. + Visualization *visualization_model.APIVisualization + timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the visualization service create visualization v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *VisualizationServiceCreateVisualizationV1Params) WithDefaults() *VisualizationServiceCreateVisualizationV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the visualization service create visualization v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *VisualizationServiceCreateVisualizationV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the visualization service create visualization v1 params func (o *VisualizationServiceCreateVisualizationV1Params) WithTimeout(timeout time.Duration) *VisualizationServiceCreateVisualizationV1Params { o.SetTimeout(timeout) @@ -106,17 +122,6 @@ func (o *VisualizationServiceCreateVisualizationV1Params) SetHTTPClient(client * o.HTTPClient = client } -// WithBody adds the body to the visualization service create visualization v1 params -func (o *VisualizationServiceCreateVisualizationV1Params) WithBody(body *visualization_model.APIVisualization) *VisualizationServiceCreateVisualizationV1Params { - o.SetBody(body) - return o -} - -// SetBody adds the body to the visualization service create visualization v1 params -func (o *VisualizationServiceCreateVisualizationV1Params) SetBody(body *visualization_model.APIVisualization) { - o.Body = body -} - // WithNamespace adds the namespace to the visualization service create visualization v1 params func (o *VisualizationServiceCreateVisualizationV1Params) WithNamespace(namespace string) *VisualizationServiceCreateVisualizationV1Params { o.SetNamespace(namespace) @@ -128,6 +133,17 @@ func (o *VisualizationServiceCreateVisualizationV1Params) SetNamespace(namespace o.Namespace = namespace } +// WithVisualization adds the visualization to the visualization service create visualization v1 params +func (o *VisualizationServiceCreateVisualizationV1Params) WithVisualization(visualization *visualization_model.APIVisualization) *VisualizationServiceCreateVisualizationV1Params { + o.SetVisualization(visualization) + return o +} + +// SetVisualization adds the visualization to the visualization service create visualization v1 params +func (o *VisualizationServiceCreateVisualizationV1Params) SetVisualization(visualization *visualization_model.APIVisualization) { + o.Visualization = visualization +} + // WriteToRequest writes these params to a swagger request func (o *VisualizationServiceCreateVisualizationV1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -136,16 +152,15 @@ func (o *VisualizationServiceCreateVisualizationV1Params) WriteToRequest(r runti } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - // path param namespace if err := r.SetPathParam("namespace", o.Namespace); err != nil { return err } + if o.Visualization != nil { + if err := r.SetBodyParam(o.Visualization); err != nil { + return err + } + } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_responses.go b/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_responses.go index e7bbe9bec0e..a960c858adb 100644 --- a/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_responses.go +++ b/backend/api/v1beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_responses.go @@ -6,14 +6,14 @@ package visualization_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - visualization_model "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/visualization_model" + "github.com/kubeflow/pipelines/backend/api/v1beta1/go_http_client/visualization_model" ) // VisualizationServiceCreateVisualizationV1Reader is a Reader for the VisualizationServiceCreateVisualizationV1 structure. @@ -24,14 +24,12 @@ type VisualizationServiceCreateVisualizationV1Reader struct { // ReadResponse reads a server response into the received o. func (o *VisualizationServiceCreateVisualizationV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVisualizationServiceCreateVisualizationV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewVisualizationServiceCreateVisualizationV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewVisualizationServiceCreateVisualizationV1OK() *VisualizationServiceCreat return &VisualizationServiceCreateVisualizationV1OK{} } -/*VisualizationServiceCreateVisualizationV1OK handles this case with default header values. +/* +VisualizationServiceCreateVisualizationV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type VisualizationServiceCreateVisualizationV1OK struct { Payload *visualization_model.APIVisualization } +// IsSuccess returns true when this visualization service create visualization v1 o k response has a 2xx status code +func (o *VisualizationServiceCreateVisualizationV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this visualization service create visualization v1 o k response has a 3xx status code +func (o *VisualizationServiceCreateVisualizationV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this visualization service create visualization v1 o k response has a 4xx status code +func (o *VisualizationServiceCreateVisualizationV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this visualization service create visualization v1 o k response has a 5xx status code +func (o *VisualizationServiceCreateVisualizationV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this visualization service create visualization v1 o k response a status code equal to that given +func (o *VisualizationServiceCreateVisualizationV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the visualization service create visualization v1 o k response +func (o *VisualizationServiceCreateVisualizationV1OK) Code() int { + return 200 +} + func (o *VisualizationServiceCreateVisualizationV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/visualizations/{namespace}][%d] visualizationServiceCreateVisualizationV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/visualizations/{namespace}][%d] visualizationServiceCreateVisualizationV1OK %s", 200, payload) +} + +func (o *VisualizationServiceCreateVisualizationV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/visualizations/{namespace}][%d] visualizationServiceCreateVisualizationV1OK %s", 200, payload) +} + +func (o *VisualizationServiceCreateVisualizationV1OK) GetPayload() *visualization_model.APIVisualization { + return o.Payload } func (o *VisualizationServiceCreateVisualizationV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewVisualizationServiceCreateVisualizationV1Default(code int) *Visualizatio } } -/*VisualizationServiceCreateVisualizationV1Default handles this case with default header values. +/* +VisualizationServiceCreateVisualizationV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type VisualizationServiceCreateVisualizationV1Default struct { _statusCode int - Payload *visualization_model.GatewayruntimeError + Payload *visualization_model.GooglerpcStatus +} + +// IsSuccess returns true when this visualization service create visualization v1 default response has a 2xx status code +func (o *VisualizationServiceCreateVisualizationV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this visualization service create visualization v1 default response has a 3xx status code +func (o *VisualizationServiceCreateVisualizationV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this visualization service create visualization v1 default response has a 4xx status code +func (o *VisualizationServiceCreateVisualizationV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this visualization service create visualization v1 default response has a 5xx status code +func (o *VisualizationServiceCreateVisualizationV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this visualization service create visualization v1 default response a status code equal to that given +func (o *VisualizationServiceCreateVisualizationV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the visualization service create visualization v1 default response @@ -96,12 +161,22 @@ func (o *VisualizationServiceCreateVisualizationV1Default) Code() int { } func (o *VisualizationServiceCreateVisualizationV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v1beta1/visualizations/{namespace}][%d] VisualizationService_CreateVisualizationV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/visualizations/{namespace}][%d] VisualizationService_CreateVisualizationV1 default %s", o._statusCode, payload) +} + +func (o *VisualizationServiceCreateVisualizationV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v1beta1/visualizations/{namespace}][%d] VisualizationService_CreateVisualizationV1 default %s", o._statusCode, payload) +} + +func (o *VisualizationServiceCreateVisualizationV1Default) GetPayload() *visualization_model.GooglerpcStatus { + return o.Payload } func (o *VisualizationServiceCreateVisualizationV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(visualization_model.GatewayruntimeError) + o.Payload = new(visualization_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v1beta1/go_http_client/visualization_model/api_visualization.go b/backend/api/v1beta1/go_http_client/visualization_model/api_visualization.go index 13f1dee9cab..06cdea86a7b 100644 --- a/backend/api/v1beta1/go_http_client/visualization_model/api_visualization.go +++ b/backend/api/v1beta1/go_http_client/visualization_model/api_visualization.go @@ -6,13 +6,15 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // APIVisualization api visualization +// // swagger:model apiVisualization type APIVisualization struct { @@ -36,7 +38,7 @@ type APIVisualization struct { Source string `json:"source,omitempty"` // type - Type APIVisualizationType `json:"type,omitempty"` + Type *APIVisualizationType `json:"type,omitempty"` } // Validate validates this api visualization @@ -54,16 +56,54 @@ func (m *APIVisualization) Validate(formats strfmt.Registry) error { } func (m *APIVisualization) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this api visualization based on the context it is used +func (m *APIVisualization) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *APIVisualization) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v1beta1/go_http_client/visualization_model/api_visualization_type.go b/backend/api/v1beta1/go_http_client/visualization_model/api_visualization_type.go index 38a388d30b3..69958d114bf 100644 --- a/backend/api/v1beta1/go_http_client/visualization_model/api_visualization_type.go +++ b/backend/api/v1beta1/go_http_client/visualization_model/api_visualization_type.go @@ -6,20 +6,30 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // APIVisualizationType Type of visualization to be generated. // This is required when creating the pipeline through CreateVisualization // API. +// // swagger:model apiVisualizationType type APIVisualizationType string +func NewAPIVisualizationType(value APIVisualizationType) *APIVisualizationType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated APIVisualizationType. +func (m APIVisualizationType) Pointer() *APIVisualizationType { + return &m +} + const ( // APIVisualizationTypeROCCURVE captures enum value "ROC_CURVE" @@ -52,7 +62,7 @@ func init() { } func (m APIVisualizationType) validateAPIVisualizationTypeEnum(path, location string, value APIVisualizationType) error { - if err := validate.Enum(path, location, value, apiVisualizationTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, apiVisualizationTypeEnum, true); err != nil { return err } return nil @@ -72,3 +82,8 @@ func (m APIVisualizationType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this api visualization type based on context it is used +func (m APIVisualizationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v1beta1/go_http_client/visualization_model/gatewayruntime_error.go b/backend/api/v1beta1/go_http_client/visualization_model/gatewayruntime_error.go deleted file mode 100644 index 22c6e3bf981..00000000000 --- a/backend/api/v1beta1/go_http_client/visualization_model/gatewayruntime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package visualization_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// GatewayruntimeError gatewayruntime error -// swagger:model gatewayruntimeError -type GatewayruntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this gatewayruntime error -func (m *GatewayruntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GatewayruntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GatewayruntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GatewayruntimeError) UnmarshalBinary(b []byte) error { - var res GatewayruntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v1beta1/go_http_client/visualization_model/googlerpc_status.go b/backend/api/v1beta1/go_http_client/visualization_model/googlerpc_status.go new file mode 100644 index 00000000000..1abeb9ec4f9 --- /dev/null +++ b/backend/api/v1beta1/go_http_client/visualization_model/googlerpc_status.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package visualization_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v1beta1/go_http_client/visualization_model/protobuf_any.go b/backend/api/v1beta1/go_http_client/visualization_model/protobuf_any.go index 79170185217..bd86be1550d 100644 --- a/backend/api/v1beta1/go_http_client/visualization_model/protobuf_any.go +++ b/backend/api/v1beta1/go_http_client/visualization_model/protobuf_any.go @@ -6,9 +6,10 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v1beta1/healthz.proto b/backend/api/v1beta1/healthz.proto index fba81cc3781..c7e5c393f99 100644 --- a/backend/api/v1beta1/healthz.proto +++ b/backend/api/v1beta1/healthz.proto @@ -19,10 +19,9 @@ package api; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -import "protoc-gen-swagger/options/annotations.proto"; -import "backend/api/v1beta1/error.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; @@ -68,5 +67,5 @@ service HealthzService { message GetHealthzResponse { // Returns if KFP in multi-user mode - bool multi_user = 3; + bool multi_user = 3 [json_name = "multi_user"]; } diff --git a/backend/api/v1beta1/job.proto b/backend/api/v1beta1/job.proto index c76b64e9143..67425c4916e 100644 --- a/backend/api/v1beta1/job.proto +++ b/backend/api/v1beta1/job.proto @@ -22,10 +22,9 @@ import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; import "backend/api/v1beta1/pipeline_spec.proto"; import "backend/api/v1beta1/resource_reference.proto"; -import "protoc-gen-swagger/options/annotations.proto"; -import "backend/api/v1beta1/error.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; @@ -120,21 +119,21 @@ message ListJobsRequest { // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListJobs call or can be omitted when fetching the first page. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // The number of jobs to be listed per page. If there are more jobs than this // number, the response message will contain a nextPageToken field you can use // to fetch the next page. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc". // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // What resource reference to filter on. // E.g. If listing job for an experiment, the query string would be // resource_reference_key.type=EXPERIMENT&resource_reference_key.id=123 - ResourceKey resource_reference_key = 4; + ResourceKey resource_reference_key = 4 [json_name = "resource_reference_key"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). @@ -146,10 +145,10 @@ message ListJobsResponse { repeated Job jobs = 1; // The total number of jobs for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of jobs. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message DeleteJobRequest { @@ -170,10 +169,10 @@ message DisableJobRequest { // CronSchedule allow scheduling the job with unix-like cron message CronSchedule { // The start time of the cron job - google.protobuf.Timestamp start_time = 1; + google.protobuf.Timestamp start_time = 1 [json_name = "start_time"]; // The end time of the cron job - google.protobuf.Timestamp end_time = 2; + google.protobuf.Timestamp end_time = 2 [json_name = "end_time"]; // The cron string. For details how to compose a cron, visit // ttps://en.wikipedia.org/wiki/Cron @@ -183,20 +182,20 @@ message CronSchedule { // PeriodicSchedule allow scheduling the job periodically with certain interval message PeriodicSchedule { // The start time of the periodic job - google.protobuf.Timestamp start_time = 1; + google.protobuf.Timestamp start_time = 1 [json_name = "start_time"]; // The end time of the periodic job - google.protobuf.Timestamp end_time = 2; + google.protobuf.Timestamp end_time = 2 [json_name = "end_time"]; // The time interval between the starting time of consecutive jobs - int64 interval_second = 3; + int64 interval_second = 3 [json_name = "interval_second"]; } // Trigger defines what starts a pipeline run. message Trigger { oneof trigger { - CronSchedule cron_schedule = 1; - PeriodicSchedule periodic_schedule = 2; + CronSchedule cron_schedule = 1 [json_name = "cron_schedule"]; + PeriodicSchedule periodic_schedule = 2 [json_name = "periodic_schedule"]; } } @@ -213,17 +212,17 @@ message Job { // Optional input field. // Describing what the pipeline manifest and parameters to use // for the scheduled job. If unset, fetch the pipline_spec at runtime. - PipelineSpec pipeline_spec = 4; + PipelineSpec pipeline_spec = 4 [json_name = "pipeline_spec"]; // Optional input field. Specify which resource this job belongs to. - repeated ResourceReference resource_references = 5; + repeated ResourceReference resource_references = 5 [json_name = "resource_references"]; // Optional input field. Specify which Kubernetes service account this job uses. - string service_account = 18; + string service_account = 18 [json_name = "service_account"]; // Required input field. // Specify how many runs can be executed concurrently. Rage [1-10] - int64 max_concurrency = 6; + int64 max_concurrency = 6 [json_name = "max_concurrency"]; // Required input field. // Specify how a run is triggered. Support cron mode or periodic mode. @@ -239,10 +238,10 @@ message Job { Mode mode = 8; // Output. The time this job is created. - google.protobuf.Timestamp created_at = 9; + google.protobuf.Timestamp created_at = 9 [json_name = "created_at"]; // Output. The last time this job is updated. - google.protobuf.Timestamp updated_at = 10; + google.protobuf.Timestamp updated_at = 10 [json_name = "updated_at"]; // Output. The status of the job. // One of [Enable, Disable, Error] @@ -259,6 +258,6 @@ message Job { // Optional input field. Whether the job should catch up if behind schedule. // If true, the job will only schedule the latest interval if behind schedule. // If false, the job will catch up on each past interval. - bool no_catchup = 17; + bool no_catchup = 17 [json_name = "no_catchup"]; } // Next field number of Job will be 19 diff --git a/backend/api/v1beta1/pipeline.proto b/backend/api/v1beta1/pipeline.proto index 055b08ebce6..6f3f616cf6f 100644 --- a/backend/api/v1beta1/pipeline.proto +++ b/backend/api/v1beta1/pipeline.proto @@ -20,12 +20,11 @@ package api; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; -import "backend/api/v1beta1/error.proto"; import "backend/api/v1beta1/parameter.proto"; import "backend/api/v1beta1/resource_reference.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; @@ -161,7 +160,7 @@ service PipelineService { message Url { // URL of the pipeline definition or the pipeline version definition. - string pipeline_url = 1; + string pipeline_url = 1 [json_name = "pipeline_url"]; } // Create pipeline by providing an URL pointing to the pipeline file, @@ -188,16 +187,16 @@ message ListPipelinesRequest { // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListPipelines call. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // The number of pipelines to be listed per page. If there are more pipelines // than this number, the response message will contain a valid value in the // nextPageToken field. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). @@ -206,17 +205,17 @@ message ListPipelinesRequest { // What resource reference to filter on. // For Pipeline, the only valid resource type is Namespace. An sample query string could be // resource_reference_key.type=NAMESPACE&resource_reference_key.id=ns1 - ResourceKey resource_reference_key = 5; + ResourceKey resource_reference_key = 5 [json_name = "resource_reference_key"]; } message ListPipelinesResponse { repeated Pipeline pipelines = 1; // The total number of pipelines for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of pipelines. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message GetPipelineByNameRequest { @@ -263,21 +262,21 @@ message GetPipelineVersionRequest { message ListPipelineVersionsRequest { // ResourceKey specifies the pipeline whose versions are to be listed. - ResourceKey resource_key = 1; + ResourceKey resource_key = 1 [json_name = "resource_key"]; // The number of pipeline versions to be listed per page. If there are more // pipeline versions than this number, the response message will contain a // nextPageToken field you can use to fetch the next page. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListPipelineVersions call or can be omitted when fetching the first page. - string page_token = 3; + string page_token = 3 [json_name = "page_token"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 4; + string sort_by = 4 [json_name = "sort_by"]; // A base-64 encoded, JSON-serialized Filter protocol buffer (see // filter.proto). string filter = 5; @@ -287,10 +286,10 @@ message ListPipelineVersionsResponse { repeated PipelineVersion versions = 1; // The token to list the next page of pipeline versions. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; // The total number of pipeline versions for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; } message DeletePipelineVersionRequest { @@ -303,7 +302,7 @@ message Pipeline { string id = 1; // Output. The time this pipeline is created. - google.protobuf.Timestamp created_at = 2; + google.protobuf.Timestamp created_at = 2 [json_name = "created_at"]; // Optional input field. Pipeline name provided by user. If not specified, // file name is used as pipeline name. @@ -330,11 +329,11 @@ message Pipeline { // Output only. The default version of the pipeline. As of now, the latest // version is used as default. (In the future, if desired by customers, we // can allow them to set default version.) - PipelineVersion default_version = 8; + PipelineVersion default_version = 8 [json_name = "default_version"]; // Input field. Specify which resource this pipeline belongs to. // For Pipeline, the only valid resource reference is a single Namespace. - repeated ResourceReference resource_references = 9; + repeated ResourceReference resource_references = 9 [json_name = "resource_references"]; } message PipelineVersion { @@ -345,7 +344,7 @@ message PipelineVersion { string name = 2; // Output. The time this pipeline version is created. - google.protobuf.Timestamp created_at = 3; + google.protobuf.Timestamp created_at = 3 [json_name = "created_at"]; // Output. The input parameters for this pipeline. repeated Parameter parameters = 4; @@ -354,16 +353,16 @@ message PipelineVersion { // The code is usually the Python definition of the pipeline and potentially // the related component definitions. This allows users to trace back to how // the pipeline YAML was created. - string code_source_url = 5; + string code_source_url = 5 [json_name = "code_source_url"]; // Input. Required. The URL to the source of the pipeline version. // This is required when creating the pipeine version through // CreatePipelineVersion API. - Url package_url = 6; + Url package_url = 6 [json_name = "package_url"]; // Input field. Specify which resource this pipeline version belongs to. // For Experiment, the only valid resource reference is a single Namespace. - repeated ResourceReference resource_references = 7; + repeated ResourceReference resource_references = 7 [json_name = "resource_references"]; // Input. Optional. Description for the pipeline version. string description = 8; diff --git a/backend/api/v1beta1/pipeline_spec.proto b/backend/api/v1beta1/pipeline_spec.proto index b621ae5edec..d4942cbb927 100644 --- a/backend/api/v1beta1/pipeline_spec.proto +++ b/backend/api/v1beta1/pipeline_spec.proto @@ -22,18 +22,18 @@ import "google/protobuf/struct.proto"; message PipelineSpec { // Optional input field. The ID of the pipeline user uploaded before. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // Optional output field. The name of the pipeline. // Not empty if the pipeline id is not empty. - string pipeline_name = 5; + string pipeline_name = 5 [json_name = "pipeline_name"]; // Optional input field. The marshalled raw argo JSON workflow. // This will be deprecated when pipeline_manifest is in use. - string workflow_manifest = 2; + string workflow_manifest = 2 [json_name = "workflow_manifest"]; // Optional input field. The raw pipeline JSON spec. - string pipeline_manifest = 3; + string pipeline_manifest = 3 [json_name = "pipeline_manifest"]; // The parameter user provide to inject to the pipeline JSON. // If a default value of a parameter exist in the JSON, @@ -50,10 +50,10 @@ message PipelineSpec { // A path in a object store bucket which will be treated as the root // output directory of the pipeline. It is used by the system to // generate the paths of output artifacts. Ref:(https://www.kubeflow.org/docs/components/pipelines/pipeline-root/) - string pipeline_root = 2; + string pipeline_root = 2 [json_name = "pipeline_root"]; } // Runtime config of the pipeline. V2 only - RuntimeConfig runtime_config = 6; + RuntimeConfig runtime_config = 6 [json_name = "runtime_config"]; } diff --git a/backend/api/v1beta1/report.proto b/backend/api/v1beta1/report.proto index d97d24eee97..277ec754391 100644 --- a/backend/api/v1beta1/report.proto +++ b/backend/api/v1beta1/report.proto @@ -43,5 +43,5 @@ message ReportWorkflowRequest{ message ReportScheduledWorkflowRequest{ // ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string. - string scheduled_workflow = 1; + string scheduled_workflow = 1 [json_name = "scheduled_workflow"]; } diff --git a/backend/api/v1beta1/run.proto b/backend/api/v1beta1/run.proto index b6674c3a54f..c5e60fc0f34 100644 --- a/backend/api/v1beta1/run.proto +++ b/backend/api/v1beta1/run.proto @@ -17,15 +17,14 @@ syntax = "proto3"; option go_package = "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client"; package api; -import "backend/api/v1beta1/error.proto"; import "google/protobuf/empty.proto"; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "backend/api/v1beta1/pipeline_spec.proto"; import "backend/api/v1beta1/resource_reference.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; @@ -152,21 +151,21 @@ message ListRunsRequest { // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListRuns call or can be omitted when fetching the first page. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // The number of runs to be listed per page. If there are more runs than this // number, the response message will contain a nextPageToken field you can use // to fetch the next page. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // (Example, "name asc" or "id desc"). Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // What resource reference to filter on. // E.g. If listing run for an experiment, the query string would be // resource_reference_key.type=EXPERIMENT&resource_reference_key.id=123 - ResourceKey resource_reference_key = 4; + ResourceKey resource_reference_key = 4 [json_name = "resource_reference_key"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). @@ -187,10 +186,10 @@ message ListRunsResponse { repeated Run runs = 1; // The total number of runs for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of runs. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message ArchiveRunRequest { @@ -222,34 +221,34 @@ message Run { } // Output. Specify whether this run is in archived or available mode. - StorageState storage_state = 10; + StorageState storage_state = 10 [json_name = "storage_state"]; // Optional input field. Describing the purpose of the run string description = 3; // Required input field. // Describing what the pipeline manifest and parameters to use for the run. - PipelineSpec pipeline_spec = 4; + PipelineSpec pipeline_spec = 4 [json_name = "pipeline_spec"]; // Optional input field. Specify which resource this run belongs to. // When creating a run from a particular pipeline version, the pipeline // version can be specified here. - repeated ResourceReference resource_references = 5; + repeated ResourceReference resource_references = 5 [json_name = "resource_references"]; // Optional input field. Specify which Kubernetes service account this run uses. - string service_account = 14; + string service_account = 14 [json_name = "service_account"]; // Output. The time that the run created. - google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp created_at = 6 [json_name = "created_at"]; // Output. When this run is scheduled to run. This could be different from // created_at. For example, if a run is from a backfilling job that was // supposed to run 2 month ago, the scheduled_at is 2 month ago, // v.s. created_at is the current time. - google.protobuf.Timestamp scheduled_at = 7; + google.protobuf.Timestamp scheduled_at = 7 [json_name = "scheduled_at"]; // Output. The time this run is finished. - google.protobuf.Timestamp finished_at = 13; + google.protobuf.Timestamp finished_at = 13 [json_name = "finished_at"]; // Output. The status of the run. // One of [Pending, Running, Succeeded, Skipped, Failed, Error] @@ -269,11 +268,11 @@ message Run { message PipelineRuntime { // Output. The runtime JSON manifest of the pipeline, including the status // of pipeline steps and fields need for UI visualization etc. - string pipeline_manifest = 10; + string pipeline_manifest = 10 [json_name = "pipeline_manifest"]; // Output. The runtime JSON manifest of the argo workflow. // This is deprecated after pipeline_runtime_manifest is in use. - string workflow_manifest = 11; + string workflow_manifest = 11 [json_name = "workflow_manifest"]; } message RunDetail { @@ -291,11 +290,11 @@ message RunMetric { // found in the RunDetail.workflow.Status. Metric with same (node_id, name) // are considerd as duplicate. Only the first reporting will be recorded. Max // length is 128. - string node_id = 2; + string node_id = 2 [json_name = "node_id"]; oneof value { // The number value of the metric. - double number_value = 3; + double number_value = 3 [json_name = "number_value"]; } enum Format { @@ -312,7 +311,7 @@ message RunMetric { message ReportRunMetricsRequest { // Required. The parent run ID of the metric. - string run_id = 1; + string run_id = 1 [json_name = "run_id"]; // List of metrics to report. repeated RunMetric metrics = 2; @@ -321,10 +320,10 @@ message ReportRunMetricsRequest { message ReportRunMetricsResponse { message ReportRunMetricResult { // Output. The name of the metric. - string metric_name = 1; + string metric_name = 1 [json_name = "metric_name"]; // Output. The ID of the node which reports the metric. - string metric_node_id = 2; + string metric_node_id = 2 [json_name = "metric_node_id"]; enum Status { // Default value if not present. @@ -349,11 +348,11 @@ message ReportRunMetricsResponse { message ReadArtifactRequest { // The ID of the run. - string run_id = 1; + string run_id = 1 [json_name = "run_id"]; // The ID of the running node. - string node_id = 2; + string node_id = 2 [json_name = "node_id"]; // The name of the artifact. - string artifact_name = 3; + string artifact_name = 3 [json_name = "artifact_name"]; } message ReadArtifactResponse { diff --git a/backend/api/v1beta1/swagger/auth.swagger.json b/backend/api/v1beta1/swagger/auth.swagger.json index bf5093480b8..0d25c0b4ad9 100644 --- a/backend/api/v1beta1/swagger/auth.swagger.json +++ b/backend/api/v1beta1/swagger/auth.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/auth.proto", "version": "version not set" }, + "tags": [ + { + "name": "AuthService" + } + ], "schemes": [ "http", "https" @@ -22,25 +27,28 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { "name": "namespace", + "description": "Namespace the resource belongs to.", "in": "query", "required": false, "type": "string" }, { "name": "resources", + "description": "Resource type asking for authorization.", "in": "query", "required": false, "type": "string", @@ -52,6 +60,7 @@ }, { "name": "verb", + "description": "Verb on the resource asking for authorization.", "in": "query", "required": false, "type": "string", @@ -91,12 +100,9 @@ "default": "UNASSIGNED_VERB", "description": "Type of verbs that act on the resources." }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -107,6 +113,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -115,17 +122,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } }, "securityDefinitions": { diff --git a/backend/api/v1beta1/swagger/error.swagger.json b/backend/api/v1beta1/swagger/error.swagger.json index f2fde831394..afcd562d76e 100644 --- a/backend/api/v1beta1/swagger/error.swagger.json +++ b/backend/api/v1beta1/swagger/error.swagger.json @@ -12,12 +12,9 @@ ], "paths": {}, "definitions": { - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -28,6 +25,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -36,17 +34,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v1beta1/swagger/experiment.swagger.json b/backend/api/v1beta1/swagger/experiment.swagger.json index ce7b816af72..43165af6d3f 100644 --- a/backend/api/v1beta1/swagger/experiment.swagger.json +++ b/backend/api/v1beta1/swagger/experiment.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/experiment.proto", "version": "version not set" }, + "tags": [ + { + "name": "ExperimentService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -104,13 +109,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "experiment", "description": "The experiment to be created.", "in": "body", "required": true, @@ -138,7 +143,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -162,13 +167,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -194,13 +200,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -226,13 +233,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -275,6 +283,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Optional input field. Specify which resource this run belongs to.\nFor Experiment, the only valid resource reference is a single Namespace." @@ -300,6 +309,7 @@ "experiments": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiExperiment" }, "description": "A list of experiments returned." @@ -365,12 +375,9 @@ ], "default": "UNKNOWN_RESOURCE_TYPE" }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -381,6 +388,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -389,17 +397,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } }, "securityDefinitions": { diff --git a/backend/api/v1beta1/swagger/filter.swagger.json b/backend/api/v1beta1/swagger/filter.swagger.json index 81e1ef337ac..8d1f8791f47 100644 --- a/backend/api/v1beta1/swagger/filter.swagger.json +++ b/backend/api/v1beta1/swagger/filter.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/filter.proto", "version": "version not set" }, + "tags": [ + { + "name": "DummyFilterService" + } + ], "consumes": [ "application/json" ], @@ -34,6 +39,7 @@ "predicates": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiPredicate" }, "description": "All predicates are AND-ed when this filter is applied." @@ -114,12 +120,9 @@ } } }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -130,6 +133,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -138,17 +142,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v1beta1/swagger/healthz.swagger.json b/backend/api/v1beta1/swagger/healthz.swagger.json index b462d3d0b09..502ac02cc0f 100644 --- a/backend/api/v1beta1/swagger/healthz.swagger.json +++ b/backend/api/v1beta1/swagger/healthz.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/healthz.proto", "version": "version not set" }, + "tags": [ + { + "name": "HealthzService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -49,12 +54,9 @@ } } }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -65,6 +67,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -73,17 +76,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } }, "securityDefinitions": { diff --git a/backend/api/v1beta1/swagger/job.swagger.json b/backend/api/v1beta1/swagger/job.swagger.json index f2040b45b3e..46ef040a576 100644 --- a/backend/api/v1beta1/swagger/job.swagger.json +++ b/backend/api/v1beta1/swagger/job.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/job.proto", "version": "version not set" }, + "tags": [ + { + "name": "JobService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -104,13 +109,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "job", "description": "The job to be created", "in": "body", "required": true, @@ -138,7 +143,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -162,13 +167,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -194,13 +200,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -226,13 +233,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -267,9 +275,7 @@ "properties": { "parameters": { "type": "object", - "additionalProperties": { - "type": "object" - }, + "additionalProperties": {}, "description": "The runtime parameters of the PipelineSpec. The parameters will be\nused to replace the placeholders\nat runtime." }, "pipeline_root": { @@ -321,6 +327,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Optional input field. Specify which resource this job belongs to." @@ -375,6 +382,7 @@ "jobs": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiJob" }, "description": "A list of jobs returned." @@ -444,6 +452,7 @@ "parameters": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiParameter" }, "title": "The parameter user provide to inject to the pipeline JSON.\nIf a default value of a parameter exist in the JSON,\nthe value user provided here will replace. V1 only" @@ -516,12 +525,9 @@ }, "description": "Trigger defines what starts a pipeline run." }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -532,6 +538,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -540,17 +547,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "protobufNullValue": { "type": "string", @@ -558,7 +561,7 @@ "NULL_VALUE" ], "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." } }, "securityDefinitions": { diff --git a/backend/api/v1beta1/swagger/kfp_api_single_file.swagger.json b/backend/api/v1beta1/swagger/kfp_api_single_file.swagger.json index 697b76bfb97..3bd2c7081eb 100644 --- a/backend/api/v1beta1/swagger/kfp_api_single_file.swagger.json +++ b/backend/api/v1beta1/swagger/kfp_api_single_file.swagger.json @@ -14,6 +14,11 @@ "url": "https://raw.githubusercontent.com/kubeflow/pipelines/master/LICENSE" } }, + "tags": [ + { + "name": "HealthzService" + } + ], "schemes": [ "http", "https" @@ -39,7 +44,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -114,13 +119,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "experiment", "description": "The experiment to be created.", "in": "body", "required": true, @@ -148,7 +153,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -172,13 +177,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -204,13 +210,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -236,13 +243,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -274,7 +282,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -349,13 +357,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "run", "in": "body", "required": true, "schema": { @@ -376,13 +384,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -408,13 +417,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -440,13 +450,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -478,7 +489,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -510,7 +521,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -550,13 +561,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -582,13 +594,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -620,7 +633,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -637,7 +650,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/apiReportRunMetricsRequest" + "$ref": "#/definitions/RunServiceReportRunMetricsV1Body" } } ], @@ -660,7 +673,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -735,13 +748,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "job", "description": "The job to be created", "in": "body", "required": true, @@ -769,7 +782,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -793,13 +806,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -825,13 +839,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -857,13 +872,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -895,7 +911,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -934,7 +950,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1009,13 +1025,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "version", "description": "ResourceReference inside PipelineVersion specifies the pipeline that this\nversion belongs to.", "in": "body", "required": true, @@ -1043,7 +1059,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1067,13 +1083,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1105,7 +1122,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1137,7 +1154,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1212,13 +1229,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "pipeline", "in": "body", "required": true, "schema": { @@ -1245,7 +1262,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1269,13 +1286,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1307,7 +1325,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1333,13 +1351,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1494,7 +1513,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1528,6 +1547,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Optional input field. Specify which resource this run belongs to.\nFor Experiment, the only valid resource reference is a single Namespace." @@ -1553,6 +1573,7 @@ "experiments": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiExperiment" }, "description": "A list of experiments returned." @@ -1618,12 +1639,9 @@ ], "default": "UNKNOWN_RESOURCE_TYPE" }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -1634,6 +1652,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -1642,9 +1661,13 @@ "protobufAny": { "type": "object", "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, "type_url": { "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." }, "value": { "type": "string", @@ -1652,16 +1675,15 @@ "description": "Must be a valid serialized protocol buffer of the above specified type." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "PipelineSpecRuntimeConfig": { "type": "object", "properties": { "parameters": { "type": "object", - "additionalProperties": { - "type": "object" - }, + "additionalProperties": {}, "description": "The runtime parameters of the PipelineSpec. The parameters will be\nused to replace the placeholders\nat runtime." }, "pipeline_root": { @@ -1714,12 +1736,26 @@ "default": "UNSPECIFIED", "description": " - UNSPECIFIED: Default value if not present.\n - RAW: Display value as its raw format.\n - PERCENTAGE: Display value in percentage format." }, + "RunServiceReportRunMetricsV1Body": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/apiRunMetric" + }, + "description": "List of metrics to report." + } + } + }, "apiListRunsResponse": { "type": "object", "properties": { "runs": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiRun" } }, @@ -1780,6 +1816,7 @@ "parameters": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiParameter" }, "title": "The parameter user provide to inject to the pipeline JSON.\nIf a default value of a parameter exist in the JSON,\nthe value user provided here will replace. V1 only" @@ -1800,28 +1837,13 @@ } } }, - "apiReportRunMetricsRequest": { - "type": "object", - "properties": { - "run_id": { - "type": "string", - "description": "Required. The parent run ID of the metric." - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/apiRunMetric" - }, - "description": "List of metrics to report." - } - } - }, "apiReportRunMetricsResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ReportRunMetricsResponseReportRunMetricResult" } } @@ -1853,6 +1875,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Optional input field. Specify which resource this run belongs to.\nWhen creating a run from a particular pipeline version, the pipeline\nversion can be specified here." @@ -1887,6 +1910,7 @@ "metrics": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiRunMetric" }, "description": "Output. The metrics of the run. The metrics are reported by ReportMetrics\nAPI." @@ -1940,7 +1964,7 @@ "NULL_VALUE" ], "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." }, "JobMode": { "type": "string", @@ -1994,6 +2018,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Optional input field. Specify which resource this job belongs to." @@ -2048,6 +2073,7 @@ "jobs": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiJob" }, "description": "A list of jobs returned." @@ -2111,6 +2137,7 @@ "versions": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiPipelineVersion" } }, @@ -2131,6 +2158,7 @@ "pipelines": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiPipeline" } }, @@ -2168,6 +2196,7 @@ "parameters": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiParameter" }, "description": "Output. The input parameters for this pipeline.\nTODO(jingzhang36): replace this parameters field with the parameters field\ninside PipelineVersion when all usage of the former has been changed to use\nthe latter." @@ -2188,6 +2217,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Input field. Specify which resource this pipeline belongs to.\nFor Pipeline, the only valid resource reference is a single Namespace." @@ -2213,6 +2243,7 @@ "parameters": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiParameter" }, "description": "Output. The input parameters for this pipeline." @@ -2228,6 +2259,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Input. Required. E.g., specify which pipeline this pipeline version belongs\nto." diff --git a/backend/api/v1beta1/swagger/parameter.swagger.json b/backend/api/v1beta1/swagger/parameter.swagger.json index a96ffbcb7e5..44223c92cdb 100644 --- a/backend/api/v1beta1/swagger/parameter.swagger.json +++ b/backend/api/v1beta1/swagger/parameter.swagger.json @@ -12,12 +12,9 @@ ], "paths": {}, "definitions": { - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -28,6 +25,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -36,17 +34,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v1beta1/swagger/pipeline.swagger.json b/backend/api/v1beta1/swagger/pipeline.swagger.json index 941461c94c1..b22b0860cd8 100644 --- a/backend/api/v1beta1/swagger/pipeline.swagger.json +++ b/backend/api/v1beta1/swagger/pipeline.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/pipeline.proto", "version": "version not set" }, + "tags": [ + { + "name": "PipelineService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -68,7 +73,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -143,13 +148,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "version", "description": "ResourceReference inside PipelineVersion specifies the pipeline that this\nversion belongs to.", "in": "body", "required": true, @@ -177,7 +182,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -201,13 +206,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -239,7 +245,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -271,7 +277,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -346,13 +352,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "pipeline", "in": "body", "required": true, "schema": { @@ -379,7 +385,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -403,13 +409,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -441,7 +448,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -467,13 +474,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -515,6 +523,7 @@ "versions": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiPipelineVersion" } }, @@ -535,6 +544,7 @@ "pipelines": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiPipeline" } }, @@ -583,6 +593,7 @@ "parameters": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiParameter" }, "description": "Output. The input parameters for this pipeline.\nTODO(jingzhang36): replace this parameters field with the parameters field\ninside PipelineVersion when all usage of the former has been changed to use\nthe latter." @@ -603,6 +614,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Input field. Specify which resource this pipeline belongs to.\nFor Pipeline, the only valid resource reference is a single Namespace." @@ -628,6 +640,7 @@ "parameters": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiParameter" }, "description": "Output. The input parameters for this pipeline." @@ -643,6 +656,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Input field. Specify which resource this pipeline version belongs to.\nFor Experiment, the only valid resource reference is a single Namespace." @@ -712,12 +726,9 @@ } } }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -728,6 +739,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -736,17 +748,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } }, "securityDefinitions": { diff --git a/backend/api/v1beta1/swagger/pipeline_spec.swagger.json b/backend/api/v1beta1/swagger/pipeline_spec.swagger.json index 4eba2f9f1c8..370e8f9011f 100644 --- a/backend/api/v1beta1/swagger/pipeline_spec.swagger.json +++ b/backend/api/v1beta1/swagger/pipeline_spec.swagger.json @@ -12,12 +12,9 @@ ], "paths": {}, "definitions": { - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -28,6 +25,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -36,17 +34,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v1beta1/swagger/report.swagger.json b/backend/api/v1beta1/swagger/report.swagger.json index a0aebc85e68..a9cf8175710 100644 --- a/backend/api/v1beta1/swagger/report.swagger.json +++ b/backend/api/v1beta1/swagger/report.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/report.proto", "version": "version not set" }, + "tags": [ + { + "name": "ReportService" + } + ], "consumes": [ "application/json" ], @@ -18,19 +23,20 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "scheduled_workflow", "description": "ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string.", "in": "body", "required": true, @@ -51,19 +57,20 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "workflow", "description": "Workflow is a workflow custom resource marshalled into a json string.", "in": "body", "required": true, @@ -79,12 +86,9 @@ } }, "definitions": { - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -95,6 +99,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -103,17 +108,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v1beta1/swagger/resource_reference.swagger.json b/backend/api/v1beta1/swagger/resource_reference.swagger.json index 5419f292ea0..2d0ae3aa03e 100644 --- a/backend/api/v1beta1/swagger/resource_reference.swagger.json +++ b/backend/api/v1beta1/swagger/resource_reference.swagger.json @@ -12,12 +12,9 @@ ], "paths": {}, "definitions": { - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -28,6 +25,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -36,17 +34,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v1beta1/swagger/run.swagger.json b/backend/api/v1beta1/swagger/run.swagger.json index a107ca6e0ad..6a04e552e14 100644 --- a/backend/api/v1beta1/swagger/run.swagger.json +++ b/backend/api/v1beta1/swagger/run.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/run.proto", "version": "version not set" }, + "tags": [ + { + "name": "RunService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -104,13 +109,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "run", "in": "body", "required": true, "schema": { @@ -131,13 +136,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -163,13 +169,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -195,13 +202,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -233,7 +241,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -265,7 +273,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -305,13 +313,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -337,13 +346,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -375,7 +385,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -392,7 +402,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/apiReportRunMetricsRequest" + "$ref": "#/definitions/RunServiceReportRunMetricsV1Body" } } ], @@ -408,9 +418,7 @@ "properties": { "parameters": { "type": "object", - "additionalProperties": { - "type": "object" - }, + "additionalProperties": {}, "description": "The runtime parameters of the PipelineSpec. The parameters will be\nused to replace the placeholders\nat runtime." }, "pipeline_root": { @@ -463,12 +471,26 @@ "default": "UNSPECIFIED", "description": " - UNSPECIFIED: Default value if not present.\n - RAW: Display value as its raw format.\n - PERCENTAGE: Display value in percentage format." }, + "RunServiceReportRunMetricsV1Body": { + "type": "object", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/apiRunMetric" + }, + "description": "List of metrics to report." + } + } + }, "apiListRunsResponse": { "type": "object", "properties": { "runs": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiRun" } }, @@ -529,6 +551,7 @@ "parameters": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiParameter" }, "title": "The parameter user provide to inject to the pipeline JSON.\nIf a default value of a parameter exist in the JSON,\nthe value user provided here will replace. V1 only" @@ -558,28 +581,13 @@ ], "default": "UNKNOWN_RELATIONSHIP" }, - "apiReportRunMetricsRequest": { - "type": "object", - "properties": { - "run_id": { - "type": "string", - "description": "Required. The parent run ID of the metric." - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/apiRunMetric" - }, - "description": "List of metrics to report." - } - } - }, "apiReportRunMetricsResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ReportRunMetricsResponseReportRunMetricResult" } } @@ -652,6 +660,7 @@ "resource_references": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiResourceReference" }, "description": "Optional input field. Specify which resource this run belongs to.\nWhen creating a run from a particular pipeline version, the pipeline\nversion can be specified here." @@ -686,6 +695,7 @@ "metrics": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiRunMetric" }, "description": "Output. The metrics of the run. The metrics are reported by ReportMetrics\nAPI." @@ -733,12 +743,9 @@ ], "default": "STORAGESTATE_AVAILABLE" }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -749,6 +756,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -757,17 +765,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "protobufNullValue": { "type": "string", @@ -775,7 +779,7 @@ "NULL_VALUE" ], "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." } }, "securityDefinitions": { diff --git a/backend/api/v1beta1/swagger/task.swagger.json b/backend/api/v1beta1/swagger/task.swagger.json index 441858f57fd..f9310ebca5a 100644 --- a/backend/api/v1beta1/swagger/task.swagger.json +++ b/backend/api/v1beta1/swagger/task.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/task.proto", "version": "version not set" }, + "tags": [ + { + "name": "TaskService" + } + ], "consumes": [ "application/json" ], @@ -25,7 +30,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -100,13 +105,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "task", "in": "body", "required": true, "schema": { @@ -127,6 +132,7 @@ "tasks": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/apiTask" }, "description": "A list of tasks returned." @@ -206,12 +212,9 @@ } } }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -222,6 +225,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -230,17 +234,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v1beta1/swagger/visualization.swagger.json b/backend/api/v1beta1/swagger/visualization.swagger.json index 2f8c41fd381..1eb1d6ca50e 100644 --- a/backend/api/v1beta1/swagger/visualization.swagger.json +++ b/backend/api/v1beta1/swagger/visualization.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v1beta1/visualization.proto", "version": "version not set" }, + "tags": [ + { + "name": "VisualizationService" + } + ], "schemes": [ "http", "https" @@ -28,7 +33,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/gatewayruntimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -40,7 +45,7 @@ "type": "string" }, { - "name": "body", + "name": "visualization", "in": "body", "required": true, "schema": { @@ -91,12 +96,9 @@ "default": "ROC_CURVE", "description": "Type of visualization to be generated.\nThis is required when creating the pipeline through CreateVisualization\nAPI." }, - "gatewayruntimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", "format": "int32" @@ -107,6 +109,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" } } @@ -115,17 +118,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } }, "securityDefinitions": { diff --git a/backend/api/v1beta1/task.proto b/backend/api/v1beta1/task.proto index 52ac87d6704..03cfc28e714 100644 --- a/backend/api/v1beta1/task.proto +++ b/backend/api/v1beta1/task.proto @@ -32,19 +32,19 @@ message Task { // Namespace will be encoded in the PipelineName. // "namespace/${namespace}/pipeline/${pipelineName}" for namespaced pipelines // "pipeline/${pipelineName}" for shared pipelines - string pipelineName = 3; + string pipelineName = 3 [json_name = "pipelineName"]; // Required input field.The ID of the PipelineRun that the PipelineTask belongs to. - string runId = 4; + string runId = 4 [json_name = "runId"]; // Required input field. The ID of the MLMD execution associated with the PipelineTask. - string mlmdExecutionID = 5; + string mlmdExecutionID = 5 [json_name = "mlmdExecutionID"]; // Required input field. The time this task is created. - google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp created_at = 6 [json_name = "created_at"]; // Optional input field. The time this task is finished. - google.protobuf.Timestamp finished_at = 7; + google.protobuf.Timestamp finished_at = 7 [json_name = "finished_at"]; // Required input field. string fingerprint = 8; @@ -75,21 +75,21 @@ message ListTasksRequest { // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListExperiment call or can be omitted when fetching the first page. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // The number of experiments to be listed per page. If there are more // experiments than this number, the response message will contain a // nextPageToken field you can use to fetch the next page. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // What resource reference to filter on. // E.g. If listing tasks for an pipeline run, the query string would be // resource_reference_key.type="PIPELINE"&resource_reference_key.id=123 - ResourceKey resource_reference_key = 4; + ResourceKey resource_reference_key = 4 [json_name = "resource_reference_key"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v1beta1/filter.proto)). @@ -103,8 +103,8 @@ message ListTasksResponse { repeated Task tasks = 1; // The token to list the next page of experiments. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; // The total number of experiments for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; } diff --git a/backend/api/v1beta1/visualization.proto b/backend/api/v1beta1/visualization.proto index 168f84f1cf3..56053ae0d02 100644 --- a/backend/api/v1beta1/visualization.proto +++ b/backend/api/v1beta1/visualization.proto @@ -18,10 +18,9 @@ option go_package = "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client package api; import "google/api/annotations.proto"; -import "backend/api/v1beta1/error.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; diff --git a/backend/api/v2beta1/auth.proto b/backend/api/v2beta1/auth.proto index 4d6e0ddc2f9..e119f7c3faf 100644 --- a/backend/api/v2beta1/auth.proto +++ b/backend/api/v2beta1/auth.proto @@ -19,10 +19,9 @@ package kubeflow.pipelines.backend.api.v2beta1; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -import "protoc-gen-swagger/options/annotations.proto"; -import "google/rpc/status.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; diff --git a/backend/api/v2beta1/experiment.proto b/backend/api/v2beta1/experiment.proto index 9e4a13f5007..b60d3c5e7a1 100644 --- a/backend/api/v2beta1/experiment.proto +++ b/backend/api/v2beta1/experiment.proto @@ -20,10 +20,10 @@ package kubeflow.pipelines.backend.api.v2beta1; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { - schemes: [1, 2], // http + https +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + schemes: [1, 2]; // http + https }; service ExperimentService { @@ -76,16 +76,16 @@ service ExperimentService { message Experiment { // Output. Unique experiment ID. Generated by API server. - string experiment_id = 1; + string experiment_id = 1 [json_name = "experiment_id"]; // Required input field. Unique experiment name provided by user. - string display_name = 2; + string display_name = 2 [json_name = "display_name"]; // Optional input field. Describes the purpose of the experiment. string description = 3; // Output. The time that the experiment was created. - google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp created_at = 4 [json_name = "created_at"]; // Optional input field. Specify the namespace this experiment belongs to. string namespace = 5; @@ -103,10 +103,10 @@ message Experiment { } // Output. Specifies whether this experiment is in archived or available state. - StorageState storage_state = 6; + StorageState storage_state = 6 [json_name = "storage_state"]; // Output. The creation time of the last run in this experiment. - google.protobuf.Timestamp last_run_created_at = 7; + google.protobuf.Timestamp last_run_created_at = 7 [json_name = "last_run_created_at"]; } message CreateExperimentRequest { @@ -116,23 +116,23 @@ message CreateExperimentRequest { message GetExperimentRequest { // The ID of the experiment to be retrieved. - string experiment_id = 1; + string experiment_id = 1 [json_name = "experiment_id"]; } message ListExperimentsRequest { // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListExperiments call or can be omitted when fetching the first page. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // The number of experiments to be listed per page. If there are more // experiments than this number, the response message will contain a // nextPageToken field you can use to fetch the next page. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)). @@ -147,23 +147,23 @@ message ListExperimentsResponse { repeated Experiment experiments = 1; // The number of experiments for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; // The token to list the next page of experiments. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; } message DeleteExperimentRequest { // The ID of the experiment to be deleted. - string experiment_id = 1; + string experiment_id = 1 [json_name = "experiment_id"]; } message ArchiveExperimentRequest { // The ID of the experiment to be archived. - string experiment_id = 1; + string experiment_id = 1 [json_name = "experiment_id"]; } message UnarchiveExperimentRequest { // The ID of the experiment to be restored. - string experiment_id = 1; + string experiment_id = 1 [json_name = "experiment_id"]; } \ No newline at end of file diff --git a/backend/api/v2beta1/filter.proto b/backend/api/v2beta1/filter.proto index d03c6ca8658..6d531ce6894 100644 --- a/backend/api/v2beta1/filter.proto +++ b/backend/api/v2beta1/filter.proto @@ -116,39 +116,39 @@ message Predicate { message IntValues { repeated int32 values = 1; } - + // List of strings. message StringValues { repeated string values = 2; } - + // List of long integers. message LongValues { repeated int64 values = 3; } - + // Value for the operation (second argument). oneof value { // Integer. - int32 int_value = 3; + int32 int_value = 3 [json_name = "int_value"]; // Long integer. - int64 long_value = 4; + int64 long_value = 4 [json_name = "long_value"]; // String. - string string_value = 5; + string string_value = 5 [json_name = "string_value"]; // Timestamp values will be converted to Unix time (seconds since the epoch) // prior to being used in a filtering operation. - google.protobuf.Timestamp timestamp_value = 6; + google.protobuf.Timestamp timestamp_value = 6 [json_name = "timestamp_value"]; // Array values below are only meant to be used by the IN operator. - IntValues int_values = 7; + IntValues int_values = 7 [json_name = "int_values"]; // List of long integers. - LongValues long_values = 8; + LongValues long_values = 8 [json_name = "long_values"]; // List of strings. - StringValues string_values = 9; + StringValues string_values = 9 [json_name = "string_values"]; } -} \ No newline at end of file +} diff --git a/backend/api/v2beta1/go_client/auth.pb.go b/backend/api/v2beta1/go_client/auth.pb.go index bbf196283bd..55db52b2bf5 100644 --- a/backend/api/v2beta1/go_client/auth.pb.go +++ b/backend/api/v2beta1/go_client/auth.pb.go @@ -14,25 +14,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/auth.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - _ "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -146,22 +142,19 @@ func (AuthorizeRequest_Verb) EnumDescriptor() ([]byte, []int) { // and verb. User identity is not part of the message, because it is expected // to be parsed from request headers. Caller should proxy user request's headers. type AuthorizeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // Namespace the resource belongs to. + Resources AuthorizeRequest_Resources `protobuf:"varint,2,opt,name=resources,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest_Resources" json:"resources,omitempty"` // Resource type asking for authorization. + Verb AuthorizeRequest_Verb `protobuf:"varint,3,opt,name=verb,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest_Verb" json:"verb,omitempty"` // Verb on the resource asking for authorization. unknownFields protoimpl.UnknownFields - - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // Namespace the resource belongs to. - Resources AuthorizeRequest_Resources `protobuf:"varint,2,opt,name=resources,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest_Resources" json:"resources,omitempty"` // Resource type asking for authorization. - Verb AuthorizeRequest_Verb `protobuf:"varint,3,opt,name=verb,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest_Verb" json:"verb,omitempty"` // Verb on the resource asking for authorization. + sizeCache protoimpl.SizeCache } func (x *AuthorizeRequest) Reset() { *x = AuthorizeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_auth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuthorizeRequest) String() string { @@ -172,7 +165,7 @@ func (*AuthorizeRequest) ProtoMessage() {} func (x *AuthorizeRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_auth_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -210,78 +203,48 @@ func (x *AuthorizeRequest) GetVerb() AuthorizeRequest_Verb { var File_backend_api_v2beta1_auth_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_auth_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, - 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x02, 0x0a, 0x10, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x60, 0x0a, - 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x42, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x51, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, - 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x04, 0x76, 0x65, - 0x72, 0x62, 0x22, 0x32, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x52, 0x45, - 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x49, 0x45, - 0x57, 0x45, 0x52, 0x53, 0x10, 0x01, 0x22, 0x3c, 0x0a, 0x04, 0x56, 0x65, 0x72, 0x62, 0x12, 0x13, - 0x0a, 0x0f, 0x55, 0x4e, 0x41, 0x53, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x5f, 0x56, 0x45, 0x52, - 0x42, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, - 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, - 0x54, 0x45, 0x10, 0x03, 0x32, 0x88, 0x01, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x65, 0x12, 0x38, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x42, - 0x98, 0x01, 0x92, 0x41, 0x58, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x23, 0x0a, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, - 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, - 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x3b, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} +const file_backend_api_v2beta1_auth_proto_rawDesc = "" + + "\n" + + "\x1ebackend/api/v2beta1/auth.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xd7\x02\n" + + "\x10AuthorizeRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12`\n" + + "\tresources\x18\x02 \x01(\x0e2B.kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest.ResourcesR\tresources\x12Q\n" + + "\x04verb\x18\x03 \x01(\x0e2=.kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest.VerbR\x04verb\"2\n" + + "\tResources\x12\x18\n" + + "\x14UNASSIGNED_RESOURCES\x10\x00\x12\v\n" + + "\aVIEWERS\x10\x01\"<\n" + + "\x04Verb\x12\x13\n" + + "\x0fUNASSIGNED_VERB\x10\x00\x12\n" + + "\n" + + "\x06CREATE\x10\x01\x12\a\n" + + "\x03GET\x10\x02\x12\n" + + "\n" + + "\x06DELETE\x10\x032\x88\x01\n" + + "\vAuthService\x12y\n" + + "\tAuthorize\x128.kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest\x1a\x16.google.protobuf.Empty\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/apis/v2beta1/authB\x98\x01\x92AX*\x02\x01\x02R#\n" + + "\adefault\x12\x18\x12\x16\n" + + "\x14\x1a\x12.google.rpc.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_auth_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_auth_proto_rawDescData = file_backend_api_v2beta1_auth_proto_rawDesc + file_backend_api_v2beta1_auth_proto_rawDescData []byte ) func file_backend_api_v2beta1_auth_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_auth_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_auth_proto_rawDescData) + file_backend_api_v2beta1_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_auth_proto_rawDesc), len(file_backend_api_v2beta1_auth_proto_rawDesc))) }) return file_backend_api_v2beta1_auth_proto_rawDescData } var file_backend_api_v2beta1_auth_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_backend_api_v2beta1_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_backend_api_v2beta1_auth_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_auth_proto_goTypes = []any{ (AuthorizeRequest_Resources)(0), // 0: kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest.Resources (AuthorizeRequest_Verb)(0), // 1: kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest.Verb (*AuthorizeRequest)(nil), // 2: kubeflow.pipelines.backend.api.v2beta1.AuthorizeRequest @@ -304,25 +267,11 @@ func file_backend_api_v2beta1_auth_proto_init() { if File_backend_api_v2beta1_auth_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthorizeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_auth_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_auth_proto_rawDesc), len(file_backend_api_v2beta1_auth_proto_rawDesc)), NumEnums: 2, NumMessages: 1, NumExtensions: 0, @@ -334,87 +283,6 @@ func file_backend_api_v2beta1_auth_proto_init() { MessageInfos: file_backend_api_v2beta1_auth_proto_msgTypes, }.Build() File_backend_api_v2beta1_auth_proto = out.File - file_backend_api_v2beta1_auth_proto_rawDesc = nil file_backend_api_v2beta1_auth_proto_goTypes = nil file_backend_api_v2beta1_auth_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AuthServiceClient is the client API for AuthService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AuthServiceClient interface { - Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type authServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { - return &authServiceClient{cc} -} - -func (c *authServiceClient) Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.AuthService/Authorize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuthServiceServer is the server API for AuthService service. -type AuthServiceServer interface { - Authorize(context.Context, *AuthorizeRequest) (*emptypb.Empty, error) -} - -// UnimplementedAuthServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAuthServiceServer struct { -} - -func (*UnimplementedAuthServiceServer) Authorize(context.Context, *AuthorizeRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented") -} - -func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) { - s.RegisterService(&_AuthService_serviceDesc, srv) -} - -func _AuthService_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthorizeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).Authorize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.AuthService/Authorize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).Authorize(ctx, req.(*AuthorizeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AuthService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.AuthService", - HandlerType: (*AuthServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Authorize", - Handler: _AuthService_Authorize_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/auth.proto", -} diff --git a/backend/api/v2beta1/go_client/auth.pb.gw.go b/backend/api/v2beta1/go_client/auth.pb.gw.go index fde469f9c34..37bb8080044 100644 --- a/backend/api/v2beta1/go_client/auth.pb.gw.go +++ b/backend/api/v2beta1/go_client/auth.pb.gw.go @@ -10,92 +10,91 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - var ( - filter_AuthService_Authorize_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_AuthService_Authorize_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AuthorizeRequest - var metadata runtime.ServerMetadata +var filter_AuthService_Authorize_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_AuthService_Authorize_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AuthorizeRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_Authorize_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Authorize(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AuthService_Authorize_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AuthorizeRequest - var metadata runtime.ServerMetadata - + var ( + protoReq AuthorizeRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_Authorize_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Authorize(ctx, &protoReq) return msg, metadata, err - } // RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux". // UnaryRPC :call AuthServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error { - - mux.Handle("GET", pattern_AuthService_Authorize_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_AuthService_Authorize_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.AuthService/Authorize", runtime.WithHTTPPathPattern("/apis/v2beta1/auth")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AuthService_Authorize_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AuthService_Authorize_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_AuthService_Authorize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_AuthService_Authorize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -104,25 +103,24 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterAuthServiceHandler(ctx, mux, conn) } @@ -136,34 +134,30 @@ func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AuthServiceClient" to call the correct interceptors. +// "AuthServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error { - - mux.Handle("GET", pattern_AuthService_Authorize_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_AuthService_Authorize_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.AuthService/Authorize", runtime.WithHTTPPathPattern("/apis/v2beta1/auth")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AuthService_Authorize_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_AuthService_Authorize_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_AuthService_Authorize_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_AuthService_Authorize_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_AuthService_Authorize_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "auth"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_AuthService_Authorize_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "auth"}, "")) ) var ( diff --git a/backend/api/v2beta1/go_client/auth_grpc.pb.go b/backend/api/v2beta1/go_client/auth_grpc.pb.go new file mode 100644 index 00000000000..989c0a84118 --- /dev/null +++ b/backend/api/v2beta1/go_client/auth_grpc.pb.go @@ -0,0 +1,136 @@ +// Copyright 2023 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/auth.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + AuthService_Authorize_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.AuthService/Authorize" +) + +// AuthServiceClient is the client API for AuthService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AuthServiceClient interface { + Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type authServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { + return &authServiceClient{cc} +} + +func (c *authServiceClient) Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, AuthService_Authorize_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthServiceServer is the server API for AuthService service. +// All implementations must embed UnimplementedAuthServiceServer +// for forward compatibility. +type AuthServiceServer interface { + Authorize(context.Context, *AuthorizeRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedAuthServiceServer() +} + +// UnimplementedAuthServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAuthServiceServer struct{} + +func (UnimplementedAuthServiceServer) Authorize(context.Context, *AuthorizeRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented") +} +func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {} +func (UnimplementedAuthServiceServer) testEmbeddedByValue() {} + +// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuthServiceServer will +// result in compilation errors. +type UnsafeAuthServiceServer interface { + mustEmbedUnimplementedAuthServiceServer() +} + +func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) { + // If the following call pancis, it indicates UnimplementedAuthServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&AuthService_ServiceDesc, srv) +} + +func _AuthService_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AuthorizeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).Authorize(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_Authorize_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).Authorize(ctx, req.(*AuthorizeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AuthService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.AuthService", + HandlerType: (*AuthServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Authorize", + Handler: _AuthService_Authorize_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/auth.proto", +} diff --git a/backend/api/v2beta1/go_client/experiment.pb.go b/backend/api/v2beta1/go_client/experiment.pb.go index 3a6f69d416d..c83b09a3380 100644 --- a/backend/api/v2beta1/go_client/experiment.pb.go +++ b/backend/api/v2beta1/go_client/experiment.pb.go @@ -14,25 +14,22 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/experiment.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -96,33 +93,30 @@ func (Experiment_StorageState) EnumDescriptor() ([]byte, []int) { } type Experiment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique experiment ID. Generated by API server. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // Required input field. Unique experiment name provided by user. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,proto3" json:"display_name,omitempty"` // Optional input field. Describes the purpose of the experiment. Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // Output. The time that the experiment was created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,proto3" json:"created_at,omitempty"` // Optional input field. Specify the namespace this experiment belongs to. Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"` // Output. Specifies whether this experiment is in archived or available state. - StorageState Experiment_StorageState `protobuf:"varint,6,opt,name=storage_state,json=storageState,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.Experiment_StorageState" json:"storage_state,omitempty"` + StorageState Experiment_StorageState `protobuf:"varint,6,opt,name=storage_state,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.Experiment_StorageState" json:"storage_state,omitempty"` // Output. The creation time of the last run in this experiment. - LastRunCreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_run_created_at,json=lastRunCreatedAt,proto3" json:"last_run_created_at,omitempty"` + LastRunCreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_run_created_at,proto3" json:"last_run_created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Experiment) Reset() { *x = Experiment{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Experiment) String() string { @@ -133,7 +127,7 @@ func (*Experiment) ProtoMessage() {} func (x *Experiment) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -198,21 +192,18 @@ func (x *Experiment) GetLastRunCreatedAt() *timestamppb.Timestamp { } type CreateExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The experiment to be created. - Experiment *Experiment `protobuf:"bytes,1,opt,name=experiment,proto3" json:"experiment,omitempty"` + Experiment *Experiment `protobuf:"bytes,1,opt,name=experiment,proto3" json:"experiment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateExperimentRequest) Reset() { *x = CreateExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateExperimentRequest) String() string { @@ -223,7 +214,7 @@ func (*CreateExperimentRequest) ProtoMessage() {} func (x *CreateExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -246,21 +237,18 @@ func (x *CreateExperimentRequest) GetExperiment() *Experiment { } type GetExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the experiment to be retrieved. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetExperimentRequest) Reset() { *x = GetExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExperimentRequest) String() string { @@ -271,7 +259,7 @@ func (*GetExperimentRequest) ProtoMessage() {} func (x *GetExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,35 +282,32 @@ func (x *GetExperimentRequest) GetExperimentId() string { } type ListExperimentsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A page token to request the next page of results. The token is acquried // from the nextPageToken field of the response from the previous // ListExperiments call or can be omitted when fetching the first page. - PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,1,opt,name=page_token,proto3" json:"page_token,omitempty"` // The number of experiments to be listed per page. If there are more // experiments than this number, the response message will contain a // nextPageToken field you can use to fetch the next page. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // Can be format of "field_name", "field_name asc" or "field_name desc" // Ascending by default. - SortBy string `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,3,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)). Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` // Which namespace to filter the experiments on. - Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListExperimentsRequest) Reset() { *x = ListExperimentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExperimentsRequest) String() string { @@ -333,7 +318,7 @@ func (*ListExperimentsRequest) ProtoMessage() {} func (x *ListExperimentsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -384,25 +369,22 @@ func (x *ListExperimentsRequest) GetNamespace() string { } type ListExperimentsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of experiments returned. Experiments []*Experiment `protobuf:"bytes,1,rep,name=experiments,proto3" json:"experiments,omitempty"` // The number of experiments for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"` // The token to list the next page of experiments. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListExperimentsResponse) Reset() { *x = ListExperimentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListExperimentsResponse) String() string { @@ -413,7 +395,7 @@ func (*ListExperimentsResponse) ProtoMessage() {} func (x *ListExperimentsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -450,21 +432,18 @@ func (x *ListExperimentsResponse) GetNextPageToken() string { } type DeleteExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the experiment to be deleted. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteExperimentRequest) Reset() { *x = DeleteExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteExperimentRequest) String() string { @@ -475,7 +454,7 @@ func (*DeleteExperimentRequest) ProtoMessage() {} func (x *DeleteExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,21 +477,18 @@ func (x *DeleteExperimentRequest) GetExperimentId() string { } type ArchiveExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the experiment to be archived. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArchiveExperimentRequest) Reset() { *x = ArchiveExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArchiveExperimentRequest) String() string { @@ -523,7 +499,7 @@ func (*ArchiveExperimentRequest) ProtoMessage() {} func (x *ArchiveExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -546,21 +522,18 @@ func (x *ArchiveExperimentRequest) GetExperimentId() string { } type UnarchiveExperimentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the experiment to be restored. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UnarchiveExperimentRequest) Reset() { *x = UnarchiveExperimentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnarchiveExperimentRequest) String() string { @@ -571,7 +544,7 @@ func (*UnarchiveExperimentRequest) ProtoMessage() {} func (x *UnarchiveExperimentRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_experiment_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -595,184 +568,74 @@ func (x *UnarchiveExperimentRequest) GetExperimentId() string { var File_backend_api_v2beta1_experiment_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_experiment_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x03, 0x0a, 0x0a, 0x45, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0d, 0x73, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x49, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x52, - 0x75, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x4a, 0x0a, 0x0c, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x53, - 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x56, - 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, - 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02, 0x22, 0x6d, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x52, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, - 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x22, 0xa3, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, - 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, - 0x74, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x17, 0x4c, 0x69, - 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, - 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0x3e, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, - 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, - 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x1a, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x32, 0xb8, 0x08, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb6, 0x01, 0x0a, - 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x12, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x0a, - 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, - 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2b, 0x12, 0x29, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x65, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xb5, 0x01, 0x0a, - 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x3e, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0xa8, 0x01, 0x0a, 0x11, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x22, 0x31, 0x2f, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, - 0xae, 0x01, 0x0a, 0x13, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, - 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x33, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x12, 0x9e, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, - 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x31, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x2a, 0x29, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2f, 0x7b, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x7d, 0x42, 0x44, 0x92, 0x41, 0x04, 0x2a, 0x02, 0x01, 0x02, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, - 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v2beta1_experiment_proto_rawDesc = "" + + "\n" + + "$backend/api/v2beta1/experiment.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xd3\x03\n" + + "\n" + + "Experiment\x12$\n" + + "\rexperiment_id\x18\x01 \x01(\tR\rexperiment_id\x12\"\n" + + "\fdisplay_name\x18\x02 \x01(\tR\fdisplay_name\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12:\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "created_at\x12\x1c\n" + + "\tnamespace\x18\x05 \x01(\tR\tnamespace\x12e\n" + + "\rstorage_state\x18\x06 \x01(\x0e2?.kubeflow.pipelines.backend.api.v2beta1.Experiment.StorageStateR\rstorage_state\x12L\n" + + "\x13last_run_created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x13last_run_created_at\"J\n" + + "\fStorageState\x12\x1d\n" + + "\x19STORAGE_STATE_UNSPECIFIED\x10\x00\x12\r\n" + + "\tAVAILABLE\x10\x01\x12\f\n" + + "\bARCHIVED\x10\x02\"m\n" + + "\x17CreateExperimentRequest\x12R\n" + + "\n" + + "experiment\x18\x01 \x01(\v22.kubeflow.pipelines.backend.api.v2beta1.ExperimentR\n" + + "experiment\"<\n" + + "\x14GetExperimentRequest\x12$\n" + + "\rexperiment_id\x18\x01 \x01(\tR\rexperiment_id\"\xa6\x01\n" + + "\x16ListExperimentsRequest\x12\x1e\n" + + "\n" + + "page_token\x18\x01 \x01(\tR\n" + + "page_token\x12\x1c\n" + + "\tpage_size\x18\x02 \x01(\x05R\tpage_size\x12\x18\n" + + "\asort_by\x18\x03 \x01(\tR\asort_by\x12\x16\n" + + "\x06filter\x18\x04 \x01(\tR\x06filter\x12\x1c\n" + + "\tnamespace\x18\x05 \x01(\tR\tnamespace\"\xb9\x01\n" + + "\x17ListExperimentsResponse\x12T\n" + + "\vexperiments\x18\x01 \x03(\v22.kubeflow.pipelines.backend.api.v2beta1.ExperimentR\vexperiments\x12\x1e\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\n" + + "total_size\x12(\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\x0fnext_page_token\"?\n" + + "\x17DeleteExperimentRequest\x12$\n" + + "\rexperiment_id\x18\x01 \x01(\tR\rexperiment_id\"@\n" + + "\x18ArchiveExperimentRequest\x12$\n" + + "\rexperiment_id\x18\x01 \x01(\tR\rexperiment_id\"B\n" + + "\x1aUnarchiveExperimentRequest\x12$\n" + + "\rexperiment_id\x18\x01 \x01(\tR\rexperiment_id2\xb8\b\n" + + "\x11ExperimentService\x12\xb6\x01\n" + + "\x10CreateExperiment\x12?.kubeflow.pipelines.backend.api.v2beta1.CreateExperimentRequest\x1a2.kubeflow.pipelines.backend.api.v2beta1.Experiment\"-\x82\xd3\xe4\x93\x02':\n" + + "experiment\"\x19/apis/v2beta1/experiments\x12\xb4\x01\n" + + "\rGetExperiment\x12<.kubeflow.pipelines.backend.api.v2beta1.GetExperimentRequest\x1a2.kubeflow.pipelines.backend.api.v2beta1.Experiment\"1\x82\xd3\xe4\x93\x02+\x12)/apis/v2beta1/experiments/{experiment_id}\x12\xb5\x01\n" + + "\x0fListExperiments\x12>.kubeflow.pipelines.backend.api.v2beta1.ListExperimentsRequest\x1a?.kubeflow.pipelines.backend.api.v2beta1.ListExperimentsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/apis/v2beta1/experiments\x12\xa8\x01\n" + + "\x11ArchiveExperiment\x12@.kubeflow.pipelines.backend.api.v2beta1.ArchiveExperimentRequest\x1a\x16.google.protobuf.Empty\"9\x82\xd3\xe4\x93\x023\"1/apis/v2beta1/experiments/{experiment_id}:archive\x12\xae\x01\n" + + "\x13UnarchiveExperiment\x12B.kubeflow.pipelines.backend.api.v2beta1.UnarchiveExperimentRequest\x1a\x16.google.protobuf.Empty\";\x82\xd3\xe4\x93\x025\"3/apis/v2beta1/experiments/{experiment_id}:unarchive\x12\x9e\x01\n" + + "\x10DeleteExperiment\x12?.kubeflow.pipelines.backend.api.v2beta1.DeleteExperimentRequest\x1a\x16.google.protobuf.Empty\"1\x82\xd3\xe4\x93\x02+*)/apis/v2beta1/experiments/{experiment_id}BD\x92A\x04*\x02\x01\x02Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_experiment_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_experiment_proto_rawDescData = file_backend_api_v2beta1_experiment_proto_rawDesc + file_backend_api_v2beta1_experiment_proto_rawDescData []byte ) func file_backend_api_v2beta1_experiment_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_experiment_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_experiment_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_experiment_proto_rawDescData) + file_backend_api_v2beta1_experiment_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_experiment_proto_rawDesc), len(file_backend_api_v2beta1_experiment_proto_rawDesc))) }) return file_backend_api_v2beta1_experiment_proto_rawDescData } var file_backend_api_v2beta1_experiment_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_backend_api_v2beta1_experiment_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_backend_api_v2beta1_experiment_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_experiment_proto_goTypes = []any{ (Experiment_StorageState)(0), // 0: kubeflow.pipelines.backend.api.v2beta1.Experiment.StorageState (*Experiment)(nil), // 1: kubeflow.pipelines.backend.api.v2beta1.Experiment (*CreateExperimentRequest)(nil), // 2: kubeflow.pipelines.backend.api.v2beta1.CreateExperimentRequest @@ -815,109 +678,11 @@ func file_backend_api_v2beta1_experiment_proto_init() { if File_backend_api_v2beta1_experiment_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_experiment_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Experiment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_experiment_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_experiment_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_experiment_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListExperimentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_experiment_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListExperimentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_experiment_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_experiment_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_experiment_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnarchiveExperimentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_experiment_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_experiment_proto_rawDesc), len(file_backend_api_v2beta1_experiment_proto_rawDesc)), NumEnums: 1, NumMessages: 8, NumExtensions: 0, @@ -929,285 +694,6 @@ func file_backend_api_v2beta1_experiment_proto_init() { MessageInfos: file_backend_api_v2beta1_experiment_proto_msgTypes, }.Build() File_backend_api_v2beta1_experiment_proto = out.File - file_backend_api_v2beta1_experiment_proto_rawDesc = nil file_backend_api_v2beta1_experiment_proto_goTypes = nil file_backend_api_v2beta1_experiment_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ExperimentServiceClient is the client API for ExperimentService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ExperimentServiceClient interface { - // Creates a new experiment. - CreateExperiment(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) - // Finds a specific experiment by ID. - GetExperiment(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) - // Finds all experiments. Supports pagination, and sorting on certain fields. - ListExperiments(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) - // Archives an experiment and the experiment's runs and recurring runs. - ArchiveExperiment(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Restores an archived experiment. The experiment's archived runs and recurring - // runs will stay archived. - UnarchiveExperiment(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Deletes an experiment without deleting the experiment's runs and recurring - // runs. To avoid unexpected behaviors, delete an experiment's runs and recurring - // runs before deleting the experiment. - DeleteExperiment(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type experimentServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewExperimentServiceClient(cc grpc.ClientConnInterface) ExperimentServiceClient { - return &experimentServiceClient{cc} -} - -func (c *experimentServiceClient) CreateExperiment(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { - out := new(Experiment) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/CreateExperiment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) GetExperiment(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { - out := new(Experiment) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/GetExperiment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) ListExperiments(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) { - out := new(ListExperimentsResponse) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ListExperiments", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) ArchiveExperiment(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ArchiveExperiment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) UnarchiveExperiment(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/UnarchiveExperiment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *experimentServiceClient) DeleteExperiment(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/DeleteExperiment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ExperimentServiceServer is the server API for ExperimentService service. -type ExperimentServiceServer interface { - // Creates a new experiment. - CreateExperiment(context.Context, *CreateExperimentRequest) (*Experiment, error) - // Finds a specific experiment by ID. - GetExperiment(context.Context, *GetExperimentRequest) (*Experiment, error) - // Finds all experiments. Supports pagination, and sorting on certain fields. - ListExperiments(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) - // Archives an experiment and the experiment's runs and recurring runs. - ArchiveExperiment(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) - // Restores an archived experiment. The experiment's archived runs and recurring - // runs will stay archived. - UnarchiveExperiment(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) - // Deletes an experiment without deleting the experiment's runs and recurring - // runs. To avoid unexpected behaviors, delete an experiment's runs and recurring - // runs before deleting the experiment. - DeleteExperiment(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) -} - -// UnimplementedExperimentServiceServer can be embedded to have forward compatible implementations. -type UnimplementedExperimentServiceServer struct { -} - -func (*UnimplementedExperimentServiceServer) CreateExperiment(context.Context, *CreateExperimentRequest) (*Experiment, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateExperiment not implemented") -} -func (*UnimplementedExperimentServiceServer) GetExperiment(context.Context, *GetExperimentRequest) (*Experiment, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExperiment not implemented") -} -func (*UnimplementedExperimentServiceServer) ListExperiments(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExperiments not implemented") -} -func (*UnimplementedExperimentServiceServer) ArchiveExperiment(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ArchiveExperiment not implemented") -} -func (*UnimplementedExperimentServiceServer) UnarchiveExperiment(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnarchiveExperiment not implemented") -} -func (*UnimplementedExperimentServiceServer) DeleteExperiment(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteExperiment not implemented") -} - -func RegisterExperimentServiceServer(s *grpc.Server, srv ExperimentServiceServer) { - s.RegisterService(&_ExperimentService_serviceDesc, srv) -} - -func _ExperimentService_CreateExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).CreateExperiment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/CreateExperiment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).CreateExperiment(ctx, req.(*CreateExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_GetExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).GetExperiment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/GetExperiment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).GetExperiment(ctx, req.(*GetExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_ListExperiments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListExperimentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).ListExperiments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ListExperiments", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).ListExperiments(ctx, req.(*ListExperimentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_ArchiveExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).ArchiveExperiment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ArchiveExperiment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).ArchiveExperiment(ctx, req.(*ArchiveExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_UnarchiveExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnarchiveExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).UnarchiveExperiment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/UnarchiveExperiment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).UnarchiveExperiment(ctx, req.(*UnarchiveExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExperimentService_DeleteExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteExperimentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExperimentServiceServer).DeleteExperiment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/DeleteExperiment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExperimentServiceServer).DeleteExperiment(ctx, req.(*DeleteExperimentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ExperimentService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.ExperimentService", - HandlerType: (*ExperimentServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateExperiment", - Handler: _ExperimentService_CreateExperiment_Handler, - }, - { - MethodName: "GetExperiment", - Handler: _ExperimentService_GetExperiment_Handler, - }, - { - MethodName: "ListExperiments", - Handler: _ExperimentService_ListExperiments_Handler, - }, - { - MethodName: "ArchiveExperiment", - Handler: _ExperimentService_ArchiveExperiment_Handler, - }, - { - MethodName: "UnarchiveExperiment", - Handler: _ExperimentService_UnarchiveExperiment_Handler, - }, - { - MethodName: "DeleteExperiment", - Handler: _ExperimentService_DeleteExperiment_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/experiment.proto", -} diff --git a/backend/api/v2beta1/go_client/experiment.pb.gw.go b/backend/api/v2beta1/go_client/experiment.pb.gw.go index 6ecf6f7f523..d0cc10a4ccc 100644 --- a/backend/api/v2beta1/go_client/experiment.pb.gw.go +++ b/backend/api/v2beta1/go_client/experiment.pb.gw.go @@ -10,457 +10,374 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_ExperimentService_CreateExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateExperimentRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Experiment); err != nil && err != io.EOF { + var ( + protoReq CreateExperimentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Experiment); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreateExperiment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_CreateExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateExperimentRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Experiment); err != nil && err != io.EOF { + var ( + protoReq CreateExperimentRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Experiment); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateExperiment(ctx, &protoReq) return msg, metadata, err - } func request_ExperimentService_GetExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["experiment_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["experiment_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "experiment_id") } - protoReq.ExperimentId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "experiment_id", err) } - msg, err := client.GetExperiment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_GetExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["experiment_id"] + val, ok := pathParams["experiment_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "experiment_id") } - protoReq.ExperimentId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "experiment_id", err) } - msg, err := server.GetExperiment(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ExperimentService_ListExperiments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_ExperimentService_ListExperiments_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_ExperimentService_ListExperiments_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListExperimentsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListExperimentsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExperimentService_ListExperiments_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListExperiments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_ListExperiments_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListExperimentsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListExperimentsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExperimentService_ListExperiments_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListExperiments(ctx, &protoReq) return msg, metadata, err - } func request_ExperimentService_ArchiveExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ArchiveExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["experiment_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["experiment_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "experiment_id") } - protoReq.ExperimentId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "experiment_id", err) } - msg, err := client.ArchiveExperiment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_ArchiveExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ArchiveExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["experiment_id"] + val, ok := pathParams["experiment_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "experiment_id") } - protoReq.ExperimentId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "experiment_id", err) } - msg, err := server.ArchiveExperiment(ctx, &protoReq) return msg, metadata, err - } func request_ExperimentService_UnarchiveExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnarchiveExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UnarchiveExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["experiment_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["experiment_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "experiment_id") } - protoReq.ExperimentId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "experiment_id", err) } - msg, err := client.UnarchiveExperiment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_UnarchiveExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnarchiveExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UnarchiveExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["experiment_id"] + val, ok := pathParams["experiment_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "experiment_id") } - protoReq.ExperimentId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "experiment_id", err) } - msg, err := server.UnarchiveExperiment(ctx, &protoReq) return msg, metadata, err - } func request_ExperimentService_DeleteExperiment_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["experiment_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["experiment_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "experiment_id") } - protoReq.ExperimentId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "experiment_id", err) } - msg, err := client.DeleteExperiment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExperimentService_DeleteExperiment_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteExperimentRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteExperimentRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["experiment_id"] + val, ok := pathParams["experiment_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "experiment_id") } - protoReq.ExperimentId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "experiment_id", err) } - msg, err := server.DeleteExperiment(ctx, &protoReq) return msg, metadata, err - } // RegisterExperimentServiceHandlerServer registers the http handlers for service ExperimentService to "mux". // UnaryRPC :call ExperimentServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterExperimentServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterExperimentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExperimentServiceServer) error { - - mux.Handle("POST", pattern_ExperimentService_CreateExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_CreateExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/CreateExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_CreateExperiment_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_CreateExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_CreateExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_CreateExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_ExperimentService_GetExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExperimentService_GetExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/GetExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments/{experiment_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_GetExperiment_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_GetExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_GetExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_GetExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_ExperimentService_ListExperiments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExperimentService_ListExperiments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ListExperiments", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_ListExperiments_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_ListExperiments_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_ListExperiments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_ListExperiments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ExperimentService_ArchiveExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_ArchiveExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ArchiveExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments/{experiment_id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_ArchiveExperiment_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_ArchiveExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_ArchiveExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_ArchiveExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ExperimentService_UnarchiveExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_UnarchiveExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/UnarchiveExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments/{experiment_id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_UnarchiveExperiment_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_UnarchiveExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_UnarchiveExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_UnarchiveExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_ExperimentService_DeleteExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_ExperimentService_DeleteExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/DeleteExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments/{experiment_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ExperimentService_DeleteExperiment_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ExperimentService_DeleteExperiment_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_DeleteExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_DeleteExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -469,25 +386,24 @@ func RegisterExperimentServiceHandlerServer(ctx context.Context, mux *runtime.Se // RegisterExperimentServiceHandlerFromEndpoint is same as RegisterExperimentServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterExperimentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterExperimentServiceHandler(ctx, mux, conn) } @@ -501,156 +417,127 @@ func RegisterExperimentServiceHandler(ctx context.Context, mux *runtime.ServeMux // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExperimentServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExperimentServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ExperimentServiceClient" to call the correct interceptors. +// "ExperimentServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterExperimentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExperimentServiceClient) error { - - mux.Handle("POST", pattern_ExperimentService_CreateExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_CreateExperiment_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/CreateExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_CreateExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_CreateExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_CreateExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_CreateExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_ExperimentService_GetExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExperimentService_GetExperiment_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/GetExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments/{experiment_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_GetExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_GetExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_GetExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_GetExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_ExperimentService_ListExperiments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExperimentService_ListExperiments_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ListExperiments", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_ListExperiments_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_ListExperiments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_ListExperiments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_ListExperiments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ExperimentService_ArchiveExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_ArchiveExperiment_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ArchiveExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments/{experiment_id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_ArchiveExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_ArchiveExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_ArchiveExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_ArchiveExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ExperimentService_UnarchiveExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ExperimentService_UnarchiveExperiment_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/UnarchiveExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments/{experiment_id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_UnarchiveExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_UnarchiveExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_UnarchiveExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_UnarchiveExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_ExperimentService_DeleteExperiment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_ExperimentService_DeleteExperiment_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/DeleteExperiment", runtime.WithHTTPPathPattern("/apis/v2beta1/experiments/{experiment_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ExperimentService_DeleteExperiment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ExperimentService_DeleteExperiment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ExperimentService_DeleteExperiment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ExperimentService_DeleteExperiment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_ExperimentService_CreateExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "experiments"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_GetExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "experiments", "experiment_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_ListExperiments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "experiments"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_ArchiveExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "experiments", "experiment_id"}, "archive", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_UnarchiveExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "experiments", "experiment_id"}, "unarchive", runtime.AssumeColonVerbOpt(true))) - - pattern_ExperimentService_DeleteExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "experiments", "experiment_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ExperimentService_CreateExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "experiments"}, "")) + pattern_ExperimentService_GetExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "experiments", "experiment_id"}, "")) + pattern_ExperimentService_ListExperiments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "experiments"}, "")) + pattern_ExperimentService_ArchiveExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "experiments", "experiment_id"}, "archive")) + pattern_ExperimentService_UnarchiveExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "experiments", "experiment_id"}, "unarchive")) + pattern_ExperimentService_DeleteExperiment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "experiments", "experiment_id"}, "")) ) var ( - forward_ExperimentService_CreateExperiment_0 = runtime.ForwardResponseMessage - - forward_ExperimentService_GetExperiment_0 = runtime.ForwardResponseMessage - - forward_ExperimentService_ListExperiments_0 = runtime.ForwardResponseMessage - - forward_ExperimentService_ArchiveExperiment_0 = runtime.ForwardResponseMessage - + forward_ExperimentService_CreateExperiment_0 = runtime.ForwardResponseMessage + forward_ExperimentService_GetExperiment_0 = runtime.ForwardResponseMessage + forward_ExperimentService_ListExperiments_0 = runtime.ForwardResponseMessage + forward_ExperimentService_ArchiveExperiment_0 = runtime.ForwardResponseMessage forward_ExperimentService_UnarchiveExperiment_0 = runtime.ForwardResponseMessage - - forward_ExperimentService_DeleteExperiment_0 = runtime.ForwardResponseMessage + forward_ExperimentService_DeleteExperiment_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v2beta1/go_client/experiment_grpc.pb.go b/backend/api/v2beta1/go_client/experiment_grpc.pb.go new file mode 100644 index 00000000000..50db23ecc5b --- /dev/null +++ b/backend/api/v2beta1/go_client/experiment_grpc.pb.go @@ -0,0 +1,344 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/experiment.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ExperimentService_CreateExperiment_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/CreateExperiment" + ExperimentService_GetExperiment_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/GetExperiment" + ExperimentService_ListExperiments_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ListExperiments" + ExperimentService_ArchiveExperiment_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/ArchiveExperiment" + ExperimentService_UnarchiveExperiment_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/UnarchiveExperiment" + ExperimentService_DeleteExperiment_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.ExperimentService/DeleteExperiment" +) + +// ExperimentServiceClient is the client API for ExperimentService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ExperimentServiceClient interface { + // Creates a new experiment. + CreateExperiment(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) + // Finds a specific experiment by ID. + GetExperiment(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) + // Finds all experiments. Supports pagination, and sorting on certain fields. + ListExperiments(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) + // Archives an experiment and the experiment's runs and recurring runs. + ArchiveExperiment(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Restores an archived experiment. The experiment's archived runs and recurring + // runs will stay archived. + UnarchiveExperiment(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deletes an experiment without deleting the experiment's runs and recurring + // runs. To avoid unexpected behaviors, delete an experiment's runs and recurring + // runs before deleting the experiment. + DeleteExperiment(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type experimentServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewExperimentServiceClient(cc grpc.ClientConnInterface) ExperimentServiceClient { + return &experimentServiceClient{cc} +} + +func (c *experimentServiceClient) CreateExperiment(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Experiment) + err := c.cc.Invoke(ctx, ExperimentService_CreateExperiment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) GetExperiment(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Experiment) + err := c.cc.Invoke(ctx, ExperimentService_GetExperiment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) ListExperiments(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListExperimentsResponse) + err := c.cc.Invoke(ctx, ExperimentService_ListExperiments_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) ArchiveExperiment(ctx context.Context, in *ArchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ExperimentService_ArchiveExperiment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) UnarchiveExperiment(ctx context.Context, in *UnarchiveExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ExperimentService_UnarchiveExperiment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *experimentServiceClient) DeleteExperiment(ctx context.Context, in *DeleteExperimentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ExperimentService_DeleteExperiment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ExperimentServiceServer is the server API for ExperimentService service. +// All implementations must embed UnimplementedExperimentServiceServer +// for forward compatibility. +type ExperimentServiceServer interface { + // Creates a new experiment. + CreateExperiment(context.Context, *CreateExperimentRequest) (*Experiment, error) + // Finds a specific experiment by ID. + GetExperiment(context.Context, *GetExperimentRequest) (*Experiment, error) + // Finds all experiments. Supports pagination, and sorting on certain fields. + ListExperiments(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) + // Archives an experiment and the experiment's runs and recurring runs. + ArchiveExperiment(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) + // Restores an archived experiment. The experiment's archived runs and recurring + // runs will stay archived. + UnarchiveExperiment(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) + // Deletes an experiment without deleting the experiment's runs and recurring + // runs. To avoid unexpected behaviors, delete an experiment's runs and recurring + // runs before deleting the experiment. + DeleteExperiment(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedExperimentServiceServer() +} + +// UnimplementedExperimentServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedExperimentServiceServer struct{} + +func (UnimplementedExperimentServiceServer) CreateExperiment(context.Context, *CreateExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateExperiment not implemented") +} +func (UnimplementedExperimentServiceServer) GetExperiment(context.Context, *GetExperimentRequest) (*Experiment, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExperiment not implemented") +} +func (UnimplementedExperimentServiceServer) ListExperiments(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExperiments not implemented") +} +func (UnimplementedExperimentServiceServer) ArchiveExperiment(context.Context, *ArchiveExperimentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveExperiment not implemented") +} +func (UnimplementedExperimentServiceServer) UnarchiveExperiment(context.Context, *UnarchiveExperimentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnarchiveExperiment not implemented") +} +func (UnimplementedExperimentServiceServer) DeleteExperiment(context.Context, *DeleteExperimentRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteExperiment not implemented") +} +func (UnimplementedExperimentServiceServer) mustEmbedUnimplementedExperimentServiceServer() {} +func (UnimplementedExperimentServiceServer) testEmbeddedByValue() {} + +// UnsafeExperimentServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ExperimentServiceServer will +// result in compilation errors. +type UnsafeExperimentServiceServer interface { + mustEmbedUnimplementedExperimentServiceServer() +} + +func RegisterExperimentServiceServer(s grpc.ServiceRegistrar, srv ExperimentServiceServer) { + // If the following call pancis, it indicates UnimplementedExperimentServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ExperimentService_ServiceDesc, srv) +} + +func _ExperimentService_CreateExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).CreateExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_CreateExperiment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).CreateExperiment(ctx, req.(*CreateExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_GetExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).GetExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_GetExperiment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).GetExperiment(ctx, req.(*GetExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_ListExperiments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExperimentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).ListExperiments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_ListExperiments_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).ListExperiments(ctx, req.(*ListExperimentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_ArchiveExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).ArchiveExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_ArchiveExperiment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).ArchiveExperiment(ctx, req.(*ArchiveExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_UnarchiveExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnarchiveExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).UnarchiveExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_UnarchiveExperiment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).UnarchiveExperiment(ctx, req.(*UnarchiveExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExperimentService_DeleteExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteExperimentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperimentServiceServer).DeleteExperiment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperimentService_DeleteExperiment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperimentServiceServer).DeleteExperiment(ctx, req.(*DeleteExperimentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ExperimentService_ServiceDesc is the grpc.ServiceDesc for ExperimentService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ExperimentService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.ExperimentService", + HandlerType: (*ExperimentServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateExperiment", + Handler: _ExperimentService_CreateExperiment_Handler, + }, + { + MethodName: "GetExperiment", + Handler: _ExperimentService_GetExperiment_Handler, + }, + { + MethodName: "ListExperiments", + Handler: _ExperimentService_ListExperiments_Handler, + }, + { + MethodName: "ArchiveExperiment", + Handler: _ExperimentService_ArchiveExperiment_Handler, + }, + { + MethodName: "UnarchiveExperiment", + Handler: _ExperimentService_UnarchiveExperiment_Handler, + }, + { + MethodName: "DeleteExperiment", + Handler: _ExperimentService_DeleteExperiment_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/experiment.proto", +} diff --git a/backend/api/v2beta1/go_client/filter.pb.go b/backend/api/v2beta1/go_client/filter.pb.go index 4b41438cb44..0fadf3d3424 100644 --- a/backend/api/v2beta1/go_client/filter.pb.go +++ b/backend/api/v2beta1/go_client/filter.pb.go @@ -14,22 +14,19 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/filter.proto package go_client import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -162,21 +159,18 @@ func (Predicate_Operation) EnumDescriptor() ([]byte, []int) { // } // } type Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // All predicates are AND-ed when this filter is applied. - Predicates []*Predicate `protobuf:"bytes,1,rep,name=predicates,proto3" json:"predicates,omitempty"` + Predicates []*Predicate `protobuf:"bytes,1,rep,name=predicates,proto3" json:"predicates,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Filter) Reset() { *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_filter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Filter) String() string { @@ -187,7 +181,7 @@ func (*Filter) ProtoMessage() {} func (x *Filter) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -212,16 +206,13 @@ func (x *Filter) GetPredicates() []*Predicate { // Predicate captures individual conditions that must be true for a resource // being filtered. type Predicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Operation Predicate_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.Predicate_Operation" json:"operation,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Operation Predicate_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.Predicate_Operation" json:"operation,omitempty"` // Key for the operation (first argument). Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // Value for the operation (second argument). // - // Types that are assignable to Value: + // Types that are valid to be assigned to Value: // // *Predicate_IntValue // *Predicate_LongValue @@ -230,16 +221,16 @@ type Predicate struct { // *Predicate_IntValues_ // *Predicate_LongValues_ // *Predicate_StringValues_ - Value isPredicate_Value `protobuf_oneof:"value"` + Value isPredicate_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Predicate) Reset() { *x = Predicate{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_filter_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_filter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Predicate) String() string { @@ -250,7 +241,7 @@ func (*Predicate) ProtoMessage() {} func (x *Predicate) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_filter_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,58 +270,72 @@ func (x *Predicate) GetKey() string { return "" } -func (m *Predicate) GetValue() isPredicate_Value { - if m != nil { - return m.Value +func (x *Predicate) GetValue() isPredicate_Value { + if x != nil { + return x.Value } return nil } func (x *Predicate) GetIntValue() int32 { - if x, ok := x.GetValue().(*Predicate_IntValue); ok { - return x.IntValue + if x != nil { + if x, ok := x.Value.(*Predicate_IntValue); ok { + return x.IntValue + } } return 0 } func (x *Predicate) GetLongValue() int64 { - if x, ok := x.GetValue().(*Predicate_LongValue); ok { - return x.LongValue + if x != nil { + if x, ok := x.Value.(*Predicate_LongValue); ok { + return x.LongValue + } } return 0 } func (x *Predicate) GetStringValue() string { - if x, ok := x.GetValue().(*Predicate_StringValue); ok { - return x.StringValue + if x != nil { + if x, ok := x.Value.(*Predicate_StringValue); ok { + return x.StringValue + } } return "" } func (x *Predicate) GetTimestampValue() *timestamppb.Timestamp { - if x, ok := x.GetValue().(*Predicate_TimestampValue); ok { - return x.TimestampValue + if x != nil { + if x, ok := x.Value.(*Predicate_TimestampValue); ok { + return x.TimestampValue + } } return nil } func (x *Predicate) GetIntValues() *Predicate_IntValues { - if x, ok := x.GetValue().(*Predicate_IntValues_); ok { - return x.IntValues + if x != nil { + if x, ok := x.Value.(*Predicate_IntValues_); ok { + return x.IntValues + } } return nil } func (x *Predicate) GetLongValues() *Predicate_LongValues { - if x, ok := x.GetValue().(*Predicate_LongValues_); ok { - return x.LongValues + if x != nil { + if x, ok := x.Value.(*Predicate_LongValues_); ok { + return x.LongValues + } } return nil } func (x *Predicate) GetStringValues() *Predicate_StringValues { - if x, ok := x.GetValue().(*Predicate_StringValues_); ok { - return x.StringValues + if x != nil { + if x, ok := x.Value.(*Predicate_StringValues_); ok { + return x.StringValues + } } return nil } @@ -341,38 +346,38 @@ type isPredicate_Value interface { type Predicate_IntValue struct { // Integer. - IntValue int32 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof"` + IntValue int32 `protobuf:"varint,3,opt,name=int_value,proto3,oneof"` } type Predicate_LongValue struct { // Long integer. - LongValue int64 `protobuf:"varint,4,opt,name=long_value,json=longValue,proto3,oneof"` + LongValue int64 `protobuf:"varint,4,opt,name=long_value,proto3,oneof"` } type Predicate_StringValue struct { // String. - StringValue string `protobuf:"bytes,5,opt,name=string_value,json=stringValue,proto3,oneof"` + StringValue string `protobuf:"bytes,5,opt,name=string_value,proto3,oneof"` } type Predicate_TimestampValue struct { // Timestamp values will be converted to Unix time (seconds since the epoch) // prior to being used in a filtering operation. - TimestampValue *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp_value,json=timestampValue,proto3,oneof"` + TimestampValue *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp_value,proto3,oneof"` } type Predicate_IntValues_ struct { // Array values below are only meant to be used by the IN operator. - IntValues *Predicate_IntValues `protobuf:"bytes,7,opt,name=int_values,json=intValues,proto3,oneof"` + IntValues *Predicate_IntValues `protobuf:"bytes,7,opt,name=int_values,proto3,oneof"` } type Predicate_LongValues_ struct { // List of long integers. - LongValues *Predicate_LongValues `protobuf:"bytes,8,opt,name=long_values,json=longValues,proto3,oneof"` + LongValues *Predicate_LongValues `protobuf:"bytes,8,opt,name=long_values,proto3,oneof"` } type Predicate_StringValues_ struct { // List of strings. - StringValues *Predicate_StringValues `protobuf:"bytes,9,opt,name=string_values,json=stringValues,proto3,oneof"` + StringValues *Predicate_StringValues `protobuf:"bytes,9,opt,name=string_values,proto3,oneof"` } func (*Predicate_IntValue) isPredicate_Value() {} @@ -391,20 +396,17 @@ func (*Predicate_StringValues_) isPredicate_Value() {} // List of integers. type Predicate_IntValues struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Values []int32 `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Values []int32 `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Predicate_IntValues) Reset() { *x = Predicate_IntValues{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_filter_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_filter_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Predicate_IntValues) String() string { @@ -415,7 +417,7 @@ func (*Predicate_IntValues) ProtoMessage() {} func (x *Predicate_IntValues) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_filter_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -439,20 +441,17 @@ func (x *Predicate_IntValues) GetValues() []int32 { // List of strings. type Predicate_StringValues struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Predicate_StringValues) Reset() { *x = Predicate_StringValues{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_filter_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_filter_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Predicate_StringValues) String() string { @@ -463,7 +462,7 @@ func (*Predicate_StringValues) ProtoMessage() {} func (x *Predicate_StringValues) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_filter_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -487,20 +486,17 @@ func (x *Predicate_StringValues) GetValues() []string { // List of long integers. type Predicate_LongValues struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Values []int64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Values []int64 `protobuf:"varint,3,rep,packed,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Predicate_LongValues) Reset() { *x = Predicate_LongValues{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_filter_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_filter_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Predicate_LongValues) String() string { @@ -511,7 +507,7 @@ func (*Predicate_LongValues) ProtoMessage() {} func (x *Predicate_LongValues) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_filter_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -535,105 +531,65 @@ func (x *Predicate_LongValues) GetValues() []int64 { var File_backend_api_v2beta1_filter_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_filter_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x06, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6b, 0x75, 0x62, 0x65, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x70, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x22, 0xf5, 0x06, 0x0a, 0x09, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6b, 0x75, 0x62, 0x65, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, - 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x5c, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x65, - 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x48, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x5f, 0x0a, - 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x65, - 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x23, 0x0a, 0x09, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x05, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x26, 0x0a, 0x0c, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x1a, 0x24, 0x0a, 0x0a, 0x4c, 0x6f, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, - 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, - 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, - 0x0c, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x03, 0x12, - 0x17, 0x0a, 0x13, 0x47, 0x52, 0x45, 0x41, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, - 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x45, 0x53, 0x53, - 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, 0x53, 0x53, 0x5f, - 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x07, 0x12, 0x06, 0x0a, - 0x02, 0x49, 0x4e, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, - 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x32, 0x83, 0x01, 0x0a, 0x12, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x1a, 0x2e, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x22, 0x00, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v2beta1_filter_proto_rawDesc = "" + + "\n" + + " backend/api/v2beta1/filter.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1fgoogle/protobuf/timestamp.proto\"[\n" + + "\x06Filter\x12Q\n" + + "\n" + + "predicates\x18\x01 \x03(\v21.kubeflow.pipelines.backend.api.v2beta1.PredicateR\n" + + "predicates\"\xfc\x06\n" + + "\tPredicate\x12Y\n" + + "\toperation\x18\x01 \x01(\x0e2;.kubeflow.pipelines.backend.api.v2beta1.Predicate.OperationR\toperation\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x12\x1e\n" + + "\tint_value\x18\x03 \x01(\x05H\x00R\tint_value\x12 \n" + + "\n" + + "long_value\x18\x04 \x01(\x03H\x00R\n" + + "long_value\x12$\n" + + "\fstring_value\x18\x05 \x01(\tH\x00R\fstring_value\x12F\n" + + "\x0ftimestamp_value\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\x0ftimestamp_value\x12]\n" + + "\n" + + "int_values\x18\a \x01(\v2;.kubeflow.pipelines.backend.api.v2beta1.Predicate.IntValuesH\x00R\n" + + "int_values\x12`\n" + + "\vlong_values\x18\b \x01(\v2<.kubeflow.pipelines.backend.api.v2beta1.Predicate.LongValuesH\x00R\vlong_values\x12f\n" + + "\rstring_values\x18\t \x01(\v2>.kubeflow.pipelines.backend.api.v2beta1.Predicate.StringValuesH\x00R\rstring_values\x1a#\n" + + "\tIntValues\x12\x16\n" + + "\x06values\x18\x01 \x03(\x05R\x06values\x1a&\n" + + "\fStringValues\x12\x16\n" + + "\x06values\x18\x02 \x03(\tR\x06values\x1a$\n" + + "\n" + + "LongValues\x12\x16\n" + + "\x06values\x18\x03 \x03(\x03R\x06values\"\xac\x01\n" + + "\tOperation\x12\x19\n" + + "\x15OPERATION_UNSPECIFIED\x10\x00\x12\n" + + "\n" + + "\x06EQUALS\x10\x01\x12\x0e\n" + + "\n" + + "NOT_EQUALS\x10\x02\x12\x10\n" + + "\fGREATER_THAN\x10\x03\x12\x17\n" + + "\x13GREATER_THAN_EQUALS\x10\x05\x12\r\n" + + "\tLESS_THAN\x10\x06\x12\x14\n" + + "\x10LESS_THAN_EQUALS\x10\a\x12\x06\n" + + "\x02IN\x10\b\x12\x10\n" + + "\fIS_SUBSTRING\x10\tB\a\n" + + "\x05value2\x83\x01\n" + + "\x12DummyFilterService\x12m\n" + + "\tGetFilter\x12..kubeflow.pipelines.backend.api.v2beta1.Filter\x1a..kubeflow.pipelines.backend.api.v2beta1.Filter\"\x00B=Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_filter_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_filter_proto_rawDescData = file_backend_api_v2beta1_filter_proto_rawDesc + file_backend_api_v2beta1_filter_proto_rawDescData []byte ) func file_backend_api_v2beta1_filter_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_filter_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_filter_proto_rawDescData) + file_backend_api_v2beta1_filter_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_filter_proto_rawDesc), len(file_backend_api_v2beta1_filter_proto_rawDesc))) }) return file_backend_api_v2beta1_filter_proto_rawDescData } var file_backend_api_v2beta1_filter_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_backend_api_v2beta1_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_backend_api_v2beta1_filter_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_filter_proto_goTypes = []any{ (Predicate_Operation)(0), // 0: kubeflow.pipelines.backend.api.v2beta1.Predicate.Operation (*Filter)(nil), // 1: kubeflow.pipelines.backend.api.v2beta1.Filter (*Predicate)(nil), // 2: kubeflow.pipelines.backend.api.v2beta1.Predicate @@ -663,69 +619,7 @@ func file_backend_api_v2beta1_filter_proto_init() { if File_backend_api_v2beta1_filter_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_filter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Predicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_filter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Predicate_IntValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_filter_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Predicate_StringValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_filter_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Predicate_LongValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_backend_api_v2beta1_filter_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_backend_api_v2beta1_filter_proto_msgTypes[1].OneofWrappers = []any{ (*Predicate_IntValue)(nil), (*Predicate_LongValue)(nil), (*Predicate_StringValue)(nil), @@ -738,7 +632,7 @@ func file_backend_api_v2beta1_filter_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_filter_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_filter_proto_rawDesc), len(file_backend_api_v2beta1_filter_proto_rawDesc)), NumEnums: 1, NumMessages: 5, NumExtensions: 0, @@ -750,87 +644,6 @@ func file_backend_api_v2beta1_filter_proto_init() { MessageInfos: file_backend_api_v2beta1_filter_proto_msgTypes, }.Build() File_backend_api_v2beta1_filter_proto = out.File - file_backend_api_v2beta1_filter_proto_rawDesc = nil file_backend_api_v2beta1_filter_proto_goTypes = nil file_backend_api_v2beta1_filter_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// DummyFilterServiceClient is the client API for DummyFilterService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type DummyFilterServiceClient interface { - GetFilter(ctx context.Context, in *Filter, opts ...grpc.CallOption) (*Filter, error) -} - -type dummyFilterServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewDummyFilterServiceClient(cc grpc.ClientConnInterface) DummyFilterServiceClient { - return &dummyFilterServiceClient{cc} -} - -func (c *dummyFilterServiceClient) GetFilter(ctx context.Context, in *Filter, opts ...grpc.CallOption) (*Filter, error) { - out := new(Filter) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.DummyFilterService/GetFilter", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DummyFilterServiceServer is the server API for DummyFilterService service. -type DummyFilterServiceServer interface { - GetFilter(context.Context, *Filter) (*Filter, error) -} - -// UnimplementedDummyFilterServiceServer can be embedded to have forward compatible implementations. -type UnimplementedDummyFilterServiceServer struct { -} - -func (*UnimplementedDummyFilterServiceServer) GetFilter(context.Context, *Filter) (*Filter, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFilter not implemented") -} - -func RegisterDummyFilterServiceServer(s *grpc.Server, srv DummyFilterServiceServer) { - s.RegisterService(&_DummyFilterService_serviceDesc, srv) -} - -func _DummyFilterService_GetFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Filter) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DummyFilterServiceServer).GetFilter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.DummyFilterService/GetFilter", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DummyFilterServiceServer).GetFilter(ctx, req.(*Filter)) - } - return interceptor(ctx, in, info, handler) -} - -var _DummyFilterService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.DummyFilterService", - HandlerType: (*DummyFilterServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetFilter", - Handler: _DummyFilterService_GetFilter_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/filter.proto", -} diff --git a/backend/api/v2beta1/go_client/filter_grpc.pb.go b/backend/api/v2beta1/go_client/filter_grpc.pb.go new file mode 100644 index 00000000000..eff1cb11e4c --- /dev/null +++ b/backend/api/v2beta1/go_client/filter_grpc.pb.go @@ -0,0 +1,145 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/filter.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + DummyFilterService_GetFilter_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.DummyFilterService/GetFilter" +) + +// DummyFilterServiceClient is the client API for DummyFilterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// This dummy service is required so that grpc-gateway will generate Swagger +// definitions for the Filter message. Otherwise, it does not get generated +// since Filter itself is not used in any of the RPC calls - only a serialized +// encoded version of it is used. +type DummyFilterServiceClient interface { + GetFilter(ctx context.Context, in *Filter, opts ...grpc.CallOption) (*Filter, error) +} + +type dummyFilterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDummyFilterServiceClient(cc grpc.ClientConnInterface) DummyFilterServiceClient { + return &dummyFilterServiceClient{cc} +} + +func (c *dummyFilterServiceClient) GetFilter(ctx context.Context, in *Filter, opts ...grpc.CallOption) (*Filter, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Filter) + err := c.cc.Invoke(ctx, DummyFilterService_GetFilter_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DummyFilterServiceServer is the server API for DummyFilterService service. +// All implementations must embed UnimplementedDummyFilterServiceServer +// for forward compatibility. +// +// This dummy service is required so that grpc-gateway will generate Swagger +// definitions for the Filter message. Otherwise, it does not get generated +// since Filter itself is not used in any of the RPC calls - only a serialized +// encoded version of it is used. +type DummyFilterServiceServer interface { + GetFilter(context.Context, *Filter) (*Filter, error) + mustEmbedUnimplementedDummyFilterServiceServer() +} + +// UnimplementedDummyFilterServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedDummyFilterServiceServer struct{} + +func (UnimplementedDummyFilterServiceServer) GetFilter(context.Context, *Filter) (*Filter, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFilter not implemented") +} +func (UnimplementedDummyFilterServiceServer) mustEmbedUnimplementedDummyFilterServiceServer() {} +func (UnimplementedDummyFilterServiceServer) testEmbeddedByValue() {} + +// UnsafeDummyFilterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DummyFilterServiceServer will +// result in compilation errors. +type UnsafeDummyFilterServiceServer interface { + mustEmbedUnimplementedDummyFilterServiceServer() +} + +func RegisterDummyFilterServiceServer(s grpc.ServiceRegistrar, srv DummyFilterServiceServer) { + // If the following call pancis, it indicates UnimplementedDummyFilterServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&DummyFilterService_ServiceDesc, srv) +} + +func _DummyFilterService_GetFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Filter) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DummyFilterServiceServer).GetFilter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DummyFilterService_GetFilter_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DummyFilterServiceServer).GetFilter(ctx, req.(*Filter)) + } + return interceptor(ctx, in, info, handler) +} + +// DummyFilterService_ServiceDesc is the grpc.ServiceDesc for DummyFilterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DummyFilterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.DummyFilterService", + HandlerType: (*DummyFilterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetFilter", + Handler: _DummyFilterService_GetFilter_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/filter.proto", +} diff --git a/backend/api/v2beta1/go_client/healthz.pb.go b/backend/api/v2beta1/go_client/healthz.pb.go index 28de6fb33c7..719ed31e536 100644 --- a/backend/api/v2beta1/go_client/healthz.pb.go +++ b/backend/api/v2beta1/go_client/healthz.pb.go @@ -14,25 +14,21 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/healthz.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - _ "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -43,27 +39,24 @@ const ( ) type GetHealthzResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // TODO(gkcalat): redesign this service to return status // and move server configuration into a separate service // TODO(gkcalat): rename or deprecate v1beta1 HealthzService // // Returns if KFP in multi-user mode - MultiUser bool `protobuf:"varint,3,opt,name=multi_user,json=multiUser,proto3" json:"multi_user,omitempty"` + MultiUser bool `protobuf:"varint,3,opt,name=multi_user,proto3" json:"multi_user,omitempty"` // Returns the pipeline storage type (database or kubernetes) - PipelineStore string `protobuf:"bytes,4,opt,name=pipeline_store,json=pipelineStore,proto3" json:"pipeline_store,omitempty"` + PipelineStore string `protobuf:"bytes,4,opt,name=pipeline_store,proto3" json:"pipeline_store,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetHealthzResponse) Reset() { *x = GetHealthzResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_healthz_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_healthz_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetHealthzResponse) String() string { @@ -74,7 +67,7 @@ func (*GetHealthzResponse) ProtoMessage() {} func (x *GetHealthzResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_healthz_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,61 +98,39 @@ func (x *GetHealthzResponse) GetPipelineStore() string { var File_backend_api_v2beta1_healthz_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_healthz_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, - 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x32, 0x91, 0x01, 0x0a, 0x0e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x0a, - 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x1a, 0x3a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x42, 0x98, 0x01, - 0x92, 0x41, 0x58, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x23, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x12, 0x18, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, - 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, - 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x3b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, - 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v2beta1_healthz_proto_rawDesc = "" + + "\n" + + "!backend/api/v2beta1/healthz.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\\\n" + + "\x12GetHealthzResponse\x12\x1e\n" + + "\n" + + "multi_user\x18\x03 \x01(\bR\n" + + "multi_user\x12&\n" + + "\x0epipeline_store\x18\x04 \x01(\tR\x0epipeline_store2\x91\x01\n" + + "\x0eHealthzService\x12\x7f\n" + + "\n" + + "GetHealthz\x12\x16.google.protobuf.Empty\x1a:.kubeflow.pipelines.backend.api.v2beta1.GetHealthzResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/apis/v2beta1/healthzB\x98\x01\x92AX*\x02\x01\x02R#\n" + + "\adefault\x12\x18\x12\x16\n" + + "\x14\x1a\x12.google.rpc.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_healthz_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_healthz_proto_rawDescData = file_backend_api_v2beta1_healthz_proto_rawDesc + file_backend_api_v2beta1_healthz_proto_rawDescData []byte ) func file_backend_api_v2beta1_healthz_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_healthz_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_healthz_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_healthz_proto_rawDescData) + file_backend_api_v2beta1_healthz_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_healthz_proto_rawDesc), len(file_backend_api_v2beta1_healthz_proto_rawDesc))) }) return file_backend_api_v2beta1_healthz_proto_rawDescData } var file_backend_api_v2beta1_healthz_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_backend_api_v2beta1_healthz_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_healthz_proto_goTypes = []any{ (*GetHealthzResponse)(nil), // 0: kubeflow.pipelines.backend.api.v2beta1.GetHealthzResponse (*emptypb.Empty)(nil), // 1: google.protobuf.Empty } @@ -178,25 +149,11 @@ func file_backend_api_v2beta1_healthz_proto_init() { if File_backend_api_v2beta1_healthz_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_healthz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetHealthzResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_healthz_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_healthz_proto_rawDesc), len(file_backend_api_v2beta1_healthz_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -207,89 +164,6 @@ func file_backend_api_v2beta1_healthz_proto_init() { MessageInfos: file_backend_api_v2beta1_healthz_proto_msgTypes, }.Build() File_backend_api_v2beta1_healthz_proto = out.File - file_backend_api_v2beta1_healthz_proto_rawDesc = nil file_backend_api_v2beta1_healthz_proto_goTypes = nil file_backend_api_v2beta1_healthz_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// HealthzServiceClient is the client API for HealthzService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HealthzServiceClient interface { - // Get healthz data. - GetHealthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHealthzResponse, error) -} - -type healthzServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewHealthzServiceClient(cc grpc.ClientConnInterface) HealthzServiceClient { - return &healthzServiceClient{cc} -} - -func (c *healthzServiceClient) GetHealthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHealthzResponse, error) { - out := new(GetHealthzResponse) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.HealthzService/GetHealthz", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HealthzServiceServer is the server API for HealthzService service. -type HealthzServiceServer interface { - // Get healthz data. - GetHealthz(context.Context, *emptypb.Empty) (*GetHealthzResponse, error) -} - -// UnimplementedHealthzServiceServer can be embedded to have forward compatible implementations. -type UnimplementedHealthzServiceServer struct { -} - -func (*UnimplementedHealthzServiceServer) GetHealthz(context.Context, *emptypb.Empty) (*GetHealthzResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetHealthz not implemented") -} - -func RegisterHealthzServiceServer(s *grpc.Server, srv HealthzServiceServer) { - s.RegisterService(&_HealthzService_serviceDesc, srv) -} - -func _HealthzService_GetHealthz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HealthzServiceServer).GetHealthz(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.HealthzService/GetHealthz", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthzServiceServer).GetHealthz(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _HealthzService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.HealthzService", - HandlerType: (*HealthzServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetHealthz", - Handler: _HealthzService_GetHealthz_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/healthz.proto", -} diff --git a/backend/api/v2beta1/go_client/healthz.pb.gw.go b/backend/api/v2beta1/go_client/healthz.pb.gw.go index ffc2f3cc7d3..5d5b6262a73 100644 --- a/backend/api/v2beta1/go_client/healthz.pb.gw.go +++ b/backend/api/v2beta1/go_client/healthz.pb.gw.go @@ -10,75 +10,78 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_HealthzService_GetHealthz_0(ctx context.Context, marshaler runtime.Marshaler, client HealthzServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq emptypb.Empty - var metadata runtime.ServerMetadata - + var ( + protoReq emptypb.Empty + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.GetHealthz(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_HealthzService_GetHealthz_0(ctx context.Context, marshaler runtime.Marshaler, server HealthzServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq emptypb.Empty - var metadata runtime.ServerMetadata - + var ( + protoReq emptypb.Empty + metadata runtime.ServerMetadata + ) msg, err := server.GetHealthz(ctx, &protoReq) return msg, metadata, err - } // RegisterHealthzServiceHandlerServer registers the http handlers for service HealthzService to "mux". // UnaryRPC :call HealthzServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterHealthzServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterHealthzServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthzServiceServer) error { - - mux.Handle("GET", pattern_HealthzService_GetHealthz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_HealthzService_GetHealthz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.HealthzService/GetHealthz", runtime.WithHTTPPathPattern("/apis/v2beta1/healthz")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_HealthzService_GetHealthz_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_HealthzService_GetHealthz_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_HealthzService_GetHealthz_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_HealthzService_GetHealthz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -87,25 +90,24 @@ func RegisterHealthzServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterHealthzServiceHandlerFromEndpoint is same as RegisterHealthzServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterHealthzServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterHealthzServiceHandler(ctx, mux, conn) } @@ -119,34 +121,30 @@ func RegisterHealthzServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HealthzServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HealthzServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "HealthzServiceClient" to call the correct interceptors. +// "HealthzServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterHealthzServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthzServiceClient) error { - - mux.Handle("GET", pattern_HealthzService_GetHealthz_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_HealthzService_GetHealthz_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.HealthzService/GetHealthz", runtime.WithHTTPPathPattern("/apis/v2beta1/healthz")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_HealthzService_GetHealthz_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_HealthzService_GetHealthz_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_HealthzService_GetHealthz_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_HealthzService_GetHealthz_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_HealthzService_GetHealthz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "healthz"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_HealthzService_GetHealthz_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "healthz"}, "")) ) var ( diff --git a/backend/api/v2beta1/go_client/healthz_grpc.pb.go b/backend/api/v2beta1/go_client/healthz_grpc.pb.go new file mode 100644 index 00000000000..1ed679978eb --- /dev/null +++ b/backend/api/v2beta1/go_client/healthz_grpc.pb.go @@ -0,0 +1,138 @@ +// Copyright 2023 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/healthz.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + HealthzService_GetHealthz_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.HealthzService/GetHealthz" +) + +// HealthzServiceClient is the client API for HealthzService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HealthzServiceClient interface { + // Get healthz data. + GetHealthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHealthzResponse, error) +} + +type healthzServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHealthzServiceClient(cc grpc.ClientConnInterface) HealthzServiceClient { + return &healthzServiceClient{cc} +} + +func (c *healthzServiceClient) GetHealthz(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHealthzResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetHealthzResponse) + err := c.cc.Invoke(ctx, HealthzService_GetHealthz_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HealthzServiceServer is the server API for HealthzService service. +// All implementations must embed UnimplementedHealthzServiceServer +// for forward compatibility. +type HealthzServiceServer interface { + // Get healthz data. + GetHealthz(context.Context, *emptypb.Empty) (*GetHealthzResponse, error) + mustEmbedUnimplementedHealthzServiceServer() +} + +// UnimplementedHealthzServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedHealthzServiceServer struct{} + +func (UnimplementedHealthzServiceServer) GetHealthz(context.Context, *emptypb.Empty) (*GetHealthzResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHealthz not implemented") +} +func (UnimplementedHealthzServiceServer) mustEmbedUnimplementedHealthzServiceServer() {} +func (UnimplementedHealthzServiceServer) testEmbeddedByValue() {} + +// UnsafeHealthzServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HealthzServiceServer will +// result in compilation errors. +type UnsafeHealthzServiceServer interface { + mustEmbedUnimplementedHealthzServiceServer() +} + +func RegisterHealthzServiceServer(s grpc.ServiceRegistrar, srv HealthzServiceServer) { + // If the following call pancis, it indicates UnimplementedHealthzServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&HealthzService_ServiceDesc, srv) +} + +func _HealthzService_GetHealthz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthzServiceServer).GetHealthz(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: HealthzService_GetHealthz_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthzServiceServer).GetHealthz(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +// HealthzService_ServiceDesc is the grpc.ServiceDesc for HealthzService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var HealthzService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.HealthzService", + HandlerType: (*HealthzServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetHealthz", + Handler: _HealthzService_GetHealthz_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/healthz.proto", +} diff --git a/backend/api/v2beta1/go_client/pipeline.pb.go b/backend/api/v2beta1/go_client/pipeline.pb.go index 0c60af62f5a..0e640df0a7c 100644 --- a/backend/api/v2beta1/go_client/pipeline.pb.go +++ b/backend/api/v2beta1/go_client/pipeline.pb.go @@ -14,20 +14,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/pipeline.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" status "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -35,6 +31,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -45,20 +42,17 @@ const ( ) type Pipeline struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique pipeline ID. Generated by API server. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // Required if name is not provided. Pipeline display name provided by user. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,proto3" json:"display_name,omitempty"` // Required if display_name is not provided. Pipeline name provided by user. Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` // Optional input field. A short description of the pipeline. Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // Output. Creation time of the pipeline. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,proto3" json:"created_at,omitempty"` // Input. A namespace this pipeline belongs to. // Causes error if user is not authorized to access the specified namespace. // If not specified in CreatePipeline, default namespace is used. @@ -66,16 +60,16 @@ type Pipeline struct { // In case any error happens retrieving a pipeline field, only pipeline ID, // and the error message is returned. Client has the flexibility of choosing // how to handle the error. This is especially useful during listing call. - Error *status.Status `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` + Error *status.Status `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Pipeline) Reset() { *x = Pipeline{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Pipeline) String() string { @@ -86,7 +80,7 @@ func (*Pipeline) ProtoMessage() {} func (x *Pipeline) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,18 +145,15 @@ func (x *Pipeline) GetError() *status.Status { } type PipelineVersion struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input field. Unique ID of the parent pipeline. // This is ignored in CreatePipelineAndVersion API. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // Output. Unique pipeline version ID. Generated by API server. - PipelineVersionId string `protobuf:"bytes,2,opt,name=pipeline_version_id,json=pipelineVersionId,proto3" json:"pipeline_version_id,omitempty"` + PipelineVersionId string `protobuf:"bytes,2,opt,name=pipeline_version_id,proto3" json:"pipeline_version_id,omitempty"` // Required if name is not provided. Pipeline version display name provided by user. // This is ignored in CreatePipelineAndVersion API. - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,proto3" json:"display_name,omitempty"` // Required if display_name is not provided. Pipeline version name provided by user. // This is ignored in CreatePipelineAndVersion API. Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"` @@ -170,32 +161,32 @@ type PipelineVersion struct { // This is ignored in CreatePipelineAndVersion API. Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // Output. Creation time of the pipeline version. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,proto3" json:"created_at,omitempty"` // Input. Required. The URL to the source of the pipeline version. // This is required when creating the pipeine version through // CreatePipelineVersion or CreatePipelineAndVersion API. - PackageUrl *Url `protobuf:"bytes,6,opt,name=package_url,json=packageUrl,proto3" json:"package_url,omitempty"` + PackageUrl *Url `protobuf:"bytes,6,opt,name=package_url,proto3" json:"package_url,omitempty"` // Input. Optional. The URL to the code source of the pipeline version. // The code is usually the Python definition of the pipeline and potentially // related the component definitions. This allows users to trace back to how // the pipeline YAML was created. - CodeSourceUrl string `protobuf:"bytes,9,opt,name=code_source_url,json=codeSourceUrl,proto3" json:"code_source_url,omitempty"` + CodeSourceUrl string `protobuf:"bytes,9,opt,name=code_source_url,proto3" json:"code_source_url,omitempty"` // Output. The pipeline spec for the pipeline version. - PipelineSpec *structpb.Struct `protobuf:"bytes,7,opt,name=pipeline_spec,json=pipelineSpec,proto3" json:"pipeline_spec,omitempty"` + PipelineSpec *structpb.Struct `protobuf:"bytes,7,opt,name=pipeline_spec,proto3" json:"pipeline_spec,omitempty"` // In case any error happens retrieving a pipeline version field, only // pipeline ID, pipeline version ID, and the error message are returned. // Client has the flexibility of choosing how to handle the error. // This is especially useful during List() calls. - Error *status.Status `protobuf:"bytes,8,opt,name=error,proto3" json:"error,omitempty"` + Error *status.Status `protobuf:"bytes,8,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineVersion) Reset() { *x = PipelineVersion{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineVersion) String() string { @@ -206,7 +197,7 @@ func (*PipelineVersion) ProtoMessage() {} func (x *PipelineVersion) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,21 +283,18 @@ func (x *PipelineVersion) GetError() *status.Status { } type Url struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // URL of the pipeline version definition. - PipelineUrl string `protobuf:"bytes,1,opt,name=pipeline_url,json=pipelineUrl,proto3" json:"pipeline_url,omitempty"` + PipelineUrl string `protobuf:"bytes,1,opt,name=pipeline_url,proto3" json:"pipeline_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Url) Reset() { *x = Url{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Url) String() string { @@ -317,7 +305,7 @@ func (*Url) ProtoMessage() {} func (x *Url) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -340,21 +328,18 @@ func (x *Url) GetPipelineUrl() string { } type CreatePipelineRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input. Pipeline that needs to be created. - Pipeline *Pipeline `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + Pipeline *Pipeline `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreatePipelineRequest) Reset() { *x = CreatePipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePipelineRequest) String() string { @@ -365,7 +350,7 @@ func (*CreatePipelineRequest) ProtoMessage() {} func (x *CreatePipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -388,21 +373,18 @@ func (x *CreatePipelineRequest) GetPipeline() *Pipeline { } type GetPipelineRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input. The ID of the pipeline to be retrieved. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPipelineRequest) Reset() { *x = GetPipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineRequest) String() string { @@ -413,7 +395,7 @@ func (*GetPipelineRequest) ProtoMessage() {} func (x *GetPipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -436,33 +418,30 @@ func (x *GetPipelineRequest) GetPipelineId() string { } type ListPipelinesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Optional input. Namespace for the pipelines. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // A page token to request the results page. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,proto3" json:"page_token,omitempty"` // The number of pipelines to be listed per page. If there are more pipelines // than this number, the response message will contain a valid value in the // nextPageToken field. - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` // Sorting order in form of "field_name", "field_name asc" or "field_name desc". // Ascending by default. - SortBy string `protobuf:"bytes,4,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,4,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // A url-encoded, JSON-serialized filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). - Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPipelinesRequest) Reset() { *x = ListPipelinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelinesRequest) String() string { @@ -473,7 +452,7 @@ func (*ListPipelinesRequest) ProtoMessage() {} func (x *ListPipelinesRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,26 +503,23 @@ func (x *ListPipelinesRequest) GetFilter() string { } type ListPipelinesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Returned pipelines. Pipelines []*Pipeline `protobuf:"bytes,1,rep,name=pipelines,proto3" json:"pipelines,omitempty"` // The total number of pipelines for the given query. - TotalSize int32 `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,2,opt,name=total_size,proto3" json:"total_size,omitempty"` // The token to list the next page of pipelines. // This token can be used on the next ListPipelinesRequest. - NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPipelinesResponse) Reset() { *x = ListPipelinesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelinesResponse) String() string { @@ -554,7 +530,7 @@ func (*ListPipelinesResponse) ProtoMessage() {} func (x *ListPipelinesResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -591,25 +567,22 @@ func (x *ListPipelinesResponse) GetNextPageToken() string { } type GetPipelineByNameRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Optional input. Namespace of the pipeline. // It could be empty if default namespaces needs to be used or if multi-user // support is turned off. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // Required input. Name of the pipeline to be retrieved. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPipelineByNameRequest) Reset() { *x = GetPipelineByNameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineByNameRequest) String() string { @@ -620,7 +593,7 @@ func (*GetPipelineByNameRequest) ProtoMessage() {} func (x *GetPipelineByNameRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -650,24 +623,21 @@ func (x *GetPipelineByNameRequest) GetName() string { } type DeletePipelineRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input. ID of the pipeline to be deleted. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // Optional. If true, the pipeline and all its versions will be deleted. // If false (default), only the pipeline will be deleted if it has no versions. - Cascade bool `protobuf:"varint,2,opt,name=cascade,proto3" json:"cascade,omitempty"` + Cascade bool `protobuf:"varint,2,opt,name=cascade,proto3" json:"cascade,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeletePipelineRequest) Reset() { *x = DeletePipelineRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePipelineRequest) String() string { @@ -678,7 +648,7 @@ func (*DeletePipelineRequest) ProtoMessage() {} func (x *DeletePipelineRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -708,24 +678,21 @@ func (x *DeletePipelineRequest) GetCascade() bool { } type CreatePipelineAndVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input. Pipeline (parent) to be created. Pipeline *Pipeline `protobuf:"bytes,1,opt,name=pipeline,proto3" json:"pipeline,omitempty"` // Required input. Pipeline version (child) to be created. // Pipeline spec will be downloaded from pipeline_version.package_url. - PipelineVersion *PipelineVersion `protobuf:"bytes,2,opt,name=pipeline_version,json=pipelineVersion,proto3" json:"pipeline_version,omitempty"` + PipelineVersion *PipelineVersion `protobuf:"bytes,2,opt,name=pipeline_version,proto3" json:"pipeline_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreatePipelineAndVersionRequest) Reset() { *x = CreatePipelineAndVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePipelineAndVersionRequest) String() string { @@ -736,7 +703,7 @@ func (*CreatePipelineAndVersionRequest) ProtoMessage() {} func (x *CreatePipelineAndVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -766,23 +733,20 @@ func (x *CreatePipelineAndVersionRequest) GetPipelineVersion() *PipelineVersion } type CreatePipelineVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input. ID of the parent pipeline. PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` // Required input. Pipeline version ID to be created. - PipelineVersion *PipelineVersion `protobuf:"bytes,2,opt,name=pipeline_version,json=pipelineVersion,proto3" json:"pipeline_version,omitempty"` + PipelineVersion *PipelineVersion `protobuf:"bytes,2,opt,name=pipeline_version,proto3" json:"pipeline_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreatePipelineVersionRequest) Reset() { *x = CreatePipelineVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePipelineVersionRequest) String() string { @@ -793,7 +757,7 @@ func (*CreatePipelineVersionRequest) ProtoMessage() {} func (x *CreatePipelineVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,23 +787,20 @@ func (x *CreatePipelineVersionRequest) GetPipelineVersion() *PipelineVersion { } type GetPipelineVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input. ID of the parent pipeline. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // Required input. ID of the pipeline version to be retrieved. - PipelineVersionId string `protobuf:"bytes,2,opt,name=pipeline_version_id,json=pipelineVersionId,proto3" json:"pipeline_version_id,omitempty"` + PipelineVersionId string `protobuf:"bytes,2,opt,name=pipeline_version_id,proto3" json:"pipeline_version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetPipelineVersionRequest) Reset() { *x = GetPipelineVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPipelineVersionRequest) String() string { @@ -850,7 +811,7 @@ func (*GetPipelineVersionRequest) ProtoMessage() {} func (x *GetPipelineVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -880,33 +841,30 @@ func (x *GetPipelineVersionRequest) GetPipelineVersionId() string { } type ListPipelineVersionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input. ID of the parent pipeline. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // A page token to request the results page. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,proto3" json:"page_token,omitempty"` // The number of pipeline versions to be listed per page. If there are more pipeline // versions than this number, the response message will contain a valid value in the // nextPageToken field. - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,proto3" json:"page_size,omitempty"` // Sorting order in form of "field_name", "field_name asc" or "field_name desc". // Ascending by default. - SortBy string `protobuf:"bytes,4,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,4,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // A url-encoded, JSON-serialized filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). - Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPipelineVersionsRequest) Reset() { *x = ListPipelineVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelineVersionsRequest) String() string { @@ -917,7 +875,7 @@ func (*ListPipelineVersionsRequest) ProtoMessage() {} func (x *ListPipelineVersionsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -968,25 +926,22 @@ func (x *ListPipelineVersionsRequest) GetFilter() string { } type ListPipelineVersionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Returned pipeline versions. - PipelineVersions []*PipelineVersion `protobuf:"bytes,1,rep,name=pipeline_versions,json=pipelineVersions,proto3" json:"pipeline_versions,omitempty"` + PipelineVersions []*PipelineVersion `protobuf:"bytes,1,rep,name=pipeline_versions,proto3" json:"pipeline_versions,omitempty"` // The token to list the next page of pipeline versions. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` // The total number of pipeline versions for the given query. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,proto3" json:"total_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListPipelineVersionsResponse) Reset() { *x = ListPipelineVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListPipelineVersionsResponse) String() string { @@ -997,7 +952,7 @@ func (*ListPipelineVersionsResponse) ProtoMessage() {} func (x *ListPipelineVersionsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1034,23 +989,20 @@ func (x *ListPipelineVersionsResponse) GetTotalSize() int32 { } type DeletePipelineVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required input. ID of the parent pipeline. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // Required input. The ID of the pipeline version to be deleted. - PipelineVersionId string `protobuf:"bytes,2,opt,name=pipeline_version_id,json=pipelineVersionId,proto3" json:"pipeline_version_id,omitempty"` + PipelineVersionId string `protobuf:"bytes,2,opt,name=pipeline_version_id,proto3" json:"pipeline_version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeletePipelineVersionRequest) Reset() { *x = DeletePipelineVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePipelineVersionRequest) String() string { @@ -1061,7 +1013,7 @@ func (*DeletePipelineVersionRequest) ProtoMessage() {} func (x *DeletePipelineVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_pipeline_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1092,324 +1044,119 @@ func (x *DeletePipelineVersionRequest) GetPipelineVersionId() string { var File_backend_api_v2beta1_pipeline_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_pipeline_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, - 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, - 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x02, - 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, - 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x28, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xd4, 0x03, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x4c, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, - 0x72, 0x6c, 0x52, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x26, - 0x0a, 0x0f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x64, 0x65, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x3c, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x53, 0x70, 0x65, 0x63, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x28, - 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x65, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4c, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, - 0x35, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, - 0x74, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, - 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xae, 0x01, 0x0a, 0x15, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x09, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, - 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x4c, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x15, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x61, 0x73, 0x63, 0x61, 0x64, 0x65, 0x22, 0xd3, 0x01, - 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x41, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4c, 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, - 0x62, 0x0a, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6b, 0x75, 0x62, 0x65, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0xa3, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x62, 0x0a, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x37, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x6c, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xab, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x16, 0x0a, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xcb, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x37, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, - 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, - 0x69, 0x7a, 0x65, 0x22, 0x6f, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x32, 0x97, 0x0f, 0x0a, 0x0f, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xac, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x3d, 0x2e, 0x6b, 0x75, - 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x29, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x17, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0xaa, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x3a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x42, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x2c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xad, 0x01, 0x0a, - 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x3c, - 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x96, 0x01, 0x0a, - 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, - 0x3d, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x2a, 0x25, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x47, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x6e, 0x64, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6b, 0x75, - 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x29, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0xe0, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x44, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x3a, 0x10, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xde, 0x01, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x41, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x4c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x46, 0x12, 0x44, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, - 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xd9, 0x01, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xc3, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x44, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x46, 0x2a, 0x44, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0x98, - 0x01, 0x92, 0x41, 0x58, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x23, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x12, 0x18, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5a, 0x1f, 0x0a, - 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, 0x1a, 0x0d, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, - 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, 0x3b, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} +const file_backend_api_v2beta1_pipeline_proto_rawDesc = "" + + "\n" + + "\"backend/api/v2beta1/pipeline.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\x8a\x02\n" + + "\bPipeline\x12 \n" + + "\vpipeline_id\x18\x01 \x01(\tR\vpipeline_id\x12\"\n" + + "\fdisplay_name\x18\x02 \x01(\tR\fdisplay_name\x12\x12\n" + + "\x04name\x18\a \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12:\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "created_at\x12\x1c\n" + + "\tnamespace\x18\x05 \x01(\tR\tnamespace\x12(\n" + + "\x05error\x18\x06 \x01(\v2\x12.google.rpc.StatusR\x05error\"\xdd\x03\n" + + "\x0fPipelineVersion\x12 \n" + + "\vpipeline_id\x18\x01 \x01(\tR\vpipeline_id\x120\n" + + "\x13pipeline_version_id\x18\x02 \x01(\tR\x13pipeline_version_id\x12\"\n" + + "\fdisplay_name\x18\x03 \x01(\tR\fdisplay_name\x12\x12\n" + + "\x04name\x18\n" + + " \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12:\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "created_at\x12M\n" + + "\vpackage_url\x18\x06 \x01(\v2+.kubeflow.pipelines.backend.api.v2beta1.UrlR\vpackage_url\x12(\n" + + "\x0fcode_source_url\x18\t \x01(\tR\x0fcode_source_url\x12=\n" + + "\rpipeline_spec\x18\a \x01(\v2\x17.google.protobuf.StructR\rpipeline_spec\x12(\n" + + "\x05error\x18\b \x01(\v2\x12.google.rpc.StatusR\x05error\")\n" + + "\x03Url\x12\"\n" + + "\fpipeline_url\x18\x01 \x01(\tR\fpipeline_url\"e\n" + + "\x15CreatePipelineRequest\x12L\n" + + "\bpipeline\x18\x01 \x01(\v20.kubeflow.pipelines.backend.api.v2beta1.PipelineR\bpipeline\"6\n" + + "\x12GetPipelineRequest\x12 \n" + + "\vpipeline_id\x18\x01 \x01(\tR\vpipeline_id\"\xa4\x01\n" + + "\x14ListPipelinesRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12\x1e\n" + + "\n" + + "page_token\x18\x02 \x01(\tR\n" + + "page_token\x12\x1c\n" + + "\tpage_size\x18\x03 \x01(\x05R\tpage_size\x12\x18\n" + + "\asort_by\x18\x04 \x01(\tR\asort_by\x12\x16\n" + + "\x06filter\x18\x05 \x01(\tR\x06filter\"\xb1\x01\n" + + "\x15ListPipelinesResponse\x12N\n" + + "\tpipelines\x18\x01 \x03(\v20.kubeflow.pipelines.backend.api.v2beta1.PipelineR\tpipelines\x12\x1e\n" + + "\n" + + "total_size\x18\x02 \x01(\x05R\n" + + "total_size\x12(\n" + + "\x0fnext_page_token\x18\x03 \x01(\tR\x0fnext_page_token\"L\n" + + "\x18GetPipelineByNameRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"S\n" + + "\x15DeletePipelineRequest\x12 \n" + + "\vpipeline_id\x18\x01 \x01(\tR\vpipeline_id\x12\x18\n" + + "\acascade\x18\x02 \x01(\bR\acascade\"\xd4\x01\n" + + "\x1fCreatePipelineAndVersionRequest\x12L\n" + + "\bpipeline\x18\x01 \x01(\v20.kubeflow.pipelines.backend.api.v2beta1.PipelineR\bpipeline\x12c\n" + + "\x10pipeline_version\x18\x02 \x01(\v27.kubeflow.pipelines.backend.api.v2beta1.PipelineVersionR\x10pipeline_version\"\xa4\x01\n" + + "\x1cCreatePipelineVersionRequest\x12\x1f\n" + + "\vpipeline_id\x18\x01 \x01(\tR\n" + + "pipelineId\x12c\n" + + "\x10pipeline_version\x18\x02 \x01(\v27.kubeflow.pipelines.backend.api.v2beta1.PipelineVersionR\x10pipeline_version\"o\n" + + "\x19GetPipelineVersionRequest\x12 \n" + + "\vpipeline_id\x18\x01 \x01(\tR\vpipeline_id\x120\n" + + "\x13pipeline_version_id\x18\x02 \x01(\tR\x13pipeline_version_id\"\xaf\x01\n" + + "\x1bListPipelineVersionsRequest\x12 \n" + + "\vpipeline_id\x18\x01 \x01(\tR\vpipeline_id\x12\x1e\n" + + "\n" + + "page_token\x18\x02 \x01(\tR\n" + + "page_token\x12\x1c\n" + + "\tpage_size\x18\x03 \x01(\x05R\tpage_size\x12\x18\n" + + "\asort_by\x18\x04 \x01(\tR\asort_by\x12\x16\n" + + "\x06filter\x18\x05 \x01(\tR\x06filter\"\xcf\x01\n" + + "\x1cListPipelineVersionsResponse\x12e\n" + + "\x11pipeline_versions\x18\x01 \x03(\v27.kubeflow.pipelines.backend.api.v2beta1.PipelineVersionR\x11pipeline_versions\x12(\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\x0fnext_page_token\x12\x1e\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\n" + + "total_size\"r\n" + + "\x1cDeletePipelineVersionRequest\x12 \n" + + "\vpipeline_id\x18\x01 \x01(\tR\vpipeline_id\x120\n" + + "\x13pipeline_version_id\x18\x02 \x01(\tR\x13pipeline_version_id2\x97\x0f\n" + + "\x0fPipelineService\x12\xac\x01\n" + + "\x0eCreatePipeline\x12=.kubeflow.pipelines.backend.api.v2beta1.CreatePipelineRequest\x1a0.kubeflow.pipelines.backend.api.v2beta1.Pipeline\")\x82\xd3\xe4\x93\x02#:\bpipeline\"\x17/apis/v2beta1/pipelines\x12\xaa\x01\n" + + "\vGetPipeline\x12:.kubeflow.pipelines.backend.api.v2beta1.GetPipelineRequest\x1a0.kubeflow.pipelines.backend.api.v2beta1.Pipeline\"-\x82\xd3\xe4\x93\x02'\x12%/apis/v2beta1/pipelines/{pipeline_id}\x12\xb5\x01\n" + + "\x11GetPipelineByName\x12@.kubeflow.pipelines.backend.api.v2beta1.GetPipelineByNameRequest\x1a0.kubeflow.pipelines.backend.api.v2beta1.Pipeline\",\x82\xd3\xe4\x93\x02&\x12$/apis/v2beta1/pipelines/names/{name}\x12\xad\x01\n" + + "\rListPipelines\x12<.kubeflow.pipelines.backend.api.v2beta1.ListPipelinesRequest\x1a=.kubeflow.pipelines.backend.api.v2beta1.ListPipelinesResponse\"\x1f\x82\xd3\xe4\x93\x02\x19\x12\x17/apis/v2beta1/pipelines\x12\x96\x01\n" + + "\x0eDeletePipeline\x12=.kubeflow.pipelines.backend.api.v2beta1.DeletePipelineRequest\x1a\x16.google.protobuf.Empty\"-\x82\xd3\xe4\x93\x02'*%/apis/v2beta1/pipelines/{pipeline_id}\x12\xc0\x01\n" + + "\x18CreatePipelineAndVersion\x12G.kubeflow.pipelines.backend.api.v2beta1.CreatePipelineAndVersionRequest\x1a0.kubeflow.pipelines.backend.api.v2beta1.Pipeline\")\x82\xd3\xe4\x93\x02#:\x01*\"\x1e/apis/v2beta1/pipelines/create\x12\xe0\x01\n" + + "\x15CreatePipelineVersion\x12D.kubeflow.pipelines.backend.api.v2beta1.CreatePipelineVersionRequest\x1a7.kubeflow.pipelines.backend.api.v2beta1.PipelineVersion\"H\x82\xd3\xe4\x93\x02B:\x10pipeline_version\"./apis/v2beta1/pipelines/{pipeline_id}/versions\x12\xde\x01\n" + + "\x12GetPipelineVersion\x12A.kubeflow.pipelines.backend.api.v2beta1.GetPipelineVersionRequest\x1a7.kubeflow.pipelines.backend.api.v2beta1.PipelineVersion\"L\x82\xd3\xe4\x93\x02F\x12D/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}\x12\xd9\x01\n" + + "\x14ListPipelineVersions\x12C.kubeflow.pipelines.backend.api.v2beta1.ListPipelineVersionsRequest\x1aD.kubeflow.pipelines.backend.api.v2beta1.ListPipelineVersionsResponse\"6\x82\xd3\xe4\x93\x020\x12./apis/v2beta1/pipelines/{pipeline_id}/versions\x12\xc3\x01\n" + + "\x15DeletePipelineVersion\x12D.kubeflow.pipelines.backend.api.v2beta1.DeletePipelineVersionRequest\x1a\x16.google.protobuf.Empty\"L\x82\xd3\xe4\x93\x02F*D/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}B\x98\x01\x92AX*\x02\x01\x02R#\n" + + "\adefault\x12\x18\x12\x16\n" + + "\x14\x1a\x12.google.rpc.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_pipeline_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_pipeline_proto_rawDescData = file_backend_api_v2beta1_pipeline_proto_rawDesc + file_backend_api_v2beta1_pipeline_proto_rawDescData []byte ) func file_backend_api_v2beta1_pipeline_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_pipeline_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_pipeline_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_pipeline_proto_rawDescData) + file_backend_api_v2beta1_pipeline_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_pipeline_proto_rawDesc), len(file_backend_api_v2beta1_pipeline_proto_rawDesc))) }) return file_backend_api_v2beta1_pipeline_proto_rawDescData } var file_backend_api_v2beta1_pipeline_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_backend_api_v2beta1_pipeline_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_pipeline_proto_goTypes = []any{ (*Pipeline)(nil), // 0: kubeflow.pipelines.backend.api.v2beta1.Pipeline (*PipelineVersion)(nil), // 1: kubeflow.pipelines.backend.api.v2beta1.PipelineVersion (*Url)(nil), // 2: kubeflow.pipelines.backend.api.v2beta1.Url @@ -1475,193 +1222,11 @@ func file_backend_api_v2beta1_pipeline_proto_init() { if File_backend_api_v2beta1_pipeline_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_pipeline_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pipeline); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineVersion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Url); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelinesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineByNameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePipelineRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePipelineAndVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePipelineVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPipelineVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelineVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPipelineVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_pipeline_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePipelineVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_pipeline_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_pipeline_proto_rawDesc), len(file_backend_api_v2beta1_pipeline_proto_rawDesc)), NumEnums: 0, NumMessages: 15, NumExtensions: 0, @@ -1672,433 +1237,6 @@ func file_backend_api_v2beta1_pipeline_proto_init() { MessageInfos: file_backend_api_v2beta1_pipeline_proto_msgTypes, }.Build() File_backend_api_v2beta1_pipeline_proto = out.File - file_backend_api_v2beta1_pipeline_proto_rawDesc = nil file_backend_api_v2beta1_pipeline_proto_goTypes = nil file_backend_api_v2beta1_pipeline_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// PipelineServiceClient is the client API for PipelineService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PipelineServiceClient interface { - // Creates a pipeline. - CreatePipeline(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) - // Finds a specific pipeline by ID. - GetPipeline(ctx context.Context, in *GetPipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) - // Finds a specific pipeline by name and namespace. - GetPipelineByName(ctx context.Context, in *GetPipelineByNameRequest, opts ...grpc.CallOption) (*Pipeline, error) - // Finds all pipelines within a namespace. - ListPipelines(ctx context.Context, in *ListPipelinesRequest, opts ...grpc.CallOption) (*ListPipelinesResponse, error) - // Deletes a pipeline by ID. If cascade is false (default), it returns an error if the - // pipeline has any versions. If cascade is true, it will also delete all pipeline versions. - DeletePipeline(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Creates a new pipeline and a new pipeline version in a single transaction. - CreatePipelineAndVersion(ctx context.Context, in *CreatePipelineAndVersionRequest, opts ...grpc.CallOption) (*Pipeline, error) - // Adds a pipeline version to the specified pipeline ID. - CreatePipelineVersion(ctx context.Context, in *CreatePipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) - // Gets a pipeline version by pipeline version ID and pipeline ID. - GetPipelineVersion(ctx context.Context, in *GetPipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) - // Lists all pipeline versions of a given pipeline ID. - ListPipelineVersions(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) - // Deletes a specific pipeline version by pipeline version ID and pipeline ID. - DeletePipelineVersion(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type pipelineServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPipelineServiceClient(cc grpc.ClientConnInterface) PipelineServiceClient { - return &pipelineServiceClient{cc} -} - -func (c *pipelineServiceClient) CreatePipeline(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) { - out := new(Pipeline) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipeline", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) GetPipeline(ctx context.Context, in *GetPipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) { - out := new(Pipeline) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipeline", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) GetPipelineByName(ctx context.Context, in *GetPipelineByNameRequest, opts ...grpc.CallOption) (*Pipeline, error) { - out := new(Pipeline) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineByName", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) ListPipelines(ctx context.Context, in *ListPipelinesRequest, opts ...grpc.CallOption) (*ListPipelinesResponse, error) { - out := new(ListPipelinesResponse) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelines", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) DeletePipeline(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipeline", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) CreatePipelineAndVersion(ctx context.Context, in *CreatePipelineAndVersionRequest, opts ...grpc.CallOption) (*Pipeline, error) { - out := new(Pipeline) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineAndVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) CreatePipelineVersion(ctx context.Context, in *CreatePipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) { - out := new(PipelineVersion) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) GetPipelineVersion(ctx context.Context, in *GetPipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) { - out := new(PipelineVersion) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) ListPipelineVersions(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) { - out := new(ListPipelineVersionsResponse) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelineVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pipelineServiceClient) DeletePipelineVersion(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipelineVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PipelineServiceServer is the server API for PipelineService service. -type PipelineServiceServer interface { - // Creates a pipeline. - CreatePipeline(context.Context, *CreatePipelineRequest) (*Pipeline, error) - // Finds a specific pipeline by ID. - GetPipeline(context.Context, *GetPipelineRequest) (*Pipeline, error) - // Finds a specific pipeline by name and namespace. - GetPipelineByName(context.Context, *GetPipelineByNameRequest) (*Pipeline, error) - // Finds all pipelines within a namespace. - ListPipelines(context.Context, *ListPipelinesRequest) (*ListPipelinesResponse, error) - // Deletes a pipeline by ID. If cascade is false (default), it returns an error if the - // pipeline has any versions. If cascade is true, it will also delete all pipeline versions. - DeletePipeline(context.Context, *DeletePipelineRequest) (*emptypb.Empty, error) - // Creates a new pipeline and a new pipeline version in a single transaction. - CreatePipelineAndVersion(context.Context, *CreatePipelineAndVersionRequest) (*Pipeline, error) - // Adds a pipeline version to the specified pipeline ID. - CreatePipelineVersion(context.Context, *CreatePipelineVersionRequest) (*PipelineVersion, error) - // Gets a pipeline version by pipeline version ID and pipeline ID. - GetPipelineVersion(context.Context, *GetPipelineVersionRequest) (*PipelineVersion, error) - // Lists all pipeline versions of a given pipeline ID. - ListPipelineVersions(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) - // Deletes a specific pipeline version by pipeline version ID and pipeline ID. - DeletePipelineVersion(context.Context, *DeletePipelineVersionRequest) (*emptypb.Empty, error) -} - -// UnimplementedPipelineServiceServer can be embedded to have forward compatible implementations. -type UnimplementedPipelineServiceServer struct { -} - -func (*UnimplementedPipelineServiceServer) CreatePipeline(context.Context, *CreatePipelineRequest) (*Pipeline, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreatePipeline not implemented") -} -func (*UnimplementedPipelineServiceServer) GetPipeline(context.Context, *GetPipelineRequest) (*Pipeline, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetPipeline not implemented") -} -func (*UnimplementedPipelineServiceServer) GetPipelineByName(context.Context, *GetPipelineByNameRequest) (*Pipeline, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetPipelineByName not implemented") -} -func (*UnimplementedPipelineServiceServer) ListPipelines(context.Context, *ListPipelinesRequest) (*ListPipelinesResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListPipelines not implemented") -} -func (*UnimplementedPipelineServiceServer) DeletePipeline(context.Context, *DeletePipelineRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeletePipeline not implemented") -} -func (*UnimplementedPipelineServiceServer) CreatePipelineAndVersion(context.Context, *CreatePipelineAndVersionRequest) (*Pipeline, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreatePipelineAndVersion not implemented") -} -func (*UnimplementedPipelineServiceServer) CreatePipelineVersion(context.Context, *CreatePipelineVersionRequest) (*PipelineVersion, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreatePipelineVersion not implemented") -} -func (*UnimplementedPipelineServiceServer) GetPipelineVersion(context.Context, *GetPipelineVersionRequest) (*PipelineVersion, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetPipelineVersion not implemented") -} -func (*UnimplementedPipelineServiceServer) ListPipelineVersions(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListPipelineVersions not implemented") -} -func (*UnimplementedPipelineServiceServer) DeletePipelineVersion(context.Context, *DeletePipelineVersionRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeletePipelineVersion not implemented") -} - -func RegisterPipelineServiceServer(s *grpc.Server, srv PipelineServiceServer) { - s.RegisterService(&_PipelineService_serviceDesc, srv) -} - -func _PipelineService_CreatePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePipelineRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).CreatePipeline(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipeline", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).CreatePipeline(ctx, req.(*CreatePipelineRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_GetPipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPipelineRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).GetPipeline(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipeline", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).GetPipeline(ctx, req.(*GetPipelineRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_GetPipelineByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPipelineByNameRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).GetPipelineByName(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineByName", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).GetPipelineByName(ctx, req.(*GetPipelineByNameRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_ListPipelines_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPipelinesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).ListPipelines(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelines", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).ListPipelines(ctx, req.(*ListPipelinesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_DeletePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePipelineRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).DeletePipeline(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipeline", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).DeletePipeline(ctx, req.(*DeletePipelineRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_CreatePipelineAndVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePipelineAndVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).CreatePipelineAndVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineAndVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).CreatePipelineAndVersion(ctx, req.(*CreatePipelineAndVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_CreatePipelineVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePipelineVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).CreatePipelineVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).CreatePipelineVersion(ctx, req.(*CreatePipelineVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_GetPipelineVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPipelineVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).GetPipelineVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).GetPipelineVersion(ctx, req.(*GetPipelineVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_ListPipelineVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPipelineVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).ListPipelineVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelineVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).ListPipelineVersions(ctx, req.(*ListPipelineVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PipelineService_DeletePipelineVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePipelineVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PipelineServiceServer).DeletePipelineVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipelineVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PipelineServiceServer).DeletePipelineVersion(ctx, req.(*DeletePipelineVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _PipelineService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.PipelineService", - HandlerType: (*PipelineServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreatePipeline", - Handler: _PipelineService_CreatePipeline_Handler, - }, - { - MethodName: "GetPipeline", - Handler: _PipelineService_GetPipeline_Handler, - }, - { - MethodName: "GetPipelineByName", - Handler: _PipelineService_GetPipelineByName_Handler, - }, - { - MethodName: "ListPipelines", - Handler: _PipelineService_ListPipelines_Handler, - }, - { - MethodName: "DeletePipeline", - Handler: _PipelineService_DeletePipeline_Handler, - }, - { - MethodName: "CreatePipelineAndVersion", - Handler: _PipelineService_CreatePipelineAndVersion_Handler, - }, - { - MethodName: "CreatePipelineVersion", - Handler: _PipelineService_CreatePipelineVersion_Handler, - }, - { - MethodName: "GetPipelineVersion", - Handler: _PipelineService_GetPipelineVersion_Handler, - }, - { - MethodName: "ListPipelineVersions", - Handler: _PipelineService_ListPipelineVersions_Handler, - }, - { - MethodName: "DeletePipelineVersion", - Handler: _PipelineService_DeletePipelineVersion_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/pipeline.proto", -} diff --git a/backend/api/v2beta1/go_client/pipeline.pb.gw.go b/backend/api/v2beta1/go_client/pipeline.pb.gw.go index de683695d12..8db0f2d3a8f 100644 --- a/backend/api/v2beta1/go_client/pipeline.pb.gw.go +++ b/backend/api/v2beta1/go_client/pipeline.pb.gw.go @@ -10,859 +10,678 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_PipelineService_CreatePipeline_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Pipeline); err != nil && err != io.EOF { + var ( + protoReq CreatePipelineRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Pipeline); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreatePipeline(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_CreatePipeline_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Pipeline); err != nil && err != io.EOF { + var ( + protoReq CreatePipelineRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Pipeline); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreatePipeline(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_GetPipeline_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - msg, err := client.GetPipeline(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_GetPipeline_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - msg, err := server.GetPipeline(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PipelineService_GetPipelineByName_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_PipelineService_GetPipelineByName_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_PipelineService_GetPipelineByName_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineByNameRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineByNameRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["name"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + 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) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_GetPipelineByName_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPipelineByName(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_GetPipelineByName_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineByNameRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineByNameRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["name"] + 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) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_GetPipelineByName_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPipelineByName(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PipelineService_ListPipelines_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_PipelineService_ListPipelines_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_PipelineService_ListPipelines_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPipelinesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListPipelinesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelines_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListPipelines(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_ListPipelines_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPipelinesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListPipelinesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelines_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListPipelines(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PipelineService_DeletePipeline_0 = &utilities.DoubleArray{Encoding: map[string]int{"pipeline_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_PipelineService_DeletePipeline_0 = &utilities.DoubleArray{Encoding: map[string]int{"pipeline_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_PipelineService_DeletePipeline_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePipelineRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePipelineRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_DeletePipeline_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeletePipeline(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_DeletePipeline_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePipelineRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePipelineRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_DeletePipeline_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeletePipeline(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_CreatePipelineAndVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineAndVersionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreatePipelineAndVersionRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreatePipelineAndVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_CreatePipelineAndVersion_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineAndVersionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CreatePipelineAndVersionRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreatePipelineAndVersion(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_CreatePipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineVersionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.PipelineVersion); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq CreatePipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.PipelineVersion); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - msg, err := client.CreatePipelineVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_CreatePipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePipelineVersionRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.PipelineVersion); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq CreatePipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.PipelineVersion); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - msg, err := server.CreatePipelineVersion(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_GetPipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - val, ok = pathParams["pipeline_version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_version_id") } - protoReq.PipelineVersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_version_id", err) } - msg, err := client.GetPipelineVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_GetPipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPipelineVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetPipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - val, ok = pathParams["pipeline_version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_version_id") } - protoReq.PipelineVersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_version_id", err) } - msg, err := server.GetPipelineVersion(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_PipelineService_ListPipelineVersions_0 = &utilities.DoubleArray{Encoding: map[string]int{"pipeline_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_PipelineService_ListPipelineVersions_0 = &utilities.DoubleArray{Encoding: map[string]int{"pipeline_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_PipelineService_ListPipelineVersions_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPipelineVersionsRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ListPipelineVersionsRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelineVersions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListPipelineVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_ListPipelineVersions_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPipelineVersionsRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ListPipelineVersionsRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PipelineService_ListPipelineVersions_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListPipelineVersions(ctx, &protoReq) return msg, metadata, err - } func request_PipelineService_DeletePipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, client PipelineServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePipelineVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - val, ok = pathParams["pipeline_version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_version_id") } - protoReq.PipelineVersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_version_id", err) } - msg, err := client.DeletePipelineVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PipelineService_DeletePipelineVersion_0(ctx context.Context, marshaler runtime.Marshaler, server PipelineServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePipelineVersionRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeletePipelineVersionRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["pipeline_id"] + val, ok := pathParams["pipeline_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_id") } - protoReq.PipelineId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_id", err) } - val, ok = pathParams["pipeline_version_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline_version_id") } - protoReq.PipelineVersionId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline_version_id", err) } - msg, err := server.DeletePipelineVersion(ctx, &protoReq) return msg, metadata, err - } // RegisterPipelineServiceHandlerServer registers the http handlers for service PipelineService to "mux". // UnaryRPC :call PipelineServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPipelineServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPipelineServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PipelineServiceServer) error { - - mux.Handle("POST", pattern_PipelineService_CreatePipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipeline", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_CreatePipeline_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_CreatePipeline_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipeline", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_GetPipeline_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_GetPipeline_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineByName", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/names/{name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_GetPipelineByName_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_GetPipelineByName_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineByName_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_ListPipelines_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_ListPipelines_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelines", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_ListPipelines_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_ListPipelines_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_ListPipelines_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_ListPipelines_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_PipelineService_DeletePipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PipelineService_DeletePipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipeline", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_DeletePipeline_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_DeletePipeline_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_DeletePipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_DeletePipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_PipelineService_CreatePipelineAndVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipelineAndVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineAndVersion", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_CreatePipelineAndVersion_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_CreatePipelineAndVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipelineAndVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipelineAndVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_PipelineService_CreatePipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineVersion", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}/versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_CreatePipelineVersion_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_CreatePipelineVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineVersion", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_GetPipelineVersion_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_GetPipelineVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_ListPipelineVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_ListPipelineVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelineVersions", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}/versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_ListPipelineVersions_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_ListPipelineVersions_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_ListPipelineVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_ListPipelineVersions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_PipelineService_DeletePipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PipelineService_DeletePipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipelineVersion", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PipelineService_DeletePipelineVersion_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_PipelineService_DeletePipelineVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_DeletePipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_DeletePipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -871,25 +690,24 @@ func RegisterPipelineServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterPipelineServiceHandlerFromEndpoint is same as RegisterPipelineServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterPipelineServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterPipelineServiceHandler(ctx, mux, conn) } @@ -903,252 +721,203 @@ func RegisterPipelineServiceHandler(ctx context.Context, mux *runtime.ServeMux, // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PipelineServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PipelineServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PipelineServiceClient" to call the correct interceptors. +// "PipelineServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPipelineServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PipelineServiceClient) error { - - mux.Handle("POST", pattern_PipelineService_CreatePipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipeline_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipeline", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_CreatePipeline_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_CreatePipeline_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipeline_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipeline", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipeline_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipeline_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineByName_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineByName", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/names/{name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipelineByName_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipelineByName_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineByName_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_ListPipelines_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_ListPipelines_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelines", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_ListPipelines_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_ListPipelines_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_ListPipelines_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_ListPipelines_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_PipelineService_DeletePipeline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PipelineService_DeletePipeline_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipeline", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_DeletePipeline_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_DeletePipeline_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_DeletePipeline_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_DeletePipeline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_PipelineService_CreatePipelineAndVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipelineAndVersion_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineAndVersion", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/create")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_CreatePipelineAndVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_CreatePipelineAndVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipelineAndVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipelineAndVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_PipelineService_CreatePipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_PipelineService_CreatePipelineVersion_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineVersion", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}/versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_CreatePipelineVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_CreatePipelineVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_CreatePipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_CreatePipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_GetPipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_GetPipelineVersion_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineVersion", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_GetPipelineVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_GetPipelineVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_GetPipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_GetPipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_PipelineService_ListPipelineVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_PipelineService_ListPipelineVersions_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelineVersions", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}/versions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_ListPipelineVersions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_ListPipelineVersions_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_ListPipelineVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_ListPipelineVersions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_PipelineService_DeletePipelineVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_PipelineService_DeletePipelineVersion_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipelineVersion", runtime.WithHTTPPathPattern("/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PipelineService_DeletePipelineVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_PipelineService_DeletePipelineVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_PipelineService_DeletePipelineVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_PipelineService_DeletePipelineVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_PipelineService_CreatePipeline_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "pipelines"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_GetPipeline_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "pipelines", "pipeline_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_GetPipelineByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v2beta1", "pipelines", "names", "name"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_ListPipelines_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "pipelines"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_DeletePipeline_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "pipelines", "pipeline_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_CreatePipelineAndVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v2beta1", "pipelines", "create"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_CreatePipelineVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v2beta1", "pipelines", "pipeline_id", "versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_GetPipelineVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v2beta1", "pipelines", "pipeline_id", "versions", "pipeline_version_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_ListPipelineVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v2beta1", "pipelines", "pipeline_id", "versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_PipelineService_DeletePipelineVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v2beta1", "pipelines", "pipeline_id", "versions", "pipeline_version_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_PipelineService_CreatePipeline_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "pipelines"}, "")) + pattern_PipelineService_GetPipeline_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "pipelines", "pipeline_id"}, "")) + pattern_PipelineService_GetPipelineByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v2beta1", "pipelines", "names", "name"}, "")) + pattern_PipelineService_ListPipelines_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "pipelines"}, "")) + pattern_PipelineService_DeletePipeline_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "pipelines", "pipeline_id"}, "")) + pattern_PipelineService_CreatePipelineAndVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v2beta1", "pipelines", "create"}, "")) + pattern_PipelineService_CreatePipelineVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v2beta1", "pipelines", "pipeline_id", "versions"}, "")) + pattern_PipelineService_GetPipelineVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v2beta1", "pipelines", "pipeline_id", "versions", "pipeline_version_id"}, "")) + pattern_PipelineService_ListPipelineVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v2beta1", "pipelines", "pipeline_id", "versions"}, "")) + pattern_PipelineService_DeletePipelineVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v2beta1", "pipelines", "pipeline_id", "versions", "pipeline_version_id"}, "")) ) var ( - forward_PipelineService_CreatePipeline_0 = runtime.ForwardResponseMessage - - forward_PipelineService_GetPipeline_0 = runtime.ForwardResponseMessage - - forward_PipelineService_GetPipelineByName_0 = runtime.ForwardResponseMessage - - forward_PipelineService_ListPipelines_0 = runtime.ForwardResponseMessage - - forward_PipelineService_DeletePipeline_0 = runtime.ForwardResponseMessage - + forward_PipelineService_CreatePipeline_0 = runtime.ForwardResponseMessage + forward_PipelineService_GetPipeline_0 = runtime.ForwardResponseMessage + forward_PipelineService_GetPipelineByName_0 = runtime.ForwardResponseMessage + forward_PipelineService_ListPipelines_0 = runtime.ForwardResponseMessage + forward_PipelineService_DeletePipeline_0 = runtime.ForwardResponseMessage forward_PipelineService_CreatePipelineAndVersion_0 = runtime.ForwardResponseMessage - - forward_PipelineService_CreatePipelineVersion_0 = runtime.ForwardResponseMessage - - forward_PipelineService_GetPipelineVersion_0 = runtime.ForwardResponseMessage - - forward_PipelineService_ListPipelineVersions_0 = runtime.ForwardResponseMessage - - forward_PipelineService_DeletePipelineVersion_0 = runtime.ForwardResponseMessage + forward_PipelineService_CreatePipelineVersion_0 = runtime.ForwardResponseMessage + forward_PipelineService_GetPipelineVersion_0 = runtime.ForwardResponseMessage + forward_PipelineService_ListPipelineVersions_0 = runtime.ForwardResponseMessage + forward_PipelineService_DeletePipelineVersion_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v2beta1/go_client/pipeline_grpc.pb.go b/backend/api/v2beta1/go_client/pipeline_grpc.pb.go new file mode 100644 index 00000000000..62227f743da --- /dev/null +++ b/backend/api/v2beta1/go_client/pipeline_grpc.pb.go @@ -0,0 +1,500 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/pipeline.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + PipelineService_CreatePipeline_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipeline" + PipelineService_GetPipeline_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipeline" + PipelineService_GetPipelineByName_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineByName" + PipelineService_ListPipelines_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelines" + PipelineService_DeletePipeline_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipeline" + PipelineService_CreatePipelineAndVersion_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineAndVersion" + PipelineService_CreatePipelineVersion_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/CreatePipelineVersion" + PipelineService_GetPipelineVersion_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/GetPipelineVersion" + PipelineService_ListPipelineVersions_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/ListPipelineVersions" + PipelineService_DeletePipelineVersion_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.PipelineService/DeletePipelineVersion" +) + +// PipelineServiceClient is the client API for PipelineService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PipelineServiceClient interface { + // Creates a pipeline. + CreatePipeline(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) + // Finds a specific pipeline by ID. + GetPipeline(ctx context.Context, in *GetPipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) + // Finds a specific pipeline by name and namespace. + GetPipelineByName(ctx context.Context, in *GetPipelineByNameRequest, opts ...grpc.CallOption) (*Pipeline, error) + // Finds all pipelines within a namespace. + ListPipelines(ctx context.Context, in *ListPipelinesRequest, opts ...grpc.CallOption) (*ListPipelinesResponse, error) + // Deletes a pipeline by ID. If cascade is false (default), it returns an error if the + // pipeline has any versions. If cascade is true, it will also delete all pipeline versions. + DeletePipeline(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Creates a new pipeline and a new pipeline version in a single transaction. + CreatePipelineAndVersion(ctx context.Context, in *CreatePipelineAndVersionRequest, opts ...grpc.CallOption) (*Pipeline, error) + // Adds a pipeline version to the specified pipeline ID. + CreatePipelineVersion(ctx context.Context, in *CreatePipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) + // Gets a pipeline version by pipeline version ID and pipeline ID. + GetPipelineVersion(ctx context.Context, in *GetPipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) + // Lists all pipeline versions of a given pipeline ID. + ListPipelineVersions(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) + // Deletes a specific pipeline version by pipeline version ID and pipeline ID. + DeletePipelineVersion(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type pipelineServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPipelineServiceClient(cc grpc.ClientConnInterface) PipelineServiceClient { + return &pipelineServiceClient{cc} +} + +func (c *pipelineServiceClient) CreatePipeline(ctx context.Context, in *CreatePipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Pipeline) + err := c.cc.Invoke(ctx, PipelineService_CreatePipeline_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetPipeline(ctx context.Context, in *GetPipelineRequest, opts ...grpc.CallOption) (*Pipeline, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Pipeline) + err := c.cc.Invoke(ctx, PipelineService_GetPipeline_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetPipelineByName(ctx context.Context, in *GetPipelineByNameRequest, opts ...grpc.CallOption) (*Pipeline, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Pipeline) + err := c.cc.Invoke(ctx, PipelineService_GetPipelineByName_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListPipelines(ctx context.Context, in *ListPipelinesRequest, opts ...grpc.CallOption) (*ListPipelinesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPipelinesResponse) + err := c.cc.Invoke(ctx, PipelineService_ListPipelines_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) DeletePipeline(ctx context.Context, in *DeletePipelineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, PipelineService_DeletePipeline_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) CreatePipelineAndVersion(ctx context.Context, in *CreatePipelineAndVersionRequest, opts ...grpc.CallOption) (*Pipeline, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Pipeline) + err := c.cc.Invoke(ctx, PipelineService_CreatePipelineAndVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) CreatePipelineVersion(ctx context.Context, in *CreatePipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PipelineVersion) + err := c.cc.Invoke(ctx, PipelineService_CreatePipelineVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) GetPipelineVersion(ctx context.Context, in *GetPipelineVersionRequest, opts ...grpc.CallOption) (*PipelineVersion, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PipelineVersion) + err := c.cc.Invoke(ctx, PipelineService_GetPipelineVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) ListPipelineVersions(ctx context.Context, in *ListPipelineVersionsRequest, opts ...grpc.CallOption) (*ListPipelineVersionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPipelineVersionsResponse) + err := c.cc.Invoke(ctx, PipelineService_ListPipelineVersions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pipelineServiceClient) DeletePipelineVersion(ctx context.Context, in *DeletePipelineVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, PipelineService_DeletePipelineVersion_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PipelineServiceServer is the server API for PipelineService service. +// All implementations must embed UnimplementedPipelineServiceServer +// for forward compatibility. +type PipelineServiceServer interface { + // Creates a pipeline. + CreatePipeline(context.Context, *CreatePipelineRequest) (*Pipeline, error) + // Finds a specific pipeline by ID. + GetPipeline(context.Context, *GetPipelineRequest) (*Pipeline, error) + // Finds a specific pipeline by name and namespace. + GetPipelineByName(context.Context, *GetPipelineByNameRequest) (*Pipeline, error) + // Finds all pipelines within a namespace. + ListPipelines(context.Context, *ListPipelinesRequest) (*ListPipelinesResponse, error) + // Deletes a pipeline by ID. If cascade is false (default), it returns an error if the + // pipeline has any versions. If cascade is true, it will also delete all pipeline versions. + DeletePipeline(context.Context, *DeletePipelineRequest) (*emptypb.Empty, error) + // Creates a new pipeline and a new pipeline version in a single transaction. + CreatePipelineAndVersion(context.Context, *CreatePipelineAndVersionRequest) (*Pipeline, error) + // Adds a pipeline version to the specified pipeline ID. + CreatePipelineVersion(context.Context, *CreatePipelineVersionRequest) (*PipelineVersion, error) + // Gets a pipeline version by pipeline version ID and pipeline ID. + GetPipelineVersion(context.Context, *GetPipelineVersionRequest) (*PipelineVersion, error) + // Lists all pipeline versions of a given pipeline ID. + ListPipelineVersions(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) + // Deletes a specific pipeline version by pipeline version ID and pipeline ID. + DeletePipelineVersion(context.Context, *DeletePipelineVersionRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedPipelineServiceServer() +} + +// UnimplementedPipelineServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPipelineServiceServer struct{} + +func (UnimplementedPipelineServiceServer) CreatePipeline(context.Context, *CreatePipelineRequest) (*Pipeline, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePipeline not implemented") +} +func (UnimplementedPipelineServiceServer) GetPipeline(context.Context, *GetPipelineRequest) (*Pipeline, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipeline not implemented") +} +func (UnimplementedPipelineServiceServer) GetPipelineByName(context.Context, *GetPipelineByNameRequest) (*Pipeline, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipelineByName not implemented") +} +func (UnimplementedPipelineServiceServer) ListPipelines(context.Context, *ListPipelinesRequest) (*ListPipelinesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPipelines not implemented") +} +func (UnimplementedPipelineServiceServer) DeletePipeline(context.Context, *DeletePipelineRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePipeline not implemented") +} +func (UnimplementedPipelineServiceServer) CreatePipelineAndVersion(context.Context, *CreatePipelineAndVersionRequest) (*Pipeline, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePipelineAndVersion not implemented") +} +func (UnimplementedPipelineServiceServer) CreatePipelineVersion(context.Context, *CreatePipelineVersionRequest) (*PipelineVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreatePipelineVersion not implemented") +} +func (UnimplementedPipelineServiceServer) GetPipelineVersion(context.Context, *GetPipelineVersionRequest) (*PipelineVersion, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipelineVersion not implemented") +} +func (UnimplementedPipelineServiceServer) ListPipelineVersions(context.Context, *ListPipelineVersionsRequest) (*ListPipelineVersionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPipelineVersions not implemented") +} +func (UnimplementedPipelineServiceServer) DeletePipelineVersion(context.Context, *DeletePipelineVersionRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePipelineVersion not implemented") +} +func (UnimplementedPipelineServiceServer) mustEmbedUnimplementedPipelineServiceServer() {} +func (UnimplementedPipelineServiceServer) testEmbeddedByValue() {} + +// UnsafePipelineServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PipelineServiceServer will +// result in compilation errors. +type UnsafePipelineServiceServer interface { + mustEmbedUnimplementedPipelineServiceServer() +} + +func RegisterPipelineServiceServer(s grpc.ServiceRegistrar, srv PipelineServiceServer) { + // If the following call pancis, it indicates UnimplementedPipelineServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&PipelineService_ServiceDesc, srv) +} + +func _PipelineService_CreatePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePipelineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).CreatePipeline(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_CreatePipeline_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).CreatePipeline(ctx, req.(*CreatePipelineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetPipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetPipeline(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetPipeline_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetPipeline(ctx, req.(*GetPipelineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetPipelineByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineByNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetPipelineByName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetPipelineByName_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetPipelineByName(ctx, req.(*GetPipelineByNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListPipelines_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPipelinesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListPipelines(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListPipelines_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListPipelines(ctx, req.(*ListPipelinesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_DeletePipeline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePipelineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).DeletePipeline(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_DeletePipeline_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).DeletePipeline(ctx, req.(*DeletePipelineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_CreatePipelineAndVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePipelineAndVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).CreatePipelineAndVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_CreatePipelineAndVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).CreatePipelineAndVersion(ctx, req.(*CreatePipelineAndVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_CreatePipelineVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreatePipelineVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).CreatePipelineVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_CreatePipelineVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).CreatePipelineVersion(ctx, req.(*CreatePipelineVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_GetPipelineVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).GetPipelineVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_GetPipelineVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).GetPipelineVersion(ctx, req.(*GetPipelineVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_ListPipelineVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPipelineVersionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).ListPipelineVersions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_ListPipelineVersions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).ListPipelineVersions(ctx, req.(*ListPipelineVersionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PipelineService_DeletePipelineVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePipelineVersionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PipelineServiceServer).DeletePipelineVersion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PipelineService_DeletePipelineVersion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PipelineServiceServer).DeletePipelineVersion(ctx, req.(*DeletePipelineVersionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PipelineService_ServiceDesc is the grpc.ServiceDesc for PipelineService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PipelineService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.PipelineService", + HandlerType: (*PipelineServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreatePipeline", + Handler: _PipelineService_CreatePipeline_Handler, + }, + { + MethodName: "GetPipeline", + Handler: _PipelineService_GetPipeline_Handler, + }, + { + MethodName: "GetPipelineByName", + Handler: _PipelineService_GetPipelineByName_Handler, + }, + { + MethodName: "ListPipelines", + Handler: _PipelineService_ListPipelines_Handler, + }, + { + MethodName: "DeletePipeline", + Handler: _PipelineService_DeletePipeline_Handler, + }, + { + MethodName: "CreatePipelineAndVersion", + Handler: _PipelineService_CreatePipelineAndVersion_Handler, + }, + { + MethodName: "CreatePipelineVersion", + Handler: _PipelineService_CreatePipelineVersion_Handler, + }, + { + MethodName: "GetPipelineVersion", + Handler: _PipelineService_GetPipelineVersion_Handler, + }, + { + MethodName: "ListPipelineVersions", + Handler: _PipelineService_ListPipelineVersions_Handler, + }, + { + MethodName: "DeletePipelineVersion", + Handler: _PipelineService_DeletePipelineVersion_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/pipeline.proto", +} diff --git a/backend/api/v2beta1/go_client/recurring_run.pb.go b/backend/api/v2beta1/go_client/recurring_run.pb.go index 851292412c9..9eebc894754 100644 --- a/backend/api/v2beta1/go_client/recurring_run.pb.go +++ b/backend/api/v2beta1/go_client/recurring_run.pb.go @@ -14,20 +14,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/recurring_run.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" status "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -35,6 +31,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -148,40 +145,37 @@ func (RecurringRun_Status) EnumDescriptor() ([]byte, []int) { } type RecurringRun struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Output. Unique run ID generated by API server. - RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,json=recurringRunId,proto3" json:"recurring_run_id,omitempty"` + RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,proto3" json:"recurring_run_id,omitempty"` // Required input field. Recurring run name provided by user. Not unique. - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,proto3" json:"display_name,omitempty"` // Optional input field. Describes the purpose of the recurring run. Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // Required input field. Specifies the source of the pipeline spec for this // recurring run. Can be either a pipeline id, pipeline version id, or a pipeline spec. // - // Types that are assignable to PipelineSource: + // Types that are valid to be assigned to PipelineSource: // // *RecurringRun_PipelineVersionId // *RecurringRun_PipelineSpec // *RecurringRun_PipelineVersionReference PipelineSource isRecurringRun_PipelineSource `protobuf_oneof:"pipeline_source"` // Runtime config of the pipeline. - RuntimeConfig *RuntimeConfig `protobuf:"bytes,6,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` + RuntimeConfig *RuntimeConfig `protobuf:"bytes,6,opt,name=runtime_config,proto3" json:"runtime_config,omitempty"` // Optional input field. Specifies which Kubernetes service account this recurring run uses. - ServiceAccount string `protobuf:"bytes,7,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` + ServiceAccount string `protobuf:"bytes,7,opt,name=service_account,proto3" json:"service_account,omitempty"` // Required input field. // Specifies how many runs can be executed concurrently. Range [1-10]. - MaxConcurrency int64 `protobuf:"varint,8,opt,name=max_concurrency,json=maxConcurrency,proto3" json:"max_concurrency,omitempty"` + MaxConcurrency int64 `protobuf:"varint,8,opt,name=max_concurrency,proto3" json:"max_concurrency,omitempty"` // Required input field. // Specifies how a run is triggered. Support cron mode or periodic mode. Trigger *Trigger `protobuf:"bytes,9,opt,name=trigger,proto3" json:"trigger,omitempty"` Mode RecurringRun_Mode `protobuf:"varint,10,opt,name=mode,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.RecurringRun_Mode" json:"mode,omitempty"` // Output. The time this recurring run was created. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,proto3" json:"created_at,omitempty"` // Output. The last time this recurring run was updated. - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,proto3" json:"updated_at,omitempty"` Status RecurringRun_Status `protobuf:"varint,13,opt,name=status,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.RecurringRun_Status" json:"status,omitempty"` // In case any error happens retrieving a recurring run field, only recurring run ID // and the error message is returned. Client has the flexibility of choosing @@ -190,21 +184,21 @@ type RecurringRun struct { // Optional input field. Whether the recurring run should catch up if behind schedule. // If true, the recurring run will only schedule the latest interval if behind schedule. // If false, the recurring run will catch up on each past interval. - NoCatchup bool `protobuf:"varint,15,opt,name=no_catchup,json=noCatchup,proto3" json:"no_catchup,omitempty"` + NoCatchup bool `protobuf:"varint,15,opt,name=no_catchup,proto3" json:"no_catchup,omitempty"` // TODO (gkclat): consider removing this field if it can be obtained from the parent experiment. // Output only. Namespace this recurring run belongs to. Derived from the parent experiment. Namespace string `protobuf:"bytes,16,opt,name=namespace,proto3" json:"namespace,omitempty"` // ID of the parent experiment this recurring run belongs to. - ExperimentId string `protobuf:"bytes,17,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,17,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RecurringRun) Reset() { *x = RecurringRun{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RecurringRun) String() string { @@ -215,7 +209,7 @@ func (*RecurringRun) ProtoMessage() {} func (x *RecurringRun) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,31 +245,37 @@ func (x *RecurringRun) GetDescription() string { return "" } -func (m *RecurringRun) GetPipelineSource() isRecurringRun_PipelineSource { - if m != nil { - return m.PipelineSource +func (x *RecurringRun) GetPipelineSource() isRecurringRun_PipelineSource { + if x != nil { + return x.PipelineSource } return nil } // Deprecated: Marked as deprecated in backend/api/v2beta1/recurring_run.proto. func (x *RecurringRun) GetPipelineVersionId() string { - if x, ok := x.GetPipelineSource().(*RecurringRun_PipelineVersionId); ok { - return x.PipelineVersionId + if x != nil { + if x, ok := x.PipelineSource.(*RecurringRun_PipelineVersionId); ok { + return x.PipelineVersionId + } } return "" } func (x *RecurringRun) GetPipelineSpec() *structpb.Struct { - if x, ok := x.GetPipelineSource().(*RecurringRun_PipelineSpec); ok { - return x.PipelineSpec + if x != nil { + if x, ok := x.PipelineSource.(*RecurringRun_PipelineSpec); ok { + return x.PipelineSpec + } } return nil } func (x *RecurringRun) GetPipelineVersionReference() *PipelineVersionReference { - if x, ok := x.GetPipelineSource().(*RecurringRun_PipelineVersionReference); ok { - return x.PipelineVersionReference + if x != nil { + if x, ok := x.PipelineSource.(*RecurringRun_PipelineVersionReference); ok { + return x.PipelineVersionReference + } } return nil } @@ -372,17 +372,17 @@ type RecurringRun_PipelineVersionId struct { // This field is Deprecated. The pipeline version id is under pipeline_version_reference for v2. // // Deprecated: Marked as deprecated in backend/api/v2beta1/recurring_run.proto. - PipelineVersionId string `protobuf:"bytes,4,opt,name=pipeline_version_id,json=pipelineVersionId,proto3,oneof"` + PipelineVersionId string `protobuf:"bytes,4,opt,name=pipeline_version_id,proto3,oneof"` } type RecurringRun_PipelineSpec struct { // The pipeline spec. - PipelineSpec *structpb.Struct `protobuf:"bytes,5,opt,name=pipeline_spec,json=pipelineSpec,proto3,oneof"` + PipelineSpec *structpb.Struct `protobuf:"bytes,5,opt,name=pipeline_spec,proto3,oneof"` } type RecurringRun_PipelineVersionReference struct { // Reference to a pipeline version containing pipeline_id and pipeline_version_id. - PipelineVersionReference *PipelineVersionReference `protobuf:"bytes,18,opt,name=pipeline_version_reference,json=pipelineVersionReference,proto3,oneof"` + PipelineVersionReference *PipelineVersionReference `protobuf:"bytes,18,opt,name=pipeline_version_reference,proto3,oneof"` } func (*RecurringRun_PipelineVersionId) isRecurringRun_PipelineSource() {} @@ -392,21 +392,18 @@ func (*RecurringRun_PipelineSpec) isRecurringRun_PipelineSource() {} func (*RecurringRun_PipelineVersionReference) isRecurringRun_PipelineSource() {} type CreateRecurringRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The recurring run to be created. - RecurringRun *RecurringRun `protobuf:"bytes,1,opt,name=recurring_run,json=recurringRun,proto3" json:"recurring_run,omitempty"` + RecurringRun *RecurringRun `protobuf:"bytes,1,opt,name=recurring_run,json=recurringRun,proto3" json:"recurring_run,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateRecurringRunRequest) Reset() { *x = CreateRecurringRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRecurringRunRequest) String() string { @@ -417,7 +414,7 @@ func (*CreateRecurringRunRequest) ProtoMessage() {} func (x *CreateRecurringRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -440,21 +437,18 @@ func (x *CreateRecurringRunRequest) GetRecurringRun() *RecurringRun { } type GetRecurringRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the recurring run to be retrieved. - RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,json=recurringRunId,proto3" json:"recurring_run_id,omitempty"` + RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,proto3" json:"recurring_run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetRecurringRunRequest) Reset() { *x = GetRecurringRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRecurringRunRequest) String() string { @@ -465,7 +459,7 @@ func (*GetRecurringRunRequest) ProtoMessage() {} func (x *GetRecurringRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -488,37 +482,34 @@ func (x *GetRecurringRunRequest) GetRecurringRunId() string { } type ListRecurringRunsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A page token to request the next page of results. The token is acquired // from the nextPageToken field of the response from the previous // ListRecurringRuns call or can be omitted when fetching the first page. - PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,1,opt,name=page_token,proto3" json:"page_token,omitempty"` // The number of recurring runs to be listed per page. If there are more recurring runs // than this number, the response message will contain a nextPageToken field you can use // to fetch the next page. - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,proto3" json:"page_size,omitempty"` // Can be formatted as "field_name", "field_name asc" or "field_name desc". // Ascending by default. - SortBy string `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,3,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // Optional input. The namespace the recurring runs belong to. Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` // The ID of the experiment to be retrieved. If empty, list recurring runs across all experiments. - ExperimentId string `protobuf:"bytes,6,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,6,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRecurringRunsRequest) Reset() { *x = ListRecurringRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecurringRunsRequest) String() string { @@ -529,7 +520,7 @@ func (*ListRecurringRunsRequest) ProtoMessage() {} func (x *ListRecurringRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,25 +578,22 @@ func (x *ListRecurringRunsRequest) GetExperimentId() string { } type ListRecurringRunsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of recurring runs returned. RecurringRuns []*RecurringRun `protobuf:"bytes,1,rep,name=recurringRuns,proto3" json:"recurringRuns,omitempty"` // The total number of recurring runs for the given query. - TotalSize int32 `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,2,opt,name=total_size,proto3" json:"total_size,omitempty"` // The token to list the next page of recurring runs. - NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRecurringRunsResponse) Reset() { *x = ListRecurringRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRecurringRunsResponse) String() string { @@ -616,7 +604,7 @@ func (*ListRecurringRunsResponse) ProtoMessage() {} func (x *ListRecurringRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -653,21 +641,18 @@ func (x *ListRecurringRunsResponse) GetNextPageToken() string { } type EnableRecurringRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the recurring runs to be enabled. - RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,json=recurringRunId,proto3" json:"recurring_run_id,omitempty"` + RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,proto3" json:"recurring_run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EnableRecurringRunRequest) Reset() { *x = EnableRecurringRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnableRecurringRunRequest) String() string { @@ -678,7 +663,7 @@ func (*EnableRecurringRunRequest) ProtoMessage() {} func (x *EnableRecurringRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -701,21 +686,18 @@ func (x *EnableRecurringRunRequest) GetRecurringRunId() string { } type DisableRecurringRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the recurring runs to be disabled. - RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,json=recurringRunId,proto3" json:"recurring_run_id,omitempty"` + RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,proto3" json:"recurring_run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DisableRecurringRunRequest) Reset() { *x = DisableRecurringRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DisableRecurringRunRequest) String() string { @@ -726,7 +708,7 @@ func (*DisableRecurringRunRequest) ProtoMessage() {} func (x *DisableRecurringRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -749,21 +731,18 @@ func (x *DisableRecurringRunRequest) GetRecurringRunId() string { } type DeleteRecurringRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the recurring run to be deleted. - RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,json=recurringRunId,proto3" json:"recurring_run_id,omitempty"` + RecurringRunId string `protobuf:"bytes,1,opt,name=recurring_run_id,proto3" json:"recurring_run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteRecurringRunRequest) Reset() { *x = DeleteRecurringRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRecurringRunRequest) String() string { @@ -774,7 +753,7 @@ func (*DeleteRecurringRunRequest) ProtoMessage() {} func (x *DeleteRecurringRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,26 +777,23 @@ func (x *DeleteRecurringRunRequest) GetRecurringRunId() string { // CronSchedule allow scheduling the recurring run with unix-like cron. type CronSchedule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The start time of the cron job. - StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,proto3" json:"start_time,omitempty"` // The end time of the cron job. - EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,proto3" json:"end_time,omitempty"` // The cron string. For details how to compose a cron, visit // ttps://en.wikipedia.org/wiki/Cron - Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"` + Cron string `protobuf:"bytes,3,opt,name=cron,proto3" json:"cron,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CronSchedule) Reset() { *x = CronSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CronSchedule) String() string { @@ -828,7 +804,7 @@ func (*CronSchedule) ProtoMessage() {} func (x *CronSchedule) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -866,25 +842,22 @@ func (x *CronSchedule) GetCron() string { // PeriodicSchedule allow scheduling the recurring run periodically with certain interval. type PeriodicSchedule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The start time of the periodic recurring run. - StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,proto3" json:"start_time,omitempty"` // The end time of the periodic recurring run. - EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,proto3" json:"end_time,omitempty"` // The time interval between the starting time of consecutive recurring runs. - IntervalSecond int64 `protobuf:"varint,3,opt,name=interval_second,json=intervalSecond,proto3" json:"interval_second,omitempty"` + IntervalSecond int64 `protobuf:"varint,3,opt,name=interval_second,proto3" json:"interval_second,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PeriodicSchedule) Reset() { *x = PeriodicSchedule{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PeriodicSchedule) String() string { @@ -895,7 +868,7 @@ func (*PeriodicSchedule) ProtoMessage() {} func (x *PeriodicSchedule) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,24 +906,21 @@ func (x *PeriodicSchedule) GetIntervalSecond() int64 { // Trigger defines what starts a pipeline run. type Trigger struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Trigger: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Trigger: // // *Trigger_CronSchedule // *Trigger_PeriodicSchedule - Trigger isTrigger_Trigger `protobuf_oneof:"trigger"` + Trigger isTrigger_Trigger `protobuf_oneof:"trigger"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Trigger) Reset() { *x = Trigger{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trigger) String() string { @@ -961,7 +931,7 @@ func (*Trigger) ProtoMessage() {} func (x *Trigger) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_recurring_run_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -976,23 +946,27 @@ func (*Trigger) Descriptor() ([]byte, []int) { return file_backend_api_v2beta1_recurring_run_proto_rawDescGZIP(), []int{10} } -func (m *Trigger) GetTrigger() isTrigger_Trigger { - if m != nil { - return m.Trigger +func (x *Trigger) GetTrigger() isTrigger_Trigger { + if x != nil { + return x.Trigger } return nil } func (x *Trigger) GetCronSchedule() *CronSchedule { - if x, ok := x.GetTrigger().(*Trigger_CronSchedule); ok { - return x.CronSchedule + if x != nil { + if x, ok := x.Trigger.(*Trigger_CronSchedule); ok { + return x.CronSchedule + } } return nil } func (x *Trigger) GetPeriodicSchedule() *PeriodicSchedule { - if x, ok := x.GetTrigger().(*Trigger_PeriodicSchedule); ok { - return x.PeriodicSchedule + if x != nil { + if x, ok := x.Trigger.(*Trigger_PeriodicSchedule); ok { + return x.PeriodicSchedule + } } return nil } @@ -1002,11 +976,11 @@ type isTrigger_Trigger interface { } type Trigger_CronSchedule struct { - CronSchedule *CronSchedule `protobuf:"bytes,1,opt,name=cron_schedule,json=cronSchedule,proto3,oneof"` + CronSchedule *CronSchedule `protobuf:"bytes,1,opt,name=cron_schedule,proto3,oneof"` } type Trigger_PeriodicSchedule struct { - PeriodicSchedule *PeriodicSchedule `protobuf:"bytes,2,opt,name=periodic_schedule,json=periodicSchedule,proto3,oneof"` + PeriodicSchedule *PeriodicSchedule `protobuf:"bytes,2,opt,name=periodic_schedule,proto3,oneof"` } func (*Trigger_CronSchedule) isTrigger_Trigger() {} @@ -1015,280 +989,109 @@ func (*Trigger_PeriodicSchedule) isTrigger_Trigger() {} var File_backend_api_v2beta1_recurring_run_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_recurring_run_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x72, 0x75, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x28, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x72, 0x75, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, - 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x09, 0x0a, 0x0c, - 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x12, 0x28, 0x0a, 0x10, - 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x13, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x11, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, - 0x63, 0x12, 0x80, 0x01, 0x0a, 0x1a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x18, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6d, - 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x63, 0x79, 0x12, 0x49, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, - 0x4d, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, - 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x75, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x53, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, - 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x63, 0x61, 0x74, 0x63, 0x68, 0x75, - 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6e, 0x6f, 0x43, 0x61, 0x74, 0x63, 0x68, - 0x75, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, - 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, - 0x0b, 0x0a, 0x07, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, - 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, - 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x42, 0x11, 0x0a, 0x0f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x76, 0x0a, 0x19, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x0d, 0x72, 0x65, 0x63, - 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x75, 0x6e, 0x22, 0x42, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, - 0x0a, 0x10, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x22, 0xca, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xbe, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, - 0x52, 0x0d, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x73, 0x12, - 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, - 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x45, 0x0a, 0x19, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, - 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x46, 0x0a, - 0x1a, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, - 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, - 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x94, 0x01, 0x0a, - 0x0c, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x39, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, - 0x72, 0x6f, 0x6e, 0x22, 0xad, 0x01, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, - 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x22, 0xda, 0x01, 0x0a, 0x07, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, - 0x5b, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0c, - 0x63, 0x72, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x67, 0x0a, 0x11, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x48, 0x00, 0x52, 0x10, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x32, 0xea, 0x08, 0x0a, 0x13, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, - 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xc1, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x12, - 0x41, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, - 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, - 0x3a, 0x0d, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x22, - 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, - 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x73, 0x12, 0xbf, 0x01, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, - 0x12, 0x3e, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, - 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x34, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, - 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x63, - 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xbd, - 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x75, 0x6e, 0x73, 0x12, 0x40, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x73, 0x12, 0xae, - 0x01, 0x0a, 0x12, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x12, 0x41, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, 0x35, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, - 0xb1, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x75, 0x72, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x12, 0x42, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x36, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x63, 0x75, 0x72, - 0x72, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x12, 0xa7, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x12, 0x41, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x2a, 0x2e, 0x2f, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x63, - 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x63, 0x75, - 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0x44, 0x92, - 0x41, 0x04, 0x2a, 0x02, 0x01, 0x02, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v2beta1_recurring_run_proto_rawDesc = "" + + "\n" + + "'backend/api/v2beta1/recurring_run.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a(backend/api/v2beta1/runtime_config.proto\x1a\x1dbackend/api/v2beta1/run.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xad\t\n" + + "\fRecurringRun\x12*\n" + + "\x10recurring_run_id\x18\x01 \x01(\tR\x10recurring_run_id\x12\"\n" + + "\fdisplay_name\x18\x02 \x01(\tR\fdisplay_name\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x126\n" + + "\x13pipeline_version_id\x18\x04 \x01(\tB\x02\x18\x01H\x00R\x13pipeline_version_id\x12?\n" + + "\rpipeline_spec\x18\x05 \x01(\v2\x17.google.protobuf.StructH\x00R\rpipeline_spec\x12\x82\x01\n" + + "\x1apipeline_version_reference\x18\x12 \x01(\v2@.kubeflow.pipelines.backend.api.v2beta1.PipelineVersionReferenceH\x00R\x1apipeline_version_reference\x12]\n" + + "\x0eruntime_config\x18\x06 \x01(\v25.kubeflow.pipelines.backend.api.v2beta1.RuntimeConfigR\x0eruntime_config\x12(\n" + + "\x0fservice_account\x18\a \x01(\tR\x0fservice_account\x12(\n" + + "\x0fmax_concurrency\x18\b \x01(\x03R\x0fmax_concurrency\x12I\n" + + "\atrigger\x18\t \x01(\v2/.kubeflow.pipelines.backend.api.v2beta1.TriggerR\atrigger\x12M\n" + + "\x04mode\x18\n" + + " \x01(\x0e29.kubeflow.pipelines.backend.api.v2beta1.RecurringRun.ModeR\x04mode\x12:\n" + + "\n" + + "created_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "created_at\x12:\n" + + "\n" + + "updated_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "updated_at\x12S\n" + + "\x06status\x18\r \x01(\x0e2;.kubeflow.pipelines.backend.api.v2beta1.RecurringRun.StatusR\x06status\x12(\n" + + "\x05error\x18\x0e \x01(\v2\x12.google.rpc.StatusR\x05error\x12\x1e\n" + + "\n" + + "no_catchup\x18\x0f \x01(\bR\n" + + "no_catchup\x12\x1c\n" + + "\tnamespace\x18\x10 \x01(\tR\tnamespace\x12$\n" + + "\rexperiment_id\x18\x11 \x01(\tR\rexperiment_id\"5\n" + + "\x04Mode\x12\x14\n" + + "\x10MODE_UNSPECIFIED\x10\x00\x12\n" + + "\n" + + "\x06ENABLE\x10\x01\x12\v\n" + + "\aDISABLE\x10\x02\";\n" + + "\x06Status\x12\x16\n" + + "\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" + + "\aENABLED\x10\x01\x12\f\n" + + "\bDISABLED\x10\x03B\x11\n" + + "\x0fpipeline_source\"v\n" + + "\x19CreateRecurringRunRequest\x12Y\n" + + "\rrecurring_run\x18\x01 \x01(\v24.kubeflow.pipelines.backend.api.v2beta1.RecurringRunR\frecurringRun\"D\n" + + "\x16GetRecurringRunRequest\x12*\n" + + "\x10recurring_run_id\x18\x01 \x01(\tR\x10recurring_run_id\"\xce\x01\n" + + "\x18ListRecurringRunsRequest\x12\x1e\n" + + "\n" + + "page_token\x18\x01 \x01(\tR\n" + + "page_token\x12\x1c\n" + + "\tpage_size\x18\x02 \x01(\x05R\tpage_size\x12\x18\n" + + "\asort_by\x18\x03 \x01(\tR\asort_by\x12\x1c\n" + + "\tnamespace\x18\x04 \x01(\tR\tnamespace\x12\x16\n" + + "\x06filter\x18\x05 \x01(\tR\x06filter\x12$\n" + + "\rexperiment_id\x18\x06 \x01(\tR\rexperiment_id\"\xc1\x01\n" + + "\x19ListRecurringRunsResponse\x12Z\n" + + "\rrecurringRuns\x18\x01 \x03(\v24.kubeflow.pipelines.backend.api.v2beta1.RecurringRunR\rrecurringRuns\x12\x1e\n" + + "\n" + + "total_size\x18\x02 \x01(\x05R\n" + + "total_size\x12(\n" + + "\x0fnext_page_token\x18\x03 \x01(\tR\x0fnext_page_token\"G\n" + + "\x19EnableRecurringRunRequest\x12*\n" + + "\x10recurring_run_id\x18\x01 \x01(\tR\x10recurring_run_id\"H\n" + + "\x1aDisableRecurringRunRequest\x12*\n" + + "\x10recurring_run_id\x18\x01 \x01(\tR\x10recurring_run_id\"G\n" + + "\x19DeleteRecurringRunRequest\x12*\n" + + "\x10recurring_run_id\x18\x01 \x01(\tR\x10recurring_run_id\"\x96\x01\n" + + "\fCronSchedule\x12:\n" + + "\n" + + "start_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "start_time\x126\n" + + "\bend_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\bend_time\x12\x12\n" + + "\x04cron\x18\x03 \x01(\tR\x04cron\"\xb0\x01\n" + + "\x10PeriodicSchedule\x12:\n" + + "\n" + + "start_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "start_time\x126\n" + + "\bend_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\bend_time\x12(\n" + + "\x0finterval_second\x18\x03 \x01(\x03R\x0finterval_second\"\xdc\x01\n" + + "\aTrigger\x12\\\n" + + "\rcron_schedule\x18\x01 \x01(\v24.kubeflow.pipelines.backend.api.v2beta1.CronScheduleH\x00R\rcron_schedule\x12h\n" + + "\x11periodic_schedule\x18\x02 \x01(\v28.kubeflow.pipelines.backend.api.v2beta1.PeriodicScheduleH\x00R\x11periodic_scheduleB\t\n" + + "\atrigger2\xea\b\n" + + "\x13RecurringRunService\x12\xc1\x01\n" + + "\x12CreateRecurringRun\x12A.kubeflow.pipelines.backend.api.v2beta1.CreateRecurringRunRequest\x1a4.kubeflow.pipelines.backend.api.v2beta1.RecurringRun\"2\x82\xd3\xe4\x93\x02,:\rrecurring_run\"\x1b/apis/v2beta1/recurringruns\x12\xbf\x01\n" + + "\x0fGetRecurringRun\x12>.kubeflow.pipelines.backend.api.v2beta1.GetRecurringRunRequest\x1a4.kubeflow.pipelines.backend.api.v2beta1.RecurringRun\"6\x82\xd3\xe4\x93\x020\x12./apis/v2beta1/recurringruns/{recurring_run_id}\x12\xbd\x01\n" + + "\x11ListRecurringRuns\x12@.kubeflow.pipelines.backend.api.v2beta1.ListRecurringRunsRequest\x1aA.kubeflow.pipelines.backend.api.v2beta1.ListRecurringRunsResponse\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/apis/v2beta1/recurringruns\x12\xae\x01\n" + + "\x12EnableRecurringRun\x12A.kubeflow.pipelines.backend.api.v2beta1.EnableRecurringRunRequest\x1a\x16.google.protobuf.Empty\"=\x82\xd3\xe4\x93\x027\"5/apis/v2beta1/recurringruns/{recurring_run_id}:enable\x12\xb1\x01\n" + + "\x13DisableRecurringRun\x12B.kubeflow.pipelines.backend.api.v2beta1.DisableRecurringRunRequest\x1a\x16.google.protobuf.Empty\">\x82\xd3\xe4\x93\x028\"6/apis/v2beta1/recurringruns/{recurring_run_id}:disable\x12\xa7\x01\n" + + "\x12DeleteRecurringRun\x12A.kubeflow.pipelines.backend.api.v2beta1.DeleteRecurringRunRequest\x1a\x16.google.protobuf.Empty\"6\x82\xd3\xe4\x93\x020*./apis/v2beta1/recurringruns/{recurring_run_id}BD\x92A\x04*\x02\x01\x02Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_recurring_run_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_recurring_run_proto_rawDescData = file_backend_api_v2beta1_recurring_run_proto_rawDesc + file_backend_api_v2beta1_recurring_run_proto_rawDescData []byte ) func file_backend_api_v2beta1_recurring_run_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_recurring_run_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_recurring_run_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_recurring_run_proto_rawDescData) + file_backend_api_v2beta1_recurring_run_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_recurring_run_proto_rawDesc), len(file_backend_api_v2beta1_recurring_run_proto_rawDesc))) }) return file_backend_api_v2beta1_recurring_run_proto_rawDescData } var file_backend_api_v2beta1_recurring_run_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_backend_api_v2beta1_recurring_run_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_backend_api_v2beta1_recurring_run_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_recurring_run_proto_goTypes = []any{ (RecurringRun_Mode)(0), // 0: kubeflow.pipelines.backend.api.v2beta1.RecurringRun.Mode (RecurringRun_Status)(0), // 1: kubeflow.pipelines.backend.api.v2beta1.RecurringRun.Status (*RecurringRun)(nil), // 2: kubeflow.pipelines.backend.api.v2beta1.RecurringRun @@ -1353,146 +1156,12 @@ func file_backend_api_v2beta1_recurring_run_proto_init() { } file_backend_api_v2beta1_runtime_config_proto_init() file_backend_api_v2beta1_run_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_recurring_run_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecurringRun); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateRecurringRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRecurringRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRecurringRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRecurringRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnableRecurringRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DisableRecurringRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRecurringRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CronSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeriodicSchedule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Trigger); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_backend_api_v2beta1_recurring_run_proto_msgTypes[0].OneofWrappers = []any{ (*RecurringRun_PipelineVersionId)(nil), (*RecurringRun_PipelineSpec)(nil), (*RecurringRun_PipelineVersionReference)(nil), } - file_backend_api_v2beta1_recurring_run_proto_msgTypes[10].OneofWrappers = []interface{}{ + file_backend_api_v2beta1_recurring_run_proto_msgTypes[10].OneofWrappers = []any{ (*Trigger_CronSchedule)(nil), (*Trigger_PeriodicSchedule)(nil), } @@ -1500,7 +1169,7 @@ func file_backend_api_v2beta1_recurring_run_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_recurring_run_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_recurring_run_proto_rawDesc), len(file_backend_api_v2beta1_recurring_run_proto_rawDesc)), NumEnums: 2, NumMessages: 11, NumExtensions: 0, @@ -1512,283 +1181,6 @@ func file_backend_api_v2beta1_recurring_run_proto_init() { MessageInfos: file_backend_api_v2beta1_recurring_run_proto_msgTypes, }.Build() File_backend_api_v2beta1_recurring_run_proto = out.File - file_backend_api_v2beta1_recurring_run_proto_rawDesc = nil file_backend_api_v2beta1_recurring_run_proto_goTypes = nil file_backend_api_v2beta1_recurring_run_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// RecurringRunServiceClient is the client API for RecurringRunService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RecurringRunServiceClient interface { - // Creates a new recurring run in an experiment, given the experiment ID. - CreateRecurringRun(ctx context.Context, in *CreateRecurringRunRequest, opts ...grpc.CallOption) (*RecurringRun, error) - // Finds a specific recurring run by ID. - GetRecurringRun(ctx context.Context, in *GetRecurringRunRequest, opts ...grpc.CallOption) (*RecurringRun, error) - // Finds all recurring runs given experiment and namespace. - // If experiment ID is not specified, find all recurring runs across all experiments. - ListRecurringRuns(ctx context.Context, in *ListRecurringRunsRequest, opts ...grpc.CallOption) (*ListRecurringRunsResponse, error) - // Restarts a recurring run that was previously stopped. All runs associated with the - // recurring run will continue. - EnableRecurringRun(ctx context.Context, in *EnableRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Stops a recurring run and all its associated runs. The recurring run is not deleted. - DisableRecurringRun(ctx context.Context, in *DisableRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Deletes a recurring run. - DeleteRecurringRun(ctx context.Context, in *DeleteRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type recurringRunServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRecurringRunServiceClient(cc grpc.ClientConnInterface) RecurringRunServiceClient { - return &recurringRunServiceClient{cc} -} - -func (c *recurringRunServiceClient) CreateRecurringRun(ctx context.Context, in *CreateRecurringRunRequest, opts ...grpc.CallOption) (*RecurringRun, error) { - out := new(RecurringRun) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/CreateRecurringRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *recurringRunServiceClient) GetRecurringRun(ctx context.Context, in *GetRecurringRunRequest, opts ...grpc.CallOption) (*RecurringRun, error) { - out := new(RecurringRun) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/GetRecurringRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *recurringRunServiceClient) ListRecurringRuns(ctx context.Context, in *ListRecurringRunsRequest, opts ...grpc.CallOption) (*ListRecurringRunsResponse, error) { - out := new(ListRecurringRunsResponse) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/ListRecurringRuns", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *recurringRunServiceClient) EnableRecurringRun(ctx context.Context, in *EnableRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/EnableRecurringRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *recurringRunServiceClient) DisableRecurringRun(ctx context.Context, in *DisableRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DisableRecurringRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *recurringRunServiceClient) DeleteRecurringRun(ctx context.Context, in *DeleteRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DeleteRecurringRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RecurringRunServiceServer is the server API for RecurringRunService service. -type RecurringRunServiceServer interface { - // Creates a new recurring run in an experiment, given the experiment ID. - CreateRecurringRun(context.Context, *CreateRecurringRunRequest) (*RecurringRun, error) - // Finds a specific recurring run by ID. - GetRecurringRun(context.Context, *GetRecurringRunRequest) (*RecurringRun, error) - // Finds all recurring runs given experiment and namespace. - // If experiment ID is not specified, find all recurring runs across all experiments. - ListRecurringRuns(context.Context, *ListRecurringRunsRequest) (*ListRecurringRunsResponse, error) - // Restarts a recurring run that was previously stopped. All runs associated with the - // recurring run will continue. - EnableRecurringRun(context.Context, *EnableRecurringRunRequest) (*emptypb.Empty, error) - // Stops a recurring run and all its associated runs. The recurring run is not deleted. - DisableRecurringRun(context.Context, *DisableRecurringRunRequest) (*emptypb.Empty, error) - // Deletes a recurring run. - DeleteRecurringRun(context.Context, *DeleteRecurringRunRequest) (*emptypb.Empty, error) -} - -// UnimplementedRecurringRunServiceServer can be embedded to have forward compatible implementations. -type UnimplementedRecurringRunServiceServer struct { -} - -func (*UnimplementedRecurringRunServiceServer) CreateRecurringRun(context.Context, *CreateRecurringRunRequest) (*RecurringRun, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreateRecurringRun not implemented") -} -func (*UnimplementedRecurringRunServiceServer) GetRecurringRun(context.Context, *GetRecurringRunRequest) (*RecurringRun, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetRecurringRun not implemented") -} -func (*UnimplementedRecurringRunServiceServer) ListRecurringRuns(context.Context, *ListRecurringRunsRequest) (*ListRecurringRunsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListRecurringRuns not implemented") -} -func (*UnimplementedRecurringRunServiceServer) EnableRecurringRun(context.Context, *EnableRecurringRunRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method EnableRecurringRun not implemented") -} -func (*UnimplementedRecurringRunServiceServer) DisableRecurringRun(context.Context, *DisableRecurringRunRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DisableRecurringRun not implemented") -} -func (*UnimplementedRecurringRunServiceServer) DeleteRecurringRun(context.Context, *DeleteRecurringRunRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeleteRecurringRun not implemented") -} - -func RegisterRecurringRunServiceServer(s *grpc.Server, srv RecurringRunServiceServer) { - s.RegisterService(&_RecurringRunService_serviceDesc, srv) -} - -func _RecurringRunService_CreateRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRecurringRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RecurringRunServiceServer).CreateRecurringRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/CreateRecurringRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RecurringRunServiceServer).CreateRecurringRun(ctx, req.(*CreateRecurringRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RecurringRunService_GetRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRecurringRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RecurringRunServiceServer).GetRecurringRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/GetRecurringRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RecurringRunServiceServer).GetRecurringRun(ctx, req.(*GetRecurringRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RecurringRunService_ListRecurringRuns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRecurringRunsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RecurringRunServiceServer).ListRecurringRuns(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/ListRecurringRuns", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RecurringRunServiceServer).ListRecurringRuns(ctx, req.(*ListRecurringRunsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RecurringRunService_EnableRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnableRecurringRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RecurringRunServiceServer).EnableRecurringRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/EnableRecurringRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RecurringRunServiceServer).EnableRecurringRun(ctx, req.(*EnableRecurringRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RecurringRunService_DisableRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DisableRecurringRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RecurringRunServiceServer).DisableRecurringRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DisableRecurringRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RecurringRunServiceServer).DisableRecurringRun(ctx, req.(*DisableRecurringRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RecurringRunService_DeleteRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRecurringRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RecurringRunServiceServer).DeleteRecurringRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DeleteRecurringRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RecurringRunServiceServer).DeleteRecurringRun(ctx, req.(*DeleteRecurringRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RecurringRunService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.RecurringRunService", - HandlerType: (*RecurringRunServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateRecurringRun", - Handler: _RecurringRunService_CreateRecurringRun_Handler, - }, - { - MethodName: "GetRecurringRun", - Handler: _RecurringRunService_GetRecurringRun_Handler, - }, - { - MethodName: "ListRecurringRuns", - Handler: _RecurringRunService_ListRecurringRuns_Handler, - }, - { - MethodName: "EnableRecurringRun", - Handler: _RecurringRunService_EnableRecurringRun_Handler, - }, - { - MethodName: "DisableRecurringRun", - Handler: _RecurringRunService_DisableRecurringRun_Handler, - }, - { - MethodName: "DeleteRecurringRun", - Handler: _RecurringRunService_DeleteRecurringRun_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/recurring_run.proto", -} diff --git a/backend/api/v2beta1/go_client/recurring_run.pb.gw.go b/backend/api/v2beta1/go_client/recurring_run.pb.gw.go index a62d96adfa7..9555ed911cd 100644 --- a/backend/api/v2beta1/go_client/recurring_run.pb.gw.go +++ b/backend/api/v2beta1/go_client/recurring_run.pb.gw.go @@ -10,457 +10,374 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RecurringRunService_CreateRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, client RecurringRunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRecurringRunRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.RecurringRun); err != nil && err != io.EOF { + var ( + protoReq CreateRecurringRunRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RecurringRun); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.CreateRecurringRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RecurringRunService_CreateRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, server RecurringRunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRecurringRunRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.RecurringRun); err != nil && err != io.EOF { + var ( + protoReq CreateRecurringRunRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RecurringRun); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateRecurringRun(ctx, &protoReq) return msg, metadata, err - } func request_RecurringRunService_GetRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, client RecurringRunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRecurringRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRecurringRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["recurring_run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["recurring_run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "recurring_run_id") } - protoReq.RecurringRunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "recurring_run_id", err) } - msg, err := client.GetRecurringRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RecurringRunService_GetRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, server RecurringRunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRecurringRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRecurringRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["recurring_run_id"] + val, ok := pathParams["recurring_run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "recurring_run_id") } - protoReq.RecurringRunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "recurring_run_id", err) } - msg, err := server.GetRecurringRun(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RecurringRunService_ListRecurringRuns_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RecurringRunService_ListRecurringRuns_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RecurringRunService_ListRecurringRuns_0(ctx context.Context, marshaler runtime.Marshaler, client RecurringRunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListRecurringRunsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListRecurringRunsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RecurringRunService_ListRecurringRuns_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListRecurringRuns(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RecurringRunService_ListRecurringRuns_0(ctx context.Context, marshaler runtime.Marshaler, server RecurringRunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListRecurringRunsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListRecurringRunsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RecurringRunService_ListRecurringRuns_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListRecurringRuns(ctx, &protoReq) return msg, metadata, err - } func request_RecurringRunService_EnableRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, client RecurringRunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EnableRecurringRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq EnableRecurringRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["recurring_run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["recurring_run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "recurring_run_id") } - protoReq.RecurringRunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "recurring_run_id", err) } - msg, err := client.EnableRecurringRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RecurringRunService_EnableRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, server RecurringRunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq EnableRecurringRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq EnableRecurringRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["recurring_run_id"] + val, ok := pathParams["recurring_run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "recurring_run_id") } - protoReq.RecurringRunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "recurring_run_id", err) } - msg, err := server.EnableRecurringRun(ctx, &protoReq) return msg, metadata, err - } func request_RecurringRunService_DisableRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, client RecurringRunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DisableRecurringRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DisableRecurringRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["recurring_run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["recurring_run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "recurring_run_id") } - protoReq.RecurringRunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "recurring_run_id", err) } - msg, err := client.DisableRecurringRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RecurringRunService_DisableRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, server RecurringRunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DisableRecurringRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DisableRecurringRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["recurring_run_id"] + val, ok := pathParams["recurring_run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "recurring_run_id") } - protoReq.RecurringRunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "recurring_run_id", err) } - msg, err := server.DisableRecurringRun(ctx, &protoReq) return msg, metadata, err - } func request_RecurringRunService_DeleteRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, client RecurringRunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRecurringRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRecurringRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["recurring_run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["recurring_run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "recurring_run_id") } - protoReq.RecurringRunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "recurring_run_id", err) } - msg, err := client.DeleteRecurringRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RecurringRunService_DeleteRecurringRun_0(ctx context.Context, marshaler runtime.Marshaler, server RecurringRunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRecurringRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRecurringRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["recurring_run_id"] + val, ok := pathParams["recurring_run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "recurring_run_id") } - protoReq.RecurringRunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "recurring_run_id", err) } - msg, err := server.DeleteRecurringRun(ctx, &protoReq) return msg, metadata, err - } // RegisterRecurringRunServiceHandlerServer registers the http handlers for service RecurringRunService to "mux". // UnaryRPC :call RecurringRunServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRecurringRunServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRecurringRunServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RecurringRunServiceServer) error { - - mux.Handle("POST", pattern_RecurringRunService_CreateRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RecurringRunService_CreateRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/CreateRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RecurringRunService_CreateRecurringRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RecurringRunService_CreateRecurringRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_CreateRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_CreateRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RecurringRunService_GetRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RecurringRunService_GetRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/GetRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns/{recurring_run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RecurringRunService_GetRecurringRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RecurringRunService_GetRecurringRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_GetRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_GetRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RecurringRunService_ListRecurringRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RecurringRunService_ListRecurringRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/ListRecurringRuns", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RecurringRunService_ListRecurringRuns_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RecurringRunService_ListRecurringRuns_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_ListRecurringRuns_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_ListRecurringRuns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RecurringRunService_EnableRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RecurringRunService_EnableRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/EnableRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns/{recurring_run_id}:enable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RecurringRunService_EnableRecurringRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RecurringRunService_EnableRecurringRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_EnableRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_EnableRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RecurringRunService_DisableRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RecurringRunService_DisableRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DisableRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns/{recurring_run_id}:disable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RecurringRunService_DisableRecurringRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RecurringRunService_DisableRecurringRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_DisableRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_DisableRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_RecurringRunService_DeleteRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RecurringRunService_DeleteRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DeleteRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns/{recurring_run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RecurringRunService_DeleteRecurringRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RecurringRunService_DeleteRecurringRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_DeleteRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_DeleteRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -469,25 +386,24 @@ func RegisterRecurringRunServiceHandlerServer(ctx context.Context, mux *runtime. // RegisterRecurringRunServiceHandlerFromEndpoint is same as RegisterRecurringRunServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRecurringRunServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterRecurringRunServiceHandler(ctx, mux, conn) } @@ -501,156 +417,127 @@ func RegisterRecurringRunServiceHandler(ctx context.Context, mux *runtime.ServeM // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RecurringRunServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RecurringRunServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RecurringRunServiceClient" to call the correct interceptors. +// "RecurringRunServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRecurringRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RecurringRunServiceClient) error { - - mux.Handle("POST", pattern_RecurringRunService_CreateRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RecurringRunService_CreateRecurringRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/CreateRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RecurringRunService_CreateRecurringRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RecurringRunService_CreateRecurringRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_CreateRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_CreateRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RecurringRunService_GetRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RecurringRunService_GetRecurringRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/GetRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns/{recurring_run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RecurringRunService_GetRecurringRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RecurringRunService_GetRecurringRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_GetRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_GetRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RecurringRunService_ListRecurringRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RecurringRunService_ListRecurringRuns_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/ListRecurringRuns", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RecurringRunService_ListRecurringRuns_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RecurringRunService_ListRecurringRuns_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_ListRecurringRuns_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_ListRecurringRuns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RecurringRunService_EnableRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RecurringRunService_EnableRecurringRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/EnableRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns/{recurring_run_id}:enable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RecurringRunService_EnableRecurringRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RecurringRunService_EnableRecurringRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_EnableRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_EnableRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RecurringRunService_DisableRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RecurringRunService_DisableRecurringRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DisableRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns/{recurring_run_id}:disable")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RecurringRunService_DisableRecurringRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RecurringRunService_DisableRecurringRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_DisableRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_DisableRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_RecurringRunService_DeleteRecurringRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RecurringRunService_DeleteRecurringRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DeleteRecurringRun", runtime.WithHTTPPathPattern("/apis/v2beta1/recurringruns/{recurring_run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RecurringRunService_DeleteRecurringRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RecurringRunService_DeleteRecurringRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RecurringRunService_DeleteRecurringRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RecurringRunService_DeleteRecurringRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_RecurringRunService_CreateRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "recurringruns"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RecurringRunService_GetRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "recurringruns", "recurring_run_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RecurringRunService_ListRecurringRuns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "recurringruns"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RecurringRunService_EnableRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "recurringruns", "recurring_run_id"}, "enable", runtime.AssumeColonVerbOpt(true))) - - pattern_RecurringRunService_DisableRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "recurringruns", "recurring_run_id"}, "disable", runtime.AssumeColonVerbOpt(true))) - - pattern_RecurringRunService_DeleteRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "recurringruns", "recurring_run_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_RecurringRunService_CreateRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "recurringruns"}, "")) + pattern_RecurringRunService_GetRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "recurringruns", "recurring_run_id"}, "")) + pattern_RecurringRunService_ListRecurringRuns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "recurringruns"}, "")) + pattern_RecurringRunService_EnableRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "recurringruns", "recurring_run_id"}, "enable")) + pattern_RecurringRunService_DisableRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "recurringruns", "recurring_run_id"}, "disable")) + pattern_RecurringRunService_DeleteRecurringRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "recurringruns", "recurring_run_id"}, "")) ) var ( - forward_RecurringRunService_CreateRecurringRun_0 = runtime.ForwardResponseMessage - - forward_RecurringRunService_GetRecurringRun_0 = runtime.ForwardResponseMessage - - forward_RecurringRunService_ListRecurringRuns_0 = runtime.ForwardResponseMessage - - forward_RecurringRunService_EnableRecurringRun_0 = runtime.ForwardResponseMessage - + forward_RecurringRunService_CreateRecurringRun_0 = runtime.ForwardResponseMessage + forward_RecurringRunService_GetRecurringRun_0 = runtime.ForwardResponseMessage + forward_RecurringRunService_ListRecurringRuns_0 = runtime.ForwardResponseMessage + forward_RecurringRunService_EnableRecurringRun_0 = runtime.ForwardResponseMessage forward_RecurringRunService_DisableRecurringRun_0 = runtime.ForwardResponseMessage - - forward_RecurringRunService_DeleteRecurringRun_0 = runtime.ForwardResponseMessage + forward_RecurringRunService_DeleteRecurringRun_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v2beta1/go_client/recurring_run_grpc.pb.go b/backend/api/v2beta1/go_client/recurring_run_grpc.pb.go new file mode 100644 index 00000000000..deb0017997a --- /dev/null +++ b/backend/api/v2beta1/go_client/recurring_run_grpc.pb.go @@ -0,0 +1,342 @@ +// Copyright 2022 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/recurring_run.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RecurringRunService_CreateRecurringRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/CreateRecurringRun" + RecurringRunService_GetRecurringRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/GetRecurringRun" + RecurringRunService_ListRecurringRuns_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/ListRecurringRuns" + RecurringRunService_EnableRecurringRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/EnableRecurringRun" + RecurringRunService_DisableRecurringRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DisableRecurringRun" + RecurringRunService_DeleteRecurringRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RecurringRunService/DeleteRecurringRun" +) + +// RecurringRunServiceClient is the client API for RecurringRunService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RecurringRunServiceClient interface { + // Creates a new recurring run in an experiment, given the experiment ID. + CreateRecurringRun(ctx context.Context, in *CreateRecurringRunRequest, opts ...grpc.CallOption) (*RecurringRun, error) + // Finds a specific recurring run by ID. + GetRecurringRun(ctx context.Context, in *GetRecurringRunRequest, opts ...grpc.CallOption) (*RecurringRun, error) + // Finds all recurring runs given experiment and namespace. + // If experiment ID is not specified, find all recurring runs across all experiments. + ListRecurringRuns(ctx context.Context, in *ListRecurringRunsRequest, opts ...grpc.CallOption) (*ListRecurringRunsResponse, error) + // Restarts a recurring run that was previously stopped. All runs associated with the + // recurring run will continue. + EnableRecurringRun(ctx context.Context, in *EnableRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Stops a recurring run and all its associated runs. The recurring run is not deleted. + DisableRecurringRun(ctx context.Context, in *DisableRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deletes a recurring run. + DeleteRecurringRun(ctx context.Context, in *DeleteRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type recurringRunServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRecurringRunServiceClient(cc grpc.ClientConnInterface) RecurringRunServiceClient { + return &recurringRunServiceClient{cc} +} + +func (c *recurringRunServiceClient) CreateRecurringRun(ctx context.Context, in *CreateRecurringRunRequest, opts ...grpc.CallOption) (*RecurringRun, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecurringRun) + err := c.cc.Invoke(ctx, RecurringRunService_CreateRecurringRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *recurringRunServiceClient) GetRecurringRun(ctx context.Context, in *GetRecurringRunRequest, opts ...grpc.CallOption) (*RecurringRun, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RecurringRun) + err := c.cc.Invoke(ctx, RecurringRunService_GetRecurringRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *recurringRunServiceClient) ListRecurringRuns(ctx context.Context, in *ListRecurringRunsRequest, opts ...grpc.CallOption) (*ListRecurringRunsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRecurringRunsResponse) + err := c.cc.Invoke(ctx, RecurringRunService_ListRecurringRuns_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *recurringRunServiceClient) EnableRecurringRun(ctx context.Context, in *EnableRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RecurringRunService_EnableRecurringRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *recurringRunServiceClient) DisableRecurringRun(ctx context.Context, in *DisableRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RecurringRunService_DisableRecurringRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *recurringRunServiceClient) DeleteRecurringRun(ctx context.Context, in *DeleteRecurringRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RecurringRunService_DeleteRecurringRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RecurringRunServiceServer is the server API for RecurringRunService service. +// All implementations must embed UnimplementedRecurringRunServiceServer +// for forward compatibility. +type RecurringRunServiceServer interface { + // Creates a new recurring run in an experiment, given the experiment ID. + CreateRecurringRun(context.Context, *CreateRecurringRunRequest) (*RecurringRun, error) + // Finds a specific recurring run by ID. + GetRecurringRun(context.Context, *GetRecurringRunRequest) (*RecurringRun, error) + // Finds all recurring runs given experiment and namespace. + // If experiment ID is not specified, find all recurring runs across all experiments. + ListRecurringRuns(context.Context, *ListRecurringRunsRequest) (*ListRecurringRunsResponse, error) + // Restarts a recurring run that was previously stopped. All runs associated with the + // recurring run will continue. + EnableRecurringRun(context.Context, *EnableRecurringRunRequest) (*emptypb.Empty, error) + // Stops a recurring run and all its associated runs. The recurring run is not deleted. + DisableRecurringRun(context.Context, *DisableRecurringRunRequest) (*emptypb.Empty, error) + // Deletes a recurring run. + DeleteRecurringRun(context.Context, *DeleteRecurringRunRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedRecurringRunServiceServer() +} + +// UnimplementedRecurringRunServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRecurringRunServiceServer struct{} + +func (UnimplementedRecurringRunServiceServer) CreateRecurringRun(context.Context, *CreateRecurringRunRequest) (*RecurringRun, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRecurringRun not implemented") +} +func (UnimplementedRecurringRunServiceServer) GetRecurringRun(context.Context, *GetRecurringRunRequest) (*RecurringRun, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRecurringRun not implemented") +} +func (UnimplementedRecurringRunServiceServer) ListRecurringRuns(context.Context, *ListRecurringRunsRequest) (*ListRecurringRunsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRecurringRuns not implemented") +} +func (UnimplementedRecurringRunServiceServer) EnableRecurringRun(context.Context, *EnableRecurringRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnableRecurringRun not implemented") +} +func (UnimplementedRecurringRunServiceServer) DisableRecurringRun(context.Context, *DisableRecurringRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisableRecurringRun not implemented") +} +func (UnimplementedRecurringRunServiceServer) DeleteRecurringRun(context.Context, *DeleteRecurringRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRecurringRun not implemented") +} +func (UnimplementedRecurringRunServiceServer) mustEmbedUnimplementedRecurringRunServiceServer() {} +func (UnimplementedRecurringRunServiceServer) testEmbeddedByValue() {} + +// UnsafeRecurringRunServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RecurringRunServiceServer will +// result in compilation errors. +type UnsafeRecurringRunServiceServer interface { + mustEmbedUnimplementedRecurringRunServiceServer() +} + +func RegisterRecurringRunServiceServer(s grpc.ServiceRegistrar, srv RecurringRunServiceServer) { + // If the following call pancis, it indicates UnimplementedRecurringRunServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RecurringRunService_ServiceDesc, srv) +} + +func _RecurringRunService_CreateRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRecurringRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RecurringRunServiceServer).CreateRecurringRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RecurringRunService_CreateRecurringRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RecurringRunServiceServer).CreateRecurringRun(ctx, req.(*CreateRecurringRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RecurringRunService_GetRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRecurringRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RecurringRunServiceServer).GetRecurringRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RecurringRunService_GetRecurringRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RecurringRunServiceServer).GetRecurringRun(ctx, req.(*GetRecurringRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RecurringRunService_ListRecurringRuns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRecurringRunsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RecurringRunServiceServer).ListRecurringRuns(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RecurringRunService_ListRecurringRuns_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RecurringRunServiceServer).ListRecurringRuns(ctx, req.(*ListRecurringRunsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RecurringRunService_EnableRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnableRecurringRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RecurringRunServiceServer).EnableRecurringRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RecurringRunService_EnableRecurringRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RecurringRunServiceServer).EnableRecurringRun(ctx, req.(*EnableRecurringRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RecurringRunService_DisableRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DisableRecurringRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RecurringRunServiceServer).DisableRecurringRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RecurringRunService_DisableRecurringRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RecurringRunServiceServer).DisableRecurringRun(ctx, req.(*DisableRecurringRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RecurringRunService_DeleteRecurringRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRecurringRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RecurringRunServiceServer).DeleteRecurringRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RecurringRunService_DeleteRecurringRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RecurringRunServiceServer).DeleteRecurringRun(ctx, req.(*DeleteRecurringRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RecurringRunService_ServiceDesc is the grpc.ServiceDesc for RecurringRunService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RecurringRunService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.RecurringRunService", + HandlerType: (*RecurringRunServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateRecurringRun", + Handler: _RecurringRunService_CreateRecurringRun_Handler, + }, + { + MethodName: "GetRecurringRun", + Handler: _RecurringRunService_GetRecurringRun_Handler, + }, + { + MethodName: "ListRecurringRuns", + Handler: _RecurringRunService_ListRecurringRuns_Handler, + }, + { + MethodName: "EnableRecurringRun", + Handler: _RecurringRunService_EnableRecurringRun_Handler, + }, + { + MethodName: "DisableRecurringRun", + Handler: _RecurringRunService_DisableRecurringRun_Handler, + }, + { + MethodName: "DeleteRecurringRun", + Handler: _RecurringRunService_DeleteRecurringRun_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/recurring_run.proto", +} diff --git a/backend/api/v2beta1/go_client/report.pb.go b/backend/api/v2beta1/go_client/report.pb.go index 8daed141bd9..9b18f42d4d0 100644 --- a/backend/api/v2beta1/go_client/report.pb.go +++ b/backend/api/v2beta1/go_client/report.pb.go @@ -14,23 +14,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/report.proto package go_client import ( - context "context" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -41,21 +38,18 @@ const ( ) type ReportWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Workflow is a workflow custom resource marshalled into a json string. - Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` + Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportWorkflowRequest) Reset() { *x = ReportWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_report_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_report_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportWorkflowRequest) String() string { @@ -66,7 +60,7 @@ func (*ReportWorkflowRequest) ProtoMessage() {} func (x *ReportWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_report_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -89,21 +83,18 @@ func (x *ReportWorkflowRequest) GetWorkflow() string { } type ReportScheduledWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string. ScheduledWorkflow string `protobuf:"bytes,1,opt,name=scheduled_workflow,json=scheduledWorkflow,proto3" json:"scheduled_workflow,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReportScheduledWorkflowRequest) Reset() { *x = ReportScheduledWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_report_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_report_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReportScheduledWorkflowRequest) String() string { @@ -114,7 +105,7 @@ func (*ReportScheduledWorkflowRequest) ProtoMessage() {} func (x *ReportScheduledWorkflowRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_report_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,67 +129,31 @@ func (x *ReportScheduledWorkflowRequest) GetScheduledWorkflow() string { var File_backend_api_v2beta1_report_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_report_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x4f, 0x0a, 0x1e, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x12, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x32, 0xde, 0x02, 0x0a, 0x0d, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, - 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x12, 0x3d, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, - 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, 0x68, - 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x46, - 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x12, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x64, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x42, 0x3d, 0x5a, 0x3b, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} +const file_backend_api_v2beta1_report_proto_rawDesc = "" + + "\n" + + " backend/api/v2beta1/report.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\"3\n" + + "\x15ReportWorkflowRequest\x12\x1a\n" + + "\bworkflow\x18\x01 \x01(\tR\bworkflow\"O\n" + + "\x1eReportScheduledWorkflowRequest\x12-\n" + + "\x12scheduled_workflow\x18\x01 \x01(\tR\x11scheduledWorkflow2\xde\x02\n" + + "\rReportService\x12\x92\x01\n" + + "\x0eReportWorkflow\x12=.kubeflow.pipelines.backend.api.v2beta1.ReportWorkflowRequest\x1a\x16.google.protobuf.Empty\")\x82\xd3\xe4\x93\x02#:\bworkflow\"\x17/apis/v2beta1/workflows\x12\xb7\x01\n" + + "\x17ReportScheduledWorkflow\x12F.kubeflow.pipelines.backend.api.v2beta1.ReportScheduledWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\x82\xd3\xe4\x93\x026:\x12scheduled_workflow\" /apis/v2beta1/scheduledworkflowsB=Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_report_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_report_proto_rawDescData = file_backend_api_v2beta1_report_proto_rawDesc + file_backend_api_v2beta1_report_proto_rawDescData []byte ) func file_backend_api_v2beta1_report_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_report_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_report_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_report_proto_rawDescData) + file_backend_api_v2beta1_report_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_report_proto_rawDesc), len(file_backend_api_v2beta1_report_proto_rawDesc))) }) return file_backend_api_v2beta1_report_proto_rawDescData } var file_backend_api_v2beta1_report_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_backend_api_v2beta1_report_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_report_proto_goTypes = []any{ (*ReportWorkflowRequest)(nil), // 0: kubeflow.pipelines.backend.api.v2beta1.ReportWorkflowRequest (*ReportScheduledWorkflowRequest)(nil), // 1: kubeflow.pipelines.backend.api.v2beta1.ReportScheduledWorkflowRequest (*emptypb.Empty)(nil), // 2: google.protobuf.Empty @@ -220,37 +175,11 @@ func file_backend_api_v2beta1_report_proto_init() { if File_backend_api_v2beta1_report_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_report_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_report_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportScheduledWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_report_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_report_proto_rawDesc), len(file_backend_api_v2beta1_report_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -261,123 +190,6 @@ func file_backend_api_v2beta1_report_proto_init() { MessageInfos: file_backend_api_v2beta1_report_proto_msgTypes, }.Build() File_backend_api_v2beta1_report_proto = out.File - file_backend_api_v2beta1_report_proto_rawDesc = nil file_backend_api_v2beta1_report_proto_goTypes = nil file_backend_api_v2beta1_report_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ReportServiceClient is the client API for ReportService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ReportServiceClient interface { - ReportWorkflow(ctx context.Context, in *ReportWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - ReportScheduledWorkflow(ctx context.Context, in *ReportScheduledWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type reportServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewReportServiceClient(cc grpc.ClientConnInterface) ReportServiceClient { - return &reportServiceClient{cc} -} - -func (c *reportServiceClient) ReportWorkflow(ctx context.Context, in *ReportWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *reportServiceClient) ReportScheduledWorkflow(ctx context.Context, in *ReportScheduledWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportScheduledWorkflow", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ReportServiceServer is the server API for ReportService service. -type ReportServiceServer interface { - ReportWorkflow(context.Context, *ReportWorkflowRequest) (*emptypb.Empty, error) - ReportScheduledWorkflow(context.Context, *ReportScheduledWorkflowRequest) (*emptypb.Empty, error) -} - -// UnimplementedReportServiceServer can be embedded to have forward compatible implementations. -type UnimplementedReportServiceServer struct { -} - -func (*UnimplementedReportServiceServer) ReportWorkflow(context.Context, *ReportWorkflowRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportWorkflow not implemented") -} -func (*UnimplementedReportServiceServer) ReportScheduledWorkflow(context.Context, *ReportScheduledWorkflowRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReportScheduledWorkflow not implemented") -} - -func RegisterReportServiceServer(s *grpc.Server, srv ReportServiceServer) { - s.RegisterService(&_ReportService_serviceDesc, srv) -} - -func _ReportService_ReportWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReportWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReportServiceServer).ReportWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReportServiceServer).ReportWorkflow(ctx, req.(*ReportWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReportService_ReportScheduledWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReportScheduledWorkflowRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReportServiceServer).ReportScheduledWorkflow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportScheduledWorkflow", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReportServiceServer).ReportScheduledWorkflow(ctx, req.(*ReportScheduledWorkflowRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ReportService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.ReportService", - HandlerType: (*ReportServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ReportWorkflow", - Handler: _ReportService_ReportWorkflow_Handler, - }, - { - MethodName: "ReportScheduledWorkflow", - Handler: _ReportService_ReportScheduledWorkflow_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/report.proto", -} diff --git a/backend/api/v2beta1/go_client/report.pb.gw.go b/backend/api/v2beta1/go_client/report.pb.gw.go index 7bf89cc0d4a..492121bb197 100644 --- a/backend/api/v2beta1/go_client/report.pb.gw.go +++ b/backend/api/v2beta1/go_client/report.pb.gw.go @@ -10,147 +10,130 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_ReportService_ReportWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client ReportServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Workflow); err != nil && err != io.EOF { + var ( + protoReq ReportWorkflowRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Workflow); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.ReportWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ReportService_ReportWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server ReportServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Workflow); err != nil && err != io.EOF { + var ( + protoReq ReportWorkflowRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Workflow); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ReportWorkflow(ctx, &protoReq) return msg, metadata, err - } func request_ReportService_ReportScheduledWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client ReportServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportScheduledWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ScheduledWorkflow); err != nil && err != io.EOF { + var ( + protoReq ReportScheduledWorkflowRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.ScheduledWorkflow); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.ReportScheduledWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ReportService_ReportScheduledWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server ReportServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReportScheduledWorkflowRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ScheduledWorkflow); err != nil && err != io.EOF { + var ( + protoReq ReportScheduledWorkflowRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.ScheduledWorkflow); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ReportScheduledWorkflow(ctx, &protoReq) return msg, metadata, err - } // RegisterReportServiceHandlerServer registers the http handlers for service ReportService to "mux". // UnaryRPC :call ReportServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterReportServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterReportServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReportServiceServer) error { - - mux.Handle("POST", pattern_ReportService_ReportWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ReportService_ReportWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportWorkflow", runtime.WithHTTPPathPattern("/apis/v2beta1/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ReportService_ReportWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ReportService_ReportWorkflow_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ReportService_ReportWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ReportService_ReportWorkflow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ReportService_ReportScheduledWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ReportService_ReportScheduledWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportScheduledWorkflow", runtime.WithHTTPPathPattern("/apis/v2beta1/scheduledworkflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ReportService_ReportScheduledWorkflow_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ReportService_ReportScheduledWorkflow_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ReportService_ReportScheduledWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ReportService_ReportScheduledWorkflow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -159,25 +142,24 @@ func RegisterReportServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterReportServiceHandlerFromEndpoint is same as RegisterReportServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterReportServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterReportServiceHandler(ctx, mux, conn) } @@ -191,60 +173,51 @@ func RegisterReportServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ReportServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ReportServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ReportServiceClient" to call the correct interceptors. +// "ReportServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterReportServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReportServiceClient) error { - - mux.Handle("POST", pattern_ReportService_ReportWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ReportService_ReportWorkflow_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportWorkflow", runtime.WithHTTPPathPattern("/apis/v2beta1/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ReportService_ReportWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ReportService_ReportWorkflow_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ReportService_ReportWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ReportService_ReportWorkflow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_ReportService_ReportScheduledWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_ReportService_ReportScheduledWorkflow_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportScheduledWorkflow", runtime.WithHTTPPathPattern("/apis/v2beta1/scheduledworkflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ReportService_ReportScheduledWorkflow_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ReportService_ReportScheduledWorkflow_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_ReportService_ReportScheduledWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_ReportService_ReportScheduledWorkflow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_ReportService_ReportWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "workflows"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ReportService_ReportScheduledWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "scheduledworkflows"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ReportService_ReportWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "workflows"}, "")) + pattern_ReportService_ReportScheduledWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "scheduledworkflows"}, "")) ) var ( - forward_ReportService_ReportWorkflow_0 = runtime.ForwardResponseMessage - + forward_ReportService_ReportWorkflow_0 = runtime.ForwardResponseMessage forward_ReportService_ReportScheduledWorkflow_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v2beta1/go_client/report_grpc.pb.go b/backend/api/v2beta1/go_client/report_grpc.pb.go new file mode 100644 index 00000000000..bdb5e3acf48 --- /dev/null +++ b/backend/api/v2beta1/go_client/report_grpc.pb.go @@ -0,0 +1,174 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/report.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ReportService_ReportWorkflow_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportWorkflow" + ReportService_ReportScheduledWorkflow_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.ReportService/ReportScheduledWorkflow" +) + +// ReportServiceClient is the client API for ReportService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ReportServiceClient interface { + ReportWorkflow(ctx context.Context, in *ReportWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + ReportScheduledWorkflow(ctx context.Context, in *ReportScheduledWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type reportServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewReportServiceClient(cc grpc.ClientConnInterface) ReportServiceClient { + return &reportServiceClient{cc} +} + +func (c *reportServiceClient) ReportWorkflow(ctx context.Context, in *ReportWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ReportService_ReportWorkflow_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reportServiceClient) ReportScheduledWorkflow(ctx context.Context, in *ReportScheduledWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ReportService_ReportScheduledWorkflow_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReportServiceServer is the server API for ReportService service. +// All implementations must embed UnimplementedReportServiceServer +// for forward compatibility. +type ReportServiceServer interface { + ReportWorkflow(context.Context, *ReportWorkflowRequest) (*emptypb.Empty, error) + ReportScheduledWorkflow(context.Context, *ReportScheduledWorkflowRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedReportServiceServer() +} + +// UnimplementedReportServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedReportServiceServer struct{} + +func (UnimplementedReportServiceServer) ReportWorkflow(context.Context, *ReportWorkflowRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReportWorkflow not implemented") +} +func (UnimplementedReportServiceServer) ReportScheduledWorkflow(context.Context, *ReportScheduledWorkflowRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReportScheduledWorkflow not implemented") +} +func (UnimplementedReportServiceServer) mustEmbedUnimplementedReportServiceServer() {} +func (UnimplementedReportServiceServer) testEmbeddedByValue() {} + +// UnsafeReportServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ReportServiceServer will +// result in compilation errors. +type UnsafeReportServiceServer interface { + mustEmbedUnimplementedReportServiceServer() +} + +func RegisterReportServiceServer(s grpc.ServiceRegistrar, srv ReportServiceServer) { + // If the following call pancis, it indicates UnimplementedReportServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ReportService_ServiceDesc, srv) +} + +func _ReportService_ReportWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportServiceServer).ReportWorkflow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ReportService_ReportWorkflow_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportServiceServer).ReportWorkflow(ctx, req.(*ReportWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReportService_ReportScheduledWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReportScheduledWorkflowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportServiceServer).ReportScheduledWorkflow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ReportService_ReportScheduledWorkflow_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportServiceServer).ReportScheduledWorkflow(ctx, req.(*ReportScheduledWorkflowRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ReportService_ServiceDesc is the grpc.ServiceDesc for ReportService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ReportService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.ReportService", + HandlerType: (*ReportServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReportWorkflow", + Handler: _ReportService_ReportWorkflow_Handler, + }, + { + MethodName: "ReportScheduledWorkflow", + Handler: _ReportService_ReportScheduledWorkflow_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/report.proto", +} diff --git a/backend/api/v2beta1/go_client/run.pb.go b/backend/api/v2beta1/go_client/run.pb.go index 6a3e75edd73..ba2fa203c05 100644 --- a/backend/api/v2beta1/go_client/run.pb.go +++ b/backend/api/v2beta1/go_client/run.pb.go @@ -14,20 +14,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/run.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" status "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -35,6 +31,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -176,43 +173,40 @@ func (Run_StorageState) EnumDescriptor() ([]byte, []int) { } type Run struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Input. ID of the parent experiment. // The default experiment ID will be used if this is not specified. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // Output. Unique run ID. Generated by API server. - RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,2,opt,name=run_id,proto3" json:"run_id,omitempty"` // Required input. Name provided by user, // or auto generated if run is created by a recurring run. - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,proto3" json:"display_name,omitempty"` // Output. Specifies whether this run is in archived or available mode. - StorageState Run_StorageState `protobuf:"varint,4,opt,name=storage_state,json=storageState,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.Run_StorageState" json:"storage_state,omitempty"` + StorageState Run_StorageState `protobuf:"varint,4,opt,name=storage_state,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.Run_StorageState" json:"storage_state,omitempty"` // Optional input. Short description of the run. Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // Required input. Specifies the source of the pipeline spec for this // run. Can be either a pipeline version id, or a pipeline spec. // - // Types that are assignable to PipelineSource: + // Types that are valid to be assigned to PipelineSource: // // *Run_PipelineVersionId // *Run_PipelineSpec // *Run_PipelineVersionReference PipelineSource isRun_PipelineSource `protobuf_oneof:"pipeline_source"` // Required input. Runtime config of the run. - RuntimeConfig *RuntimeConfig `protobuf:"bytes,8,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` + RuntimeConfig *RuntimeConfig `protobuf:"bytes,8,opt,name=runtime_config,proto3" json:"runtime_config,omitempty"` // Optional input. Specifies which kubernetes service account is used. - ServiceAccount string `protobuf:"bytes,9,opt,name=service_account,json=serviceAccount,proto3" json:"service_account,omitempty"` + ServiceAccount string `protobuf:"bytes,9,opt,name=service_account,proto3" json:"service_account,omitempty"` // Output. Creation time of the run. - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,proto3" json:"created_at,omitempty"` // Output. When this run is scheduled to start. This could be different from // created_at. For example, if a run is from a backfilling job that was supposed // to run 2 month ago, the created_at will be 2 month behind scheduled_at. - ScheduledAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=scheduled_at,json=scheduledAt,proto3" json:"scheduled_at,omitempty"` + ScheduledAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=scheduled_at,proto3" json:"scheduled_at,omitempty"` // Output. Completion of the run. - FinishedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` + FinishedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=finished_at,proto3" json:"finished_at,omitempty"` // Output. Runtime state of a run. State RuntimeState `protobuf:"varint,13,opt,name=state,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.RuntimeState" json:"state,omitempty"` // In case any error happens retrieving a run field, only run ID @@ -220,21 +214,21 @@ type Run struct { // how to handle the error. This is especially useful during listing call. Error *status.Status `protobuf:"bytes,14,opt,name=error,proto3" json:"error,omitempty"` // Output. Runtime details of a run. - RunDetails *RunDetails `protobuf:"bytes,15,opt,name=run_details,json=runDetails,proto3" json:"run_details,omitempty"` + RunDetails *RunDetails `protobuf:"bytes,15,opt,name=run_details,proto3" json:"run_details,omitempty"` // ID of the recurring run that triggered this run. - RecurringRunId string `protobuf:"bytes,16,opt,name=recurring_run_id,json=recurringRunId,proto3" json:"recurring_run_id,omitempty"` + RecurringRunId string `protobuf:"bytes,16,opt,name=recurring_run_id,proto3" json:"recurring_run_id,omitempty"` // Output. A sequence of run statuses. This field keeps a record // of state transitions. - StateHistory []*RuntimeStatus `protobuf:"bytes,17,rep,name=state_history,json=stateHistory,proto3" json:"state_history,omitempty"` + StateHistory []*RuntimeStatus `protobuf:"bytes,17,rep,name=state_history,proto3" json:"state_history,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Run) Reset() { *x = Run{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Run) String() string { @@ -245,7 +239,7 @@ func (*Run) ProtoMessage() {} func (x *Run) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -295,31 +289,37 @@ func (x *Run) GetDescription() string { return "" } -func (m *Run) GetPipelineSource() isRun_PipelineSource { - if m != nil { - return m.PipelineSource +func (x *Run) GetPipelineSource() isRun_PipelineSource { + if x != nil { + return x.PipelineSource } return nil } // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. func (x *Run) GetPipelineVersionId() string { - if x, ok := x.GetPipelineSource().(*Run_PipelineVersionId); ok { - return x.PipelineVersionId + if x != nil { + if x, ok := x.PipelineSource.(*Run_PipelineVersionId); ok { + return x.PipelineVersionId + } } return "" } func (x *Run) GetPipelineSpec() *structpb.Struct { - if x, ok := x.GetPipelineSource().(*Run_PipelineSpec); ok { - return x.PipelineSpec + if x != nil { + if x, ok := x.PipelineSource.(*Run_PipelineSpec); ok { + return x.PipelineSpec + } } return nil } func (x *Run) GetPipelineVersionReference() *PipelineVersionReference { - if x, ok := x.GetPipelineSource().(*Run_PipelineVersionReference); ok { - return x.PipelineVersionReference + if x != nil { + if x, ok := x.PipelineSource.(*Run_PipelineVersionReference); ok { + return x.PipelineVersionReference + } } return nil } @@ -402,17 +402,17 @@ type Run_PipelineVersionId struct { // This field is Deprecated. The pipeline version id is under pipeline_version_reference for v2. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - PipelineVersionId string `protobuf:"bytes,6,opt,name=pipeline_version_id,json=pipelineVersionId,proto3,oneof"` + PipelineVersionId string `protobuf:"bytes,6,opt,name=pipeline_version_id,proto3,oneof"` } type Run_PipelineSpec struct { // Pipeline spec. - PipelineSpec *structpb.Struct `protobuf:"bytes,7,opt,name=pipeline_spec,json=pipelineSpec,proto3,oneof"` + PipelineSpec *structpb.Struct `protobuf:"bytes,7,opt,name=pipeline_spec,proto3,oneof"` } type Run_PipelineVersionReference struct { // Reference to a pipeline containing pipeline_id and optionally the pipeline_version_id. - PipelineVersionReference *PipelineVersionReference `protobuf:"bytes,18,opt,name=pipeline_version_reference,json=pipelineVersionReference,proto3,oneof"` + PipelineVersionReference *PipelineVersionReference `protobuf:"bytes,18,opt,name=pipeline_version_reference,proto3,oneof"` } func (*Run_PipelineVersionId) isRun_PipelineSource() {} @@ -423,23 +423,20 @@ func (*Run_PipelineVersionReference) isRun_PipelineSource() {} // Reference to an existing pipeline version. type PipelineVersionReference struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Input. Required. Unique ID of the parent pipeline. - PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"` + PipelineId string `protobuf:"bytes,1,opt,name=pipeline_id,proto3" json:"pipeline_id,omitempty"` // Input. Optional. Unique ID of an existing pipeline version. If unset, the latest pipeline version is used. - PipelineVersionId string `protobuf:"bytes,2,opt,name=pipeline_version_id,json=pipelineVersionId,proto3" json:"pipeline_version_id,omitempty"` + PipelineVersionId string `protobuf:"bytes,2,opt,name=pipeline_version_id,proto3" json:"pipeline_version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineVersionReference) Reset() { *x = PipelineVersionReference{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineVersionReference) String() string { @@ -450,7 +447,7 @@ func (*PipelineVersionReference) ProtoMessage() {} func (x *PipelineVersionReference) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -481,12 +478,9 @@ func (x *PipelineVersionReference) GetPipelineVersionId() string { // Timestamped representation of a runtime state with an optional error. type RuntimeStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Update time of this state. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=update_time,proto3" json:"update_time,omitempty"` // The state of a runtime instance. State RuntimeState `protobuf:"varint,2,opt,name=state,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.RuntimeState" json:"state,omitempty"` // The error that occurred during the state. May be set when the state is @@ -494,16 +488,16 @@ type RuntimeStatus struct { // If the state is FAILED, the error here is final and not going to be // retried. If the state is a non-final state, the error indicates that a // system-error being retried. - Error *status.Status `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Error *status.Status `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RuntimeStatus) Reset() { *x = RuntimeStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeStatus) String() string { @@ -514,7 +508,7 @@ func (*RuntimeStatus) ProtoMessage() {} func (x *RuntimeStatus) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -552,25 +546,22 @@ func (x *RuntimeStatus) GetError() *status.Status { // Runtime details of a run. type RunDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Pipeline context ID of a run. - PipelineContextId int64 `protobuf:"varint,1,opt,name=pipeline_context_id,json=pipelineContextId,proto3" json:"pipeline_context_id,omitempty"` + PipelineContextId int64 `protobuf:"varint,1,opt,name=pipeline_context_id,proto3" json:"pipeline_context_id,omitempty"` // Pipeline run context ID of a run. - PipelineRunContextId int64 `protobuf:"varint,2,opt,name=pipeline_run_context_id,json=pipelineRunContextId,proto3" json:"pipeline_run_context_id,omitempty"` + PipelineRunContextId int64 `protobuf:"varint,2,opt,name=pipeline_run_context_id,proto3" json:"pipeline_run_context_id,omitempty"` // Runtime details of the tasks that belong to the run. - TaskDetails []*PipelineTaskDetail `protobuf:"bytes,3,rep,name=task_details,json=taskDetails,proto3" json:"task_details,omitempty"` + TaskDetails []*PipelineTaskDetail `protobuf:"bytes,3,rep,name=task_details,proto3" json:"task_details,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RunDetails) Reset() { *x = RunDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RunDetails) String() string { @@ -581,7 +572,7 @@ func (*RunDetails) ProtoMessage() {} func (x *RunDetails) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -619,56 +610,53 @@ func (x *RunDetails) GetTaskDetails() []*PipelineTaskDetail { // Runtime information of a task execution. type PipelineTaskDetail struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // ID of the parent run. - RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,1,opt,name=run_id,proto3" json:"run_id,omitempty"` // System-generated ID of a task. - TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + TaskId string `protobuf:"bytes,2,opt,name=task_id,proto3" json:"task_id,omitempty"` // User specified name of a task that is defined in // [Pipeline.spec][]. - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,proto3" json:"display_name,omitempty"` // Creation time of a task. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,proto3" json:"create_time,omitempty"` // Starting time of a task. - StartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start_time,proto3" json:"start_time,omitempty"` // Completion time of a task. - EndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=end_time,proto3" json:"end_time,omitempty"` // Execution information of a task. - ExecutorDetail *PipelineTaskExecutorDetail `protobuf:"bytes,7,opt,name=executor_detail,json=executorDetail,proto3" json:"executor_detail,omitempty"` + ExecutorDetail *PipelineTaskExecutorDetail `protobuf:"bytes,7,opt,name=executor_detail,proto3" json:"executor_detail,omitempty"` // Runtime state of a task. State RuntimeState `protobuf:"varint,8,opt,name=state,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.RuntimeState" json:"state,omitempty"` // Execution id of the corresponding entry in ML metadata store. - ExecutionId int64 `protobuf:"varint,9,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"` + ExecutionId int64 `protobuf:"varint,9,opt,name=execution_id,proto3" json:"execution_id,omitempty"` // The error that occurred during task execution. // Only populated when the task is in FAILED or CANCELED state. Error *status.Status `protobuf:"bytes,10,opt,name=error,proto3" json:"error,omitempty"` // Input artifacts of the task. - Inputs map[string]*ArtifactList `protobuf:"bytes,11,rep,name=inputs,proto3" json:"inputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Inputs map[string]*ArtifactList `protobuf:"bytes,11,rep,name=inputs,proto3" json:"inputs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Output artifacts of the task. - Outputs map[string]*ArtifactList `protobuf:"bytes,12,rep,name=outputs,proto3" json:"outputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Outputs map[string]*ArtifactList `protobuf:"bytes,12,rep,name=outputs,proto3" json:"outputs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // ID of the parent task if the task is within a component scope. // Empty if the task is at the root level. - ParentTaskId string `protobuf:"bytes,13,opt,name=parent_task_id,json=parentTaskId,proto3" json:"parent_task_id,omitempty"` + ParentTaskId string `protobuf:"bytes,13,opt,name=parent_task_id,proto3" json:"parent_task_id,omitempty"` // A sequence of task statuses. This field keeps a record // of state transitions. - StateHistory []*RuntimeStatus `protobuf:"bytes,14,rep,name=state_history,json=stateHistory,proto3" json:"state_history,omitempty"` + StateHistory []*RuntimeStatus `protobuf:"bytes,14,rep,name=state_history,proto3" json:"state_history,omitempty"` // Name of the corresponding pod assigned by the orchestration engine. // Also known as node_id. - PodName string `protobuf:"bytes,15,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` + PodName string `protobuf:"bytes,15,opt,name=pod_name,proto3" json:"pod_name,omitempty"` // Sequence of dependen tasks. - ChildTasks []*PipelineTaskDetail_ChildTask `protobuf:"bytes,16,rep,name=child_tasks,json=childTasks,proto3" json:"child_tasks,omitempty"` + ChildTasks []*PipelineTaskDetail_ChildTask `protobuf:"bytes,16,rep,name=child_tasks,proto3" json:"child_tasks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskDetail) Reset() { *x = PipelineTaskDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskDetail) String() string { @@ -679,7 +667,7 @@ func (*PipelineTaskDetail) ProtoMessage() {} func (x *PipelineTaskDetail) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -808,35 +796,32 @@ func (x *PipelineTaskDetail) GetChildTasks() []*PipelineTaskDetail_ChildTask { // Runtime information of a pipeline task executor. type PipelineTaskExecutorDetail struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The name of the job for the main container execution. - MainJob string `protobuf:"bytes,1,opt,name=main_job,json=mainJob,proto3" json:"main_job,omitempty"` + MainJob string `protobuf:"bytes,1,opt,name=main_job,proto3" json:"main_job,omitempty"` // The name of the job for the pre-caching-check container // execution. This job will be available if the // Run.pipeline_spec specifies the `pre_caching_check` hook in // the lifecycle events. - PreCachingCheckJob string `protobuf:"bytes,2,opt,name=pre_caching_check_job,json=preCachingCheckJob,proto3" json:"pre_caching_check_job,omitempty"` + PreCachingCheckJob string `protobuf:"bytes,2,opt,name=pre_caching_check_job,proto3" json:"pre_caching_check_job,omitempty"` // The names of the previously failed job for the main container // executions. The list includes the all attempts in chronological order. - FailedMainJobs []string `protobuf:"bytes,3,rep,name=failed_main_jobs,json=failedMainJobs,proto3" json:"failed_main_jobs,omitempty"` + FailedMainJobs []string `protobuf:"bytes,3,rep,name=failed_main_jobs,proto3" json:"failed_main_jobs,omitempty"` // The names of the previously failed job for the // pre-caching-check container executions. This job will be available if the // Run.pipeline_spec specifies the `pre_caching_check` hook in // the lifecycle events. // The list includes the all attempts in chronological order. - FailedPreCachingCheckJobs []string `protobuf:"bytes,4,rep,name=failed_pre_caching_check_jobs,json=failedPreCachingCheckJobs,proto3" json:"failed_pre_caching_check_jobs,omitempty"` + FailedPreCachingCheckJobs []string `protobuf:"bytes,4,rep,name=failed_pre_caching_check_jobs,proto3" json:"failed_pre_caching_check_jobs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskExecutorDetail) Reset() { *x = PipelineTaskExecutorDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskExecutorDetail) String() string { @@ -847,7 +832,7 @@ func (*PipelineTaskExecutorDetail) ProtoMessage() {} func (x *PipelineTaskExecutorDetail) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,21 +877,18 @@ func (x *PipelineTaskExecutorDetail) GetFailedPreCachingCheckJobs() []string { // A list of artifact metadata. type ArtifactList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // A list of artifact metadata ids. - ArtifactIds []int64 `protobuf:"varint,1,rep,packed,name=artifact_ids,json=artifactIds,proto3" json:"artifact_ids,omitempty"` + ArtifactIds []int64 `protobuf:"varint,1,rep,packed,name=artifact_ids,proto3" json:"artifact_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArtifactList) Reset() { *x = ArtifactList{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArtifactList) String() string { @@ -917,7 +899,7 @@ func (*ArtifactList) ProtoMessage() {} func (x *ArtifactList) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -940,25 +922,22 @@ func (x *ArtifactList) GetArtifactIds() []int64 { } type CreateRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the parent experiment. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // Run to be created. - Run *Run `protobuf:"bytes,2,opt,name=run,proto3" json:"run,omitempty"` + Run *Run `protobuf:"bytes,2,opt,name=run,proto3" json:"run,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateRunRequest) Reset() { *x = CreateRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRunRequest) String() string { @@ -969,7 +948,7 @@ func (*CreateRunRequest) ProtoMessage() {} func (x *CreateRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,25 +979,22 @@ func (x *CreateRunRequest) GetRun() *Run { } type GetRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the parent experiment. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // The ID of the run to be retrieved. - RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,2,opt,name=run_id,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetRunRequest) Reset() { *x = GetRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetRunRequest) String() string { @@ -1029,7 +1005,7 @@ func (*GetRunRequest) ProtoMessage() {} func (x *GetRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1060,37 +1036,34 @@ func (x *GetRunRequest) GetRunId() string { } type ListRunsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Optional input field. Filters based on the namespace. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // The ID of the parent experiment. If empty, response includes runs across all experiments. - ExperimentId string `protobuf:"bytes,2,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,2,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // A page token to request the next page of results. The token is acquired // from the nextPageToken field of the response from the previous // ListRuns call or can be omitted when fetching the first page. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,3,opt,name=page_token,proto3" json:"page_token,omitempty"` // The number of runs to be listed per page. If there are more runs than this // number, the response message will contain a nextPageToken field you can use // to fetch the next page. - PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,proto3" json:"page_size,omitempty"` // Can be format of "field_name", "field_name asc" or "field_name desc" // (Example, "name asc" or "id desc"). Ascending by default. - SortBy string `protobuf:"bytes,5,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"` + SortBy string `protobuf:"bytes,5,opt,name=sort_by,proto3" json:"sort_by,omitempty"` // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). - Filter string `protobuf:"bytes,6,opt,name=filter,proto3" json:"filter,omitempty"` + Filter string `protobuf:"bytes,6,opt,name=filter,proto3" json:"filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRunsRequest) Reset() { *x = ListRunsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRunsRequest) String() string { @@ -1101,7 +1074,7 @@ func (*ListRunsRequest) ProtoMessage() {} func (x *ListRunsRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1159,25 +1132,22 @@ func (x *ListRunsRequest) GetFilter() string { } type TerminateRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the parent experiment. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // The ID of the run to be terminated. - RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,2,opt,name=run_id,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TerminateRunRequest) Reset() { *x = TerminateRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TerminateRunRequest) String() string { @@ -1188,7 +1158,7 @@ func (*TerminateRunRequest) ProtoMessage() {} func (x *TerminateRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1219,25 +1189,22 @@ func (x *TerminateRunRequest) GetRunId() string { } type ListRunsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // List of retrieved runs. Runs []*Run `protobuf:"bytes,1,rep,name=runs,proto3" json:"runs,omitempty"` // The total number of runs for the given query. - TotalSize int32 `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + TotalSize int32 `protobuf:"varint,2,opt,name=total_size,proto3" json:"total_size,omitempty"` // The token to list the next page of runs. - NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRunsResponse) Reset() { *x = ListRunsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRunsResponse) String() string { @@ -1248,7 +1215,7 @@ func (*ListRunsResponse) ProtoMessage() {} func (x *ListRunsResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1285,25 +1252,22 @@ func (x *ListRunsResponse) GetNextPageToken() string { } type ArchiveRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the parent experiment. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // The ID of the run to be archived. - RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,2,opt,name=run_id,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ArchiveRunRequest) Reset() { *x = ArchiveRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ArchiveRunRequest) String() string { @@ -1314,7 +1278,7 @@ func (*ArchiveRunRequest) ProtoMessage() {} func (x *ArchiveRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1345,25 +1309,22 @@ func (x *ArchiveRunRequest) GetRunId() string { } type UnarchiveRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the parent experiment. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // The ID of the run to be restored. - RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,2,opt,name=run_id,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *UnarchiveRunRequest) Reset() { *x = UnarchiveRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UnarchiveRunRequest) String() string { @@ -1374,7 +1335,7 @@ func (*UnarchiveRunRequest) ProtoMessage() {} func (x *UnarchiveRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1405,25 +1366,22 @@ func (x *UnarchiveRunRequest) GetRunId() string { } type DeleteRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the parent experiment. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // The ID of the run to be deleted. - RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,2,opt,name=run_id,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteRunRequest) Reset() { *x = DeleteRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRunRequest) String() string { @@ -1434,7 +1392,7 @@ func (*DeleteRunRequest) ProtoMessage() {} func (x *DeleteRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1465,29 +1423,26 @@ func (x *DeleteRunRequest) GetRunId() string { } type ReadArtifactRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the parent experiment. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // ID of the run. - RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,2,opt,name=run_id,proto3" json:"run_id,omitempty"` // ID of the running node. - NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + NodeId string `protobuf:"bytes,3,opt,name=node_id,proto3" json:"node_id,omitempty"` // Name of the artifact. - ArtifactName string `protobuf:"bytes,4,opt,name=artifact_name,json=artifactName,proto3" json:"artifact_name,omitempty"` + ArtifactName string `protobuf:"bytes,4,opt,name=artifact_name,proto3" json:"artifact_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReadArtifactRequest) Reset() { *x = ReadArtifactRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadArtifactRequest) String() string { @@ -1498,7 +1453,7 @@ func (*ReadArtifactRequest) ProtoMessage() {} func (x *ReadArtifactRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1543,21 +1498,18 @@ func (x *ReadArtifactRequest) GetArtifactName() string { } type ReadArtifactResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Byte array of the artifact content. - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ReadArtifactResponse) Reset() { *x = ReadArtifactResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReadArtifactResponse) String() string { @@ -1568,7 +1520,7 @@ func (*ReadArtifactResponse) ProtoMessage() {} func (x *ReadArtifactResponse) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1591,25 +1543,22 @@ func (x *ReadArtifactResponse) GetData() []byte { } type RetryRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The ID of the parent experiment. // // Deprecated: Marked as deprecated in backend/api/v2beta1/run.proto. - ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,json=experimentId,proto3" json:"experiment_id,omitempty"` + ExperimentId string `protobuf:"bytes,1,opt,name=experiment_id,proto3" json:"experiment_id,omitempty"` // The ID of the run to be retried. - RunId string `protobuf:"bytes,2,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` + RunId string `protobuf:"bytes,2,opt,name=run_id,proto3" json:"run_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RetryRunRequest) Reset() { *x = RetryRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RetryRunRequest) String() string { @@ -1620,7 +1569,7 @@ func (*RetryRunRequest) ProtoMessage() {} func (x *RetryRunRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1653,24 +1602,21 @@ func (x *RetryRunRequest) GetRunId() string { // A dependent task that requires this one to succeed. // Represented by either task_id or pod_name. type PipelineTaskDetail_ChildTask struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ChildTask: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to ChildTask: // // *PipelineTaskDetail_ChildTask_TaskId // *PipelineTaskDetail_ChildTask_PodName - ChildTask isPipelineTaskDetail_ChildTask_ChildTask `protobuf_oneof:"child_task"` + ChildTask isPipelineTaskDetail_ChildTask_ChildTask `protobuf_oneof:"child_task"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PipelineTaskDetail_ChildTask) Reset() { *x = PipelineTaskDetail_ChildTask{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_run_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_run_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PipelineTaskDetail_ChildTask) String() string { @@ -1681,7 +1627,7 @@ func (*PipelineTaskDetail_ChildTask) ProtoMessage() {} func (x *PipelineTaskDetail_ChildTask) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_run_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1696,23 +1642,27 @@ func (*PipelineTaskDetail_ChildTask) Descriptor() ([]byte, []int) { return file_backend_api_v2beta1_run_proto_rawDescGZIP(), []int{4, 2} } -func (m *PipelineTaskDetail_ChildTask) GetChildTask() isPipelineTaskDetail_ChildTask_ChildTask { - if m != nil { - return m.ChildTask +func (x *PipelineTaskDetail_ChildTask) GetChildTask() isPipelineTaskDetail_ChildTask_ChildTask { + if x != nil { + return x.ChildTask } return nil } func (x *PipelineTaskDetail_ChildTask) GetTaskId() string { - if x, ok := x.GetChildTask().(*PipelineTaskDetail_ChildTask_TaskId); ok { - return x.TaskId + if x != nil { + if x, ok := x.ChildTask.(*PipelineTaskDetail_ChildTask_TaskId); ok { + return x.TaskId + } } return "" } func (x *PipelineTaskDetail_ChildTask) GetPodName() string { - if x, ok := x.GetChildTask().(*PipelineTaskDetail_ChildTask_PodName); ok { - return x.PodName + if x != nil { + if x, ok := x.ChildTask.(*PipelineTaskDetail_ChildTask_PodName); ok { + return x.PodName + } } return "" } @@ -1723,13 +1673,13 @@ type isPipelineTaskDetail_ChildTask_ChildTask interface { type PipelineTaskDetail_ChildTask_TaskId struct { // System-generated ID of a task. - TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3,oneof"` + TaskId string `protobuf:"bytes,1,opt,name=task_id,proto3,oneof"` } type PipelineTaskDetail_ChildTask_PodName struct { // Name of the corresponding pod assigned by the orchestration engine. // Also known as node_id. - PodName string `protobuf:"bytes,2,opt,name=pod_name,json=podName,proto3,oneof"` + PodName string `protobuf:"bytes,2,opt,name=pod_name,proto3,oneof"` } func (*PipelineTaskDetail_ChildTask_TaskId) isPipelineTaskDetail_ChildTask_ChildTask() {} @@ -1738,433 +1688,178 @@ func (*PipelineTaskDetail_ChildTask_PodName) isPipelineTaskDetail_ChildTask_Chil var File_backend_api_v2beta1_run_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_run_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xcc, 0x09, 0x0a, 0x03, 0x52, 0x75, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, - 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x38, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x2e, 0x53, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x13, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x11, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x3e, 0x0a, 0x0d, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x48, 0x00, 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x80, 0x01, 0x0a, 0x1a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x18, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6b, 0x75, - 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x4a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x53, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x5f, 0x64, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x10, - 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, - 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, - 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x22, 0x4a, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, - 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02, 0x42, 0x11, - 0x0a, 0x0f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x22, 0x6b, 0x0a, 0x18, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x2e, - 0x0a, 0x13, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xc2, - 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4a, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x22, 0xd2, 0x01, 0x0a, 0x0a, 0x52, 0x75, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x11, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x49, 0x64, 0x12, 0x35, 0x0a, 0x17, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, - 0x75, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x14, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x75, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x5d, 0x0a, 0x0c, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x0b, 0x74, 0x61, 0x73, - 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x99, 0x0a, 0x0a, 0x12, 0x50, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, - 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, - 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, - 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x0e, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x4a, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, - 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x28, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x5e, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x61, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, - 0x12, 0x5a, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, - 0x70, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x65, 0x0a, 0x0b, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x6f, - 0x0a, 0x0b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x4a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x70, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x4a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x34, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x51, 0x0a, 0x09, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, - 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x08, 0x70, 0x6f, 0x64, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, - 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x74, 0x61, 0x73, 0x6b, 0x22, 0xd6, 0x01, 0x0a, 0x1a, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6a, 0x6f, 0x62, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x12, 0x31, - 0x0a, 0x15, 0x70, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, - 0x72, 0x65, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, - 0x62, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x6d, 0x61, 0x69, 0x6e, - 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x4d, 0x61, 0x69, 0x6e, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x40, 0x0a, 0x1d, 0x66, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x19, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x50, 0x72, 0x65, 0x43, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, 0x6f, 0x62, 0x73, 0x22, 0x31, 0x0a, - 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x73, - 0x22, 0x7a, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x3d, 0x0a, - 0x03, 0x72, 0x75, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x4f, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, - 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0xc1, 0x01, - 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x22, 0x55, 0x0a, 0x13, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, - 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, - 0x04, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6b, 0x75, - 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x72, 0x75, 0x6e, 0x73, 0x12, 0x1d, - 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, - 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x53, 0x0a, 0x11, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x65, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x13, 0x55, 0x6e, - 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x65, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, - 0x64, 0x22, 0x52, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, - 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x15, - 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x72, 0x75, 0x6e, 0x49, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, - 0x0d, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, - 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, - 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x52, - 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x74, 0x72, 0x79, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0d, 0x65, 0x78, - 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x2a, 0x98, 0x01, 0x0a, 0x0c, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x52, - 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, - 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, - 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, - 0x44, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x04, - 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, - 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x55, - 0x53, 0x45, 0x44, 0x10, 0x08, 0x32, 0xf9, 0x0a, 0x0a, 0x0a, 0x52, 0x75, 0x6e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x75, 0x6e, 0x12, 0x38, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x19, 0x3a, 0x03, 0x72, 0x75, 0x6e, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x06, 0x47, - 0x65, 0x74, 0x52, 0x75, 0x6e, 0x12, 0x35, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x99, - 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x37, 0x2e, 0x6b, 0x75, - 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x0a, 0x41, - 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x12, 0x39, 0x2e, 0x6b, 0x75, 0x62, 0x65, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x25, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, - 0x7d, 0x3a, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x55, 0x6e, - 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, 0x12, 0x3b, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x25, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, - 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x75, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x82, - 0x01, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x12, 0x38, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x23, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x2a, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, - 0x69, 0x64, 0x7d, 0x12, 0xdd, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x12, 0x3b, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, - 0x61, 0x64, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x12, 0x4a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, - 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, - 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, - 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x72, - 0x65, 0x61, 0x64, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x52, 0x75, 0x6e, 0x12, 0x3b, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x27, 0x22, 0x25, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x72, 0x75, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x74, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x52, 0x75, 0x6e, 0x12, 0x37, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, - 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x74, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x21, - 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, - 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x72, 0x65, 0x74, 0x72, - 0x79, 0x42, 0x98, 0x01, 0x92, 0x41, 0x58, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x23, 0x0a, 0x07, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, 0x08, 0x02, - 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x5a, - 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, - 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v2beta1_run_proto_rawDesc = "" + + "\n" + + "\x1dbackend/api/v2beta1/run.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a(backend/api/v2beta1/runtime_config.proto\"\xde\t\n" + + "\x03Run\x12$\n" + + "\rexperiment_id\x18\x01 \x01(\tR\rexperiment_id\x12\x16\n" + + "\x06run_id\x18\x02 \x01(\tR\x06run_id\x12\"\n" + + "\fdisplay_name\x18\x03 \x01(\tR\fdisplay_name\x12^\n" + + "\rstorage_state\x18\x04 \x01(\x0e28.kubeflow.pipelines.backend.api.v2beta1.Run.StorageStateR\rstorage_state\x12 \n" + + "\vdescription\x18\x05 \x01(\tR\vdescription\x126\n" + + "\x13pipeline_version_id\x18\x06 \x01(\tB\x02\x18\x01H\x00R\x13pipeline_version_id\x12?\n" + + "\rpipeline_spec\x18\a \x01(\v2\x17.google.protobuf.StructH\x00R\rpipeline_spec\x12\x82\x01\n" + + "\x1apipeline_version_reference\x18\x12 \x01(\v2@.kubeflow.pipelines.backend.api.v2beta1.PipelineVersionReferenceH\x00R\x1apipeline_version_reference\x12]\n" + + "\x0eruntime_config\x18\b \x01(\v25.kubeflow.pipelines.backend.api.v2beta1.RuntimeConfigR\x0eruntime_config\x12(\n" + + "\x0fservice_account\x18\t \x01(\tR\x0fservice_account\x12:\n" + + "\n" + + "created_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "created_at\x12>\n" + + "\fscheduled_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\fscheduled_at\x12<\n" + + "\vfinished_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\vfinished_at\x12J\n" + + "\x05state\x18\r \x01(\x0e24.kubeflow.pipelines.backend.api.v2beta1.RuntimeStateR\x05state\x12(\n" + + "\x05error\x18\x0e \x01(\v2\x12.google.rpc.StatusR\x05error\x12T\n" + + "\vrun_details\x18\x0f \x01(\v22.kubeflow.pipelines.backend.api.v2beta1.RunDetailsR\vrun_details\x12*\n" + + "\x10recurring_run_id\x18\x10 \x01(\tR\x10recurring_run_id\x12[\n" + + "\rstate_history\x18\x11 \x03(\v25.kubeflow.pipelines.backend.api.v2beta1.RuntimeStatusR\rstate_history\"J\n" + + "\fStorageState\x12\x1d\n" + + "\x19STORAGE_STATE_UNSPECIFIED\x10\x00\x12\r\n" + + "\tAVAILABLE\x10\x01\x12\f\n" + + "\bARCHIVED\x10\x02B\x11\n" + + "\x0fpipeline_source\"n\n" + + "\x18PipelineVersionReference\x12 \n" + + "\vpipeline_id\x18\x01 \x01(\tR\vpipeline_id\x120\n" + + "\x13pipeline_version_id\x18\x02 \x01(\tR\x13pipeline_version_id\"\xc3\x01\n" + + "\rRuntimeStatus\x12<\n" + + "\vupdate_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\vupdate_time\x12J\n" + + "\x05state\x18\x02 \x01(\x0e24.kubeflow.pipelines.backend.api.v2beta1.RuntimeStateR\x05state\x12(\n" + + "\x05error\x18\x03 \x01(\v2\x12.google.rpc.StatusR\x05error\"\xd8\x01\n" + + "\n" + + "RunDetails\x120\n" + + "\x13pipeline_context_id\x18\x01 \x01(\x03R\x13pipeline_context_id\x128\n" + + "\x17pipeline_run_context_id\x18\x02 \x01(\x03R\x17pipeline_run_context_id\x12^\n" + + "\ftask_details\x18\x03 \x03(\v2:.kubeflow.pipelines.backend.api.v2beta1.PipelineTaskDetailR\ftask_details\"\xa8\n" + + "\n" + + "\x12PipelineTaskDetail\x12\x16\n" + + "\x06run_id\x18\x01 \x01(\tR\x06run_id\x12\x18\n" + + "\atask_id\x18\x02 \x01(\tR\atask_id\x12\"\n" + + "\fdisplay_name\x18\x03 \x01(\tR\fdisplay_name\x12<\n" + + "\vcreate_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\vcreate_time\x12:\n" + + "\n" + + "start_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "start_time\x126\n" + + "\bend_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\bend_time\x12l\n" + + "\x0fexecutor_detail\x18\a \x01(\v2B.kubeflow.pipelines.backend.api.v2beta1.PipelineTaskExecutorDetailR\x0fexecutor_detail\x12J\n" + + "\x05state\x18\b \x01(\x0e24.kubeflow.pipelines.backend.api.v2beta1.RuntimeStateR\x05state\x12\"\n" + + "\fexecution_id\x18\t \x01(\x03R\fexecution_id\x12(\n" + + "\x05error\x18\n" + + " \x01(\v2\x12.google.rpc.StatusR\x05error\x12^\n" + + "\x06inputs\x18\v \x03(\v2F.kubeflow.pipelines.backend.api.v2beta1.PipelineTaskDetail.InputsEntryR\x06inputs\x12a\n" + + "\aoutputs\x18\f \x03(\v2G.kubeflow.pipelines.backend.api.v2beta1.PipelineTaskDetail.OutputsEntryR\aoutputs\x12&\n" + + "\x0eparent_task_id\x18\r \x01(\tR\x0eparent_task_id\x12[\n" + + "\rstate_history\x18\x0e \x03(\v25.kubeflow.pipelines.backend.api.v2beta1.RuntimeStatusR\rstate_history\x12\x1a\n" + + "\bpod_name\x18\x0f \x01(\tR\bpod_name\x12f\n" + + "\vchild_tasks\x18\x10 \x03(\v2D.kubeflow.pipelines.backend.api.v2beta1.PipelineTaskDetail.ChildTaskR\vchild_tasks\x1ao\n" + + "\vInputsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12J\n" + + "\x05value\x18\x02 \x01(\v24.kubeflow.pipelines.backend.api.v2beta1.ArtifactListR\x05value:\x028\x01\x1ap\n" + + "\fOutputsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12J\n" + + "\x05value\x18\x02 \x01(\v24.kubeflow.pipelines.backend.api.v2beta1.ArtifactListR\x05value:\x028\x01\x1aS\n" + + "\tChildTask\x12\x1a\n" + + "\atask_id\x18\x01 \x01(\tH\x00R\atask_id\x12\x1c\n" + + "\bpod_name\x18\x02 \x01(\tH\x00R\bpod_nameB\f\n" + + "\n" + + "child_task\"\xe0\x01\n" + + "\x1aPipelineTaskExecutorDetail\x12\x1a\n" + + "\bmain_job\x18\x01 \x01(\tR\bmain_job\x124\n" + + "\x15pre_caching_check_job\x18\x02 \x01(\tR\x15pre_caching_check_job\x12*\n" + + "\x10failed_main_jobs\x18\x03 \x03(\tR\x10failed_main_jobs\x12D\n" + + "\x1dfailed_pre_caching_check_jobs\x18\x04 \x03(\tR\x1dfailed_pre_caching_check_jobs\"2\n" + + "\fArtifactList\x12\"\n" + + "\fartifact_ids\x18\x01 \x03(\x03R\fartifact_ids\"{\n" + + "\x10CreateRunRequest\x12(\n" + + "\rexperiment_id\x18\x01 \x01(\tB\x02\x18\x01R\rexperiment_id\x12=\n" + + "\x03run\x18\x02 \x01(\v2+.kubeflow.pipelines.backend.api.v2beta1.RunR\x03run\"Q\n" + + "\rGetRunRequest\x12(\n" + + "\rexperiment_id\x18\x01 \x01(\tB\x02\x18\x01R\rexperiment_id\x12\x16\n" + + "\x06run_id\x18\x02 \x01(\tR\x06run_id\"\xc5\x01\n" + + "\x0fListRunsRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12$\n" + + "\rexperiment_id\x18\x02 \x01(\tR\rexperiment_id\x12\x1e\n" + + "\n" + + "page_token\x18\x03 \x01(\tR\n" + + "page_token\x12\x1c\n" + + "\tpage_size\x18\x04 \x01(\x05R\tpage_size\x12\x18\n" + + "\asort_by\x18\x05 \x01(\tR\asort_by\x12\x16\n" + + "\x06filter\x18\x06 \x01(\tR\x06filter\"W\n" + + "\x13TerminateRunRequest\x12(\n" + + "\rexperiment_id\x18\x01 \x01(\tB\x02\x18\x01R\rexperiment_id\x12\x16\n" + + "\x06run_id\x18\x02 \x01(\tR\x06run_id\"\x9d\x01\n" + + "\x10ListRunsResponse\x12?\n" + + "\x04runs\x18\x01 \x03(\v2+.kubeflow.pipelines.backend.api.v2beta1.RunR\x04runs\x12\x1e\n" + + "\n" + + "total_size\x18\x02 \x01(\x05R\n" + + "total_size\x12(\n" + + "\x0fnext_page_token\x18\x03 \x01(\tR\x0fnext_page_token\"U\n" + + "\x11ArchiveRunRequest\x12(\n" + + "\rexperiment_id\x18\x01 \x01(\tB\x02\x18\x01R\rexperiment_id\x12\x16\n" + + "\x06run_id\x18\x02 \x01(\tR\x06run_id\"W\n" + + "\x13UnarchiveRunRequest\x12(\n" + + "\rexperiment_id\x18\x01 \x01(\tB\x02\x18\x01R\rexperiment_id\x12\x16\n" + + "\x06run_id\x18\x02 \x01(\tR\x06run_id\"T\n" + + "\x10DeleteRunRequest\x12(\n" + + "\rexperiment_id\x18\x01 \x01(\tB\x02\x18\x01R\rexperiment_id\x12\x16\n" + + "\x06run_id\x18\x02 \x01(\tR\x06run_id\"\x97\x01\n" + + "\x13ReadArtifactRequest\x12(\n" + + "\rexperiment_id\x18\x01 \x01(\tB\x02\x18\x01R\rexperiment_id\x12\x16\n" + + "\x06run_id\x18\x02 \x01(\tR\x06run_id\x12\x18\n" + + "\anode_id\x18\x03 \x01(\tR\anode_id\x12$\n" + + "\rartifact_name\x18\x04 \x01(\tR\rartifact_name\"*\n" + + "\x14ReadArtifactResponse\x12\x12\n" + + "\x04data\x18\x01 \x01(\fR\x04data\"S\n" + + "\x0fRetryRunRequest\x12(\n" + + "\rexperiment_id\x18\x01 \x01(\tB\x02\x18\x01R\rexperiment_id\x12\x16\n" + + "\x06run_id\x18\x02 \x01(\tR\x06run_id*\x98\x01\n" + + "\fRuntimeState\x12\x1d\n" + + "\x19RUNTIME_STATE_UNSPECIFIED\x10\x00\x12\v\n" + + "\aPENDING\x10\x01\x12\v\n" + + "\aRUNNING\x10\x02\x12\r\n" + + "\tSUCCEEDED\x10\x03\x12\v\n" + + "\aSKIPPED\x10\x04\x12\n" + + "\n" + + "\x06FAILED\x10\x05\x12\r\n" + + "\tCANCELING\x10\x06\x12\f\n" + + "\bCANCELED\x10\a\x12\n" + + "\n" + + "\x06PAUSED\x10\b2\xf9\n" + + "\n" + + "\n" + + "RunService\x12\x93\x01\n" + + "\tCreateRun\x128.kubeflow.pipelines.backend.api.v2beta1.CreateRunRequest\x1a+.kubeflow.pipelines.backend.api.v2beta1.Run\"\x1f\x82\xd3\xe4\x93\x02\x19:\x03run\"\x12/apis/v2beta1/runs\x12\x91\x01\n" + + "\x06GetRun\x125.kubeflow.pipelines.backend.api.v2beta1.GetRunRequest\x1a+.kubeflow.pipelines.backend.api.v2beta1.Run\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/apis/v2beta1/runs/{run_id}\x12\x99\x01\n" + + "\bListRuns\x127.kubeflow.pipelines.backend.api.v2beta1.ListRunsRequest\x1a8.kubeflow.pipelines.backend.api.v2beta1.ListRunsResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/apis/v2beta1/runs\x12\x8c\x01\n" + + "\n" + + "ArchiveRun\x129.kubeflow.pipelines.backend.api.v2beta1.ArchiveRunRequest\x1a\x16.google.protobuf.Empty\"+\x82\xd3\xe4\x93\x02%\"#/apis/v2beta1/runs/{run_id}:archive\x12\x92\x01\n" + + "\fUnarchiveRun\x12;.kubeflow.pipelines.backend.api.v2beta1.UnarchiveRunRequest\x1a\x16.google.protobuf.Empty\"-\x82\xd3\xe4\x93\x02'\"%/apis/v2beta1/runs/{run_id}:unarchive\x12\x82\x01\n" + + "\tDeleteRun\x128.kubeflow.pipelines.backend.api.v2beta1.DeleteRunRequest\x1a\x16.google.protobuf.Empty\"#\x82\xd3\xe4\x93\x02\x1d*\x1b/apis/v2beta1/runs/{run_id}\x12\xdd\x01\n" + + "\fReadArtifact\x12;.kubeflow.pipelines.backend.api.v2beta1.ReadArtifactRequest\x1a<.kubeflow.pipelines.backend.api.v2beta1.ReadArtifactResponse\"R\x82\xd3\xe4\x93\x02L\x12J/apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read\x12\x92\x01\n" + + "\fTerminateRun\x12;.kubeflow.pipelines.backend.api.v2beta1.TerminateRunRequest\x1a\x16.google.protobuf.Empty\"-\x82\xd3\xe4\x93\x02'\"%/apis/v2beta1/runs/{run_id}:terminate\x12\x86\x01\n" + + "\bRetryRun\x127.kubeflow.pipelines.backend.api.v2beta1.RetryRunRequest\x1a\x16.google.protobuf.Empty\")\x82\xd3\xe4\x93\x02#\"!/apis/v2beta1/runs/{run_id}:retryB\x98\x01\x92AX*\x02\x01\x02R#\n" + + "\adefault\x12\x18\x12\x16\n" + + "\x14\x1a\x12.google.rpc.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_run_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_run_proto_rawDescData = file_backend_api_v2beta1_run_proto_rawDesc + file_backend_api_v2beta1_run_proto_rawDescData []byte ) func file_backend_api_v2beta1_run_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_run_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_run_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_run_proto_rawDescData) + file_backend_api_v2beta1_run_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_run_proto_rawDesc), len(file_backend_api_v2beta1_run_proto_rawDesc))) }) return file_backend_api_v2beta1_run_proto_rawDescData } var file_backend_api_v2beta1_run_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_backend_api_v2beta1_run_proto_msgTypes = make([]protoimpl.MessageInfo, 21) -var file_backend_api_v2beta1_run_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_run_proto_goTypes = []any{ (RuntimeState)(0), // 0: kubeflow.pipelines.backend.api.v2beta1.RuntimeState (Run_StorageState)(0), // 1: kubeflow.pipelines.backend.api.v2beta1.Run.StorageState (*Run)(nil), // 2: kubeflow.pipelines.backend.api.v2beta1.Run @@ -2255,242 +1950,12 @@ func file_backend_api_v2beta1_run_proto_init() { return } file_backend_api_v2beta1_runtime_config_proto_init() - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_run_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Run); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineVersionReference); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineTaskDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineTaskExecutorDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArtifactList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRunsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TerminateRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRunsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArchiveRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnarchiveRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadArtifactRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadArtifactResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_run_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineTaskDetail_ChildTask); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_backend_api_v2beta1_run_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_backend_api_v2beta1_run_proto_msgTypes[0].OneofWrappers = []any{ (*Run_PipelineVersionId)(nil), (*Run_PipelineSpec)(nil), (*Run_PipelineVersionReference)(nil), } - file_backend_api_v2beta1_run_proto_msgTypes[20].OneofWrappers = []interface{}{ + file_backend_api_v2beta1_run_proto_msgTypes[20].OneofWrappers = []any{ (*PipelineTaskDetail_ChildTask_TaskId)(nil), (*PipelineTaskDetail_ChildTask_PodName)(nil), } @@ -2498,7 +1963,7 @@ func file_backend_api_v2beta1_run_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_run_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_run_proto_rawDesc), len(file_backend_api_v2beta1_run_proto_rawDesc)), NumEnums: 2, NumMessages: 21, NumExtensions: 0, @@ -2510,397 +1975,6 @@ func file_backend_api_v2beta1_run_proto_init() { MessageInfos: file_backend_api_v2beta1_run_proto_msgTypes, }.Build() File_backend_api_v2beta1_run_proto = out.File - file_backend_api_v2beta1_run_proto_rawDesc = nil file_backend_api_v2beta1_run_proto_goTypes = nil file_backend_api_v2beta1_run_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// RunServiceClient is the client API for RunService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RunServiceClient interface { - // Creates a new run in an experiment specified by experiment ID. - // If experiment ID is not specified, the run is created in the default experiment. - CreateRun(ctx context.Context, in *CreateRunRequest, opts ...grpc.CallOption) (*Run, error) - // Finds a specific run by ID. - GetRun(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*Run, error) - // Finds all runs in an experiment given by experiment ID. - // If experiment id is not specified, finds all runs across all experiments. - ListRuns(ctx context.Context, in *ListRunsRequest, opts ...grpc.CallOption) (*ListRunsResponse, error) - // Archives a run in an experiment given by run ID and experiment ID. - ArchiveRun(ctx context.Context, in *ArchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Restores an archived run in an experiment given by run ID and experiment ID. - UnarchiveRun(ctx context.Context, in *UnarchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Deletes a run in an experiment given by run ID and experiment ID. - DeleteRun(ctx context.Context, in *DeleteRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Finds artifact data in a run. - ReadArtifact(ctx context.Context, in *ReadArtifactRequest, opts ...grpc.CallOption) (*ReadArtifactResponse, error) - // Terminates an active run. - TerminateRun(ctx context.Context, in *TerminateRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Re-initiates a failed or terminated run. - RetryRun(ctx context.Context, in *RetryRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type runServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRunServiceClient(cc grpc.ClientConnInterface) RunServiceClient { - return &runServiceClient{cc} -} - -func (c *runServiceClient) CreateRun(ctx context.Context, in *CreateRunRequest, opts ...grpc.CallOption) (*Run, error) { - out := new(Run) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/CreateRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) GetRun(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*Run, error) { - out := new(Run) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/GetRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) ListRuns(ctx context.Context, in *ListRunsRequest, opts ...grpc.CallOption) (*ListRunsResponse, error) { - out := new(ListRunsResponse) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ListRuns", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) ArchiveRun(ctx context.Context, in *ArchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ArchiveRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) UnarchiveRun(ctx context.Context, in *UnarchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/UnarchiveRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) DeleteRun(ctx context.Context, in *DeleteRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/DeleteRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) ReadArtifact(ctx context.Context, in *ReadArtifactRequest, opts ...grpc.CallOption) (*ReadArtifactResponse, error) { - out := new(ReadArtifactResponse) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ReadArtifact", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) TerminateRun(ctx context.Context, in *TerminateRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/TerminateRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runServiceClient) RetryRun(ctx context.Context, in *RetryRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.RunService/RetryRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RunServiceServer is the server API for RunService service. -type RunServiceServer interface { - // Creates a new run in an experiment specified by experiment ID. - // If experiment ID is not specified, the run is created in the default experiment. - CreateRun(context.Context, *CreateRunRequest) (*Run, error) - // Finds a specific run by ID. - GetRun(context.Context, *GetRunRequest) (*Run, error) - // Finds all runs in an experiment given by experiment ID. - // If experiment id is not specified, finds all runs across all experiments. - ListRuns(context.Context, *ListRunsRequest) (*ListRunsResponse, error) - // Archives a run in an experiment given by run ID and experiment ID. - ArchiveRun(context.Context, *ArchiveRunRequest) (*emptypb.Empty, error) - // Restores an archived run in an experiment given by run ID and experiment ID. - UnarchiveRun(context.Context, *UnarchiveRunRequest) (*emptypb.Empty, error) - // Deletes a run in an experiment given by run ID and experiment ID. - DeleteRun(context.Context, *DeleteRunRequest) (*emptypb.Empty, error) - // Finds artifact data in a run. - ReadArtifact(context.Context, *ReadArtifactRequest) (*ReadArtifactResponse, error) - // Terminates an active run. - TerminateRun(context.Context, *TerminateRunRequest) (*emptypb.Empty, error) - // Re-initiates a failed or terminated run. - RetryRun(context.Context, *RetryRunRequest) (*emptypb.Empty, error) -} - -// UnimplementedRunServiceServer can be embedded to have forward compatible implementations. -type UnimplementedRunServiceServer struct { -} - -func (*UnimplementedRunServiceServer) CreateRun(context.Context, *CreateRunRequest) (*Run, error) { - return nil, status1.Errorf(codes.Unimplemented, "method CreateRun not implemented") -} -func (*UnimplementedRunServiceServer) GetRun(context.Context, *GetRunRequest) (*Run, error) { - return nil, status1.Errorf(codes.Unimplemented, "method GetRun not implemented") -} -func (*UnimplementedRunServiceServer) ListRuns(context.Context, *ListRunsRequest) (*ListRunsResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ListRuns not implemented") -} -func (*UnimplementedRunServiceServer) ArchiveRun(context.Context, *ArchiveRunRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ArchiveRun not implemented") -} -func (*UnimplementedRunServiceServer) UnarchiveRun(context.Context, *UnarchiveRunRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method UnarchiveRun not implemented") -} -func (*UnimplementedRunServiceServer) DeleteRun(context.Context, *DeleteRunRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method DeleteRun not implemented") -} -func (*UnimplementedRunServiceServer) ReadArtifact(context.Context, *ReadArtifactRequest) (*ReadArtifactResponse, error) { - return nil, status1.Errorf(codes.Unimplemented, "method ReadArtifact not implemented") -} -func (*UnimplementedRunServiceServer) TerminateRun(context.Context, *TerminateRunRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method TerminateRun not implemented") -} -func (*UnimplementedRunServiceServer) RetryRun(context.Context, *RetryRunRequest) (*emptypb.Empty, error) { - return nil, status1.Errorf(codes.Unimplemented, "method RetryRun not implemented") -} - -func RegisterRunServiceServer(s *grpc.Server, srv RunServiceServer) { - s.RegisterService(&_RunService_serviceDesc, srv) -} - -func _RunService_CreateRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).CreateRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/CreateRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).CreateRun(ctx, req.(*CreateRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_GetRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).GetRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/GetRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).GetRun(ctx, req.(*GetRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_ListRuns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRunsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).ListRuns(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/ListRuns", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).ListRuns(ctx, req.(*ListRunsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_ArchiveRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ArchiveRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).ArchiveRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/ArchiveRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).ArchiveRun(ctx, req.(*ArchiveRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_UnarchiveRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnarchiveRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).UnarchiveRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/UnarchiveRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).UnarchiveRun(ctx, req.(*UnarchiveRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_DeleteRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).DeleteRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/DeleteRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).DeleteRun(ctx, req.(*DeleteRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_ReadArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadArtifactRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).ReadArtifact(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/ReadArtifact", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).ReadArtifact(ctx, req.(*ReadArtifactRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_TerminateRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TerminateRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).TerminateRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/TerminateRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).TerminateRun(ctx, req.(*TerminateRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RunService_RetryRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RetryRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RunServiceServer).RetryRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.RunService/RetryRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RunServiceServer).RetryRun(ctx, req.(*RetryRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RunService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.RunService", - HandlerType: (*RunServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateRun", - Handler: _RunService_CreateRun_Handler, - }, - { - MethodName: "GetRun", - Handler: _RunService_GetRun_Handler, - }, - { - MethodName: "ListRuns", - Handler: _RunService_ListRuns_Handler, - }, - { - MethodName: "ArchiveRun", - Handler: _RunService_ArchiveRun_Handler, - }, - { - MethodName: "UnarchiveRun", - Handler: _RunService_UnarchiveRun_Handler, - }, - { - MethodName: "DeleteRun", - Handler: _RunService_DeleteRun_Handler, - }, - { - MethodName: "ReadArtifact", - Handler: _RunService_ReadArtifact_Handler, - }, - { - MethodName: "TerminateRun", - Handler: _RunService_TerminateRun_Handler, - }, - { - MethodName: "RetryRun", - Handler: _RunService_RetryRun_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/run.proto", -} diff --git a/backend/api/v2beta1/go_client/run.pb.gw.go b/backend/api/v2beta1/go_client/run.pb.gw.go index 03ab8f55763..47787f27e2e 100644 --- a/backend/api/v2beta1/go_client/run.pb.gw.go +++ b/backend/api/v2beta1/go_client/run.pb.gw.go @@ -10,876 +10,695 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - var ( - filter_RunService_CreateRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_RunService_CreateRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRunRequest - var metadata runtime.ServerMetadata +var filter_RunService_CreateRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Run); err != nil && err != io.EOF { +func request_RunService_CreateRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CreateRunRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Run); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_CreateRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreateRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_CreateRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRunRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Run); err != nil && err != io.EOF { + var ( + protoReq CreateRunRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Run); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_CreateRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateRun(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_GetRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_RunService_GetRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_RunService_GetRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_GetRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_GetRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq GetRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_GetRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetRun(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_ListRuns_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_RunService_ListRuns_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_RunService_ListRuns_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListRunsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListRunsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ListRuns_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListRuns(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_ListRuns_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListRunsRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListRunsRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ListRuns_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListRuns(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_ArchiveRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_RunService_ArchiveRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_RunService_ArchiveRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ArchiveRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ArchiveRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ArchiveRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_ArchiveRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ArchiveRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ArchiveRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ArchiveRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ArchiveRun(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_UnarchiveRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_RunService_UnarchiveRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_RunService_UnarchiveRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnarchiveRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UnarchiveRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_UnarchiveRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UnarchiveRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_UnarchiveRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnarchiveRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq UnarchiveRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_UnarchiveRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UnarchiveRun(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_DeleteRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_RunService_DeleteRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_RunService_DeleteRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_DeleteRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_DeleteRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq DeleteRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_DeleteRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteRun(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_ReadArtifact_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0, "node_id": 1, "artifact_name": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} -) +var filter_RunService_ReadArtifact_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0, "node_id": 1, "artifact_name": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} func request_RunService_ReadArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReadArtifactRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ReadArtifactRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - val, ok = pathParams["node_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") } - protoReq.NodeId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) } - val, ok = pathParams["artifact_name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "artifact_name") } - protoReq.ArtifactName, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "artifact_name", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ReadArtifact_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ReadArtifact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_ReadArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReadArtifactRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq ReadArtifactRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - val, ok = pathParams["node_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "node_id") } - protoReq.NodeId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "node_id", err) } - val, ok = pathParams["artifact_name"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "artifact_name") } - protoReq.ArtifactName, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "artifact_name", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_ReadArtifact_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ReadArtifact(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_TerminateRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_RunService_TerminateRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_RunService_TerminateRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TerminateRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq TerminateRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_TerminateRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.TerminateRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_TerminateRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TerminateRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq TerminateRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_TerminateRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.TerminateRun(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RunService_RetryRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_RunService_RetryRun_0 = &utilities.DoubleArray{Encoding: map[string]int{"run_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_RunService_RetryRun_0(ctx context.Context, marshaler runtime.Marshaler, client RunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RetryRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq RetryRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_RetryRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.RetryRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RunService_RetryRun_0(ctx context.Context, marshaler runtime.Marshaler, server RunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RetryRunRequest - var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err + protoReq RetryRunRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["run_id"] + val, ok := pathParams["run_id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "run_id") } - protoReq.RunId, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "run_id", err) } - if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RunService_RetryRun_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.RetryRun(ctx, &protoReq) return msg, metadata, err - } // RegisterRunServiceHandlerServer registers the http handlers for service RunService to "mux". // UnaryRPC :call RunServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRunServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRunServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RunServiceServer) error { - - mux.Handle("POST", pattern_RunService_CreateRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_CreateRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/CreateRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_CreateRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_CreateRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_CreateRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_CreateRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_GetRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_GetRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/GetRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_GetRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_GetRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_GetRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_GetRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_ListRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_ListRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ListRuns", runtime.WithHTTPPathPattern("/apis/v2beta1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_ListRuns_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_ListRuns_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ListRuns_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ListRuns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_ArchiveRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_ArchiveRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ArchiveRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_ArchiveRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_ArchiveRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ArchiveRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ArchiveRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_UnarchiveRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_UnarchiveRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/UnarchiveRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_UnarchiveRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_UnarchiveRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_UnarchiveRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_UnarchiveRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_RunService_DeleteRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RunService_DeleteRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/DeleteRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_DeleteRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_DeleteRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_DeleteRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_DeleteRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_ReadArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_ReadArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ReadArtifact", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_ReadArtifact_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_ReadArtifact_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ReadArtifact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ReadArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_TerminateRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_TerminateRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/TerminateRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}:terminate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_TerminateRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_TerminateRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_TerminateRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_TerminateRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_RetryRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_RetryRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/RetryRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}:retry")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_RunService_RetryRun_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_RunService_RetryRun_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_RetryRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_RetryRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -888,25 +707,24 @@ func RegisterRunServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterRunServiceHandlerFromEndpoint is same as RegisterRunServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRunServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterRunServiceHandler(ctx, mux, conn) } @@ -920,228 +738,184 @@ func RegisterRunServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RunServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RunServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RunServiceClient" to call the correct interceptors. +// "RunServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RunServiceClient) error { - - mux.Handle("POST", pattern_RunService_CreateRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_CreateRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/CreateRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_CreateRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_CreateRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_CreateRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_CreateRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_GetRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_GetRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/GetRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_GetRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_GetRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_GetRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_GetRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_ListRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_ListRuns_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ListRuns", runtime.WithHTTPPathPattern("/apis/v2beta1/runs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ListRuns_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ListRuns_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ListRuns_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ListRuns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_ArchiveRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_ArchiveRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ArchiveRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}:archive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ArchiveRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ArchiveRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ArchiveRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ArchiveRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_UnarchiveRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_UnarchiveRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/UnarchiveRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}:unarchive")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_UnarchiveRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_UnarchiveRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_UnarchiveRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_UnarchiveRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("DELETE", pattern_RunService_DeleteRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_RunService_DeleteRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/DeleteRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_DeleteRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_DeleteRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_DeleteRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_DeleteRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_RunService_ReadArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_RunService_ReadArtifact_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/ReadArtifact", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_ReadArtifact_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_ReadArtifact_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_ReadArtifact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_ReadArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_TerminateRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_TerminateRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/TerminateRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}:terminate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_TerminateRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_TerminateRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_TerminateRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_TerminateRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("POST", pattern_RunService_RetryRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_RunService_RetryRun_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.RunService/RetryRun", runtime.WithHTTPPathPattern("/apis/v2beta1/runs/{run_id}:retry")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_RunService_RetryRun_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_RunService_RetryRun_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_RunService_RetryRun_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_RunService_RetryRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_RunService_CreateRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "runs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_GetRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_ListRuns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "runs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_ArchiveRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "archive", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_UnarchiveRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "unarchive", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_DeleteRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_ReadArtifact_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"apis", "v2beta1", "runs", "run_id", "nodes", "node_id", "artifacts", "artifact_name"}, "read", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_TerminateRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "terminate", runtime.AssumeColonVerbOpt(true))) - - pattern_RunService_RetryRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "retry", runtime.AssumeColonVerbOpt(true))) + pattern_RunService_CreateRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "runs"}, "")) + pattern_RunService_GetRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "")) + pattern_RunService_ListRuns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v2beta1", "runs"}, "")) + pattern_RunService_ArchiveRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "archive")) + pattern_RunService_UnarchiveRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "unarchive")) + pattern_RunService_DeleteRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "")) + pattern_RunService_ReadArtifact_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"apis", "v2beta1", "runs", "run_id", "nodes", "node_id", "artifacts", "artifact_name"}, "read")) + pattern_RunService_TerminateRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "terminate")) + pattern_RunService_RetryRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "runs", "run_id"}, "retry")) ) var ( - forward_RunService_CreateRun_0 = runtime.ForwardResponseMessage - - forward_RunService_GetRun_0 = runtime.ForwardResponseMessage - - forward_RunService_ListRuns_0 = runtime.ForwardResponseMessage - - forward_RunService_ArchiveRun_0 = runtime.ForwardResponseMessage - + forward_RunService_CreateRun_0 = runtime.ForwardResponseMessage + forward_RunService_GetRun_0 = runtime.ForwardResponseMessage + forward_RunService_ListRuns_0 = runtime.ForwardResponseMessage + forward_RunService_ArchiveRun_0 = runtime.ForwardResponseMessage forward_RunService_UnarchiveRun_0 = runtime.ForwardResponseMessage - - forward_RunService_DeleteRun_0 = runtime.ForwardResponseMessage - + forward_RunService_DeleteRun_0 = runtime.ForwardResponseMessage forward_RunService_ReadArtifact_0 = runtime.ForwardResponseMessage - forward_RunService_TerminateRun_0 = runtime.ForwardResponseMessage - - forward_RunService_RetryRun_0 = runtime.ForwardResponseMessage + forward_RunService_RetryRun_0 = runtime.ForwardResponseMessage ) diff --git a/backend/api/v2beta1/go_client/run_grpc.pb.go b/backend/api/v2beta1/go_client/run_grpc.pb.go new file mode 100644 index 00000000000..334fb5bf735 --- /dev/null +++ b/backend/api/v2beta1/go_client/run_grpc.pb.go @@ -0,0 +1,462 @@ +// Copyright 2018 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/run.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RunService_CreateRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/CreateRun" + RunService_GetRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/GetRun" + RunService_ListRuns_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/ListRuns" + RunService_ArchiveRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/ArchiveRun" + RunService_UnarchiveRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/UnarchiveRun" + RunService_DeleteRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/DeleteRun" + RunService_ReadArtifact_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/ReadArtifact" + RunService_TerminateRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/TerminateRun" + RunService_RetryRun_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.RunService/RetryRun" +) + +// RunServiceClient is the client API for RunService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RunServiceClient interface { + // Creates a new run in an experiment specified by experiment ID. + // If experiment ID is not specified, the run is created in the default experiment. + CreateRun(ctx context.Context, in *CreateRunRequest, opts ...grpc.CallOption) (*Run, error) + // Finds a specific run by ID. + GetRun(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*Run, error) + // Finds all runs in an experiment given by experiment ID. + // If experiment id is not specified, finds all runs across all experiments. + ListRuns(ctx context.Context, in *ListRunsRequest, opts ...grpc.CallOption) (*ListRunsResponse, error) + // Archives a run in an experiment given by run ID and experiment ID. + ArchiveRun(ctx context.Context, in *ArchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Restores an archived run in an experiment given by run ID and experiment ID. + UnarchiveRun(ctx context.Context, in *UnarchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deletes a run in an experiment given by run ID and experiment ID. + DeleteRun(ctx context.Context, in *DeleteRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Finds artifact data in a run. + ReadArtifact(ctx context.Context, in *ReadArtifactRequest, opts ...grpc.CallOption) (*ReadArtifactResponse, error) + // Terminates an active run. + TerminateRun(ctx context.Context, in *TerminateRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Re-initiates a failed or terminated run. + RetryRun(ctx context.Context, in *RetryRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type runServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRunServiceClient(cc grpc.ClientConnInterface) RunServiceClient { + return &runServiceClient{cc} +} + +func (c *runServiceClient) CreateRun(ctx context.Context, in *CreateRunRequest, opts ...grpc.CallOption) (*Run, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Run) + err := c.cc.Invoke(ctx, RunService_CreateRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) GetRun(ctx context.Context, in *GetRunRequest, opts ...grpc.CallOption) (*Run, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Run) + err := c.cc.Invoke(ctx, RunService_GetRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) ListRuns(ctx context.Context, in *ListRunsRequest, opts ...grpc.CallOption) (*ListRunsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRunsResponse) + err := c.cc.Invoke(ctx, RunService_ListRuns_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) ArchiveRun(ctx context.Context, in *ArchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_ArchiveRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) UnarchiveRun(ctx context.Context, in *UnarchiveRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_UnarchiveRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) DeleteRun(ctx context.Context, in *DeleteRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_DeleteRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) ReadArtifact(ctx context.Context, in *ReadArtifactRequest, opts ...grpc.CallOption) (*ReadArtifactResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ReadArtifactResponse) + err := c.cc.Invoke(ctx, RunService_ReadArtifact_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) TerminateRun(ctx context.Context, in *TerminateRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_TerminateRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *runServiceClient) RetryRun(ctx context.Context, in *RetryRunRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RunService_RetryRun_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RunServiceServer is the server API for RunService service. +// All implementations must embed UnimplementedRunServiceServer +// for forward compatibility. +type RunServiceServer interface { + // Creates a new run in an experiment specified by experiment ID. + // If experiment ID is not specified, the run is created in the default experiment. + CreateRun(context.Context, *CreateRunRequest) (*Run, error) + // Finds a specific run by ID. + GetRun(context.Context, *GetRunRequest) (*Run, error) + // Finds all runs in an experiment given by experiment ID. + // If experiment id is not specified, finds all runs across all experiments. + ListRuns(context.Context, *ListRunsRequest) (*ListRunsResponse, error) + // Archives a run in an experiment given by run ID and experiment ID. + ArchiveRun(context.Context, *ArchiveRunRequest) (*emptypb.Empty, error) + // Restores an archived run in an experiment given by run ID and experiment ID. + UnarchiveRun(context.Context, *UnarchiveRunRequest) (*emptypb.Empty, error) + // Deletes a run in an experiment given by run ID and experiment ID. + DeleteRun(context.Context, *DeleteRunRequest) (*emptypb.Empty, error) + // Finds artifact data in a run. + ReadArtifact(context.Context, *ReadArtifactRequest) (*ReadArtifactResponse, error) + // Terminates an active run. + TerminateRun(context.Context, *TerminateRunRequest) (*emptypb.Empty, error) + // Re-initiates a failed or terminated run. + RetryRun(context.Context, *RetryRunRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedRunServiceServer() +} + +// UnimplementedRunServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRunServiceServer struct{} + +func (UnimplementedRunServiceServer) CreateRun(context.Context, *CreateRunRequest) (*Run, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRun not implemented") +} +func (UnimplementedRunServiceServer) GetRun(context.Context, *GetRunRequest) (*Run, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRun not implemented") +} +func (UnimplementedRunServiceServer) ListRuns(context.Context, *ListRunsRequest) (*ListRunsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRuns not implemented") +} +func (UnimplementedRunServiceServer) ArchiveRun(context.Context, *ArchiveRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ArchiveRun not implemented") +} +func (UnimplementedRunServiceServer) UnarchiveRun(context.Context, *UnarchiveRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnarchiveRun not implemented") +} +func (UnimplementedRunServiceServer) DeleteRun(context.Context, *DeleteRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRun not implemented") +} +func (UnimplementedRunServiceServer) ReadArtifact(context.Context, *ReadArtifactRequest) (*ReadArtifactResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadArtifact not implemented") +} +func (UnimplementedRunServiceServer) TerminateRun(context.Context, *TerminateRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method TerminateRun not implemented") +} +func (UnimplementedRunServiceServer) RetryRun(context.Context, *RetryRunRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method RetryRun not implemented") +} +func (UnimplementedRunServiceServer) mustEmbedUnimplementedRunServiceServer() {} +func (UnimplementedRunServiceServer) testEmbeddedByValue() {} + +// UnsafeRunServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RunServiceServer will +// result in compilation errors. +type UnsafeRunServiceServer interface { + mustEmbedUnimplementedRunServiceServer() +} + +func RegisterRunServiceServer(s grpc.ServiceRegistrar, srv RunServiceServer) { + // If the following call pancis, it indicates UnimplementedRunServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RunService_ServiceDesc, srv) +} + +func _RunService_CreateRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).CreateRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_CreateRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).CreateRun(ctx, req.(*CreateRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_GetRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).GetRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_GetRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).GetRun(ctx, req.(*GetRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_ListRuns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRunsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).ListRuns(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_ListRuns_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).ListRuns(ctx, req.(*ListRunsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_ArchiveRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ArchiveRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).ArchiveRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_ArchiveRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).ArchiveRun(ctx, req.(*ArchiveRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_UnarchiveRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnarchiveRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).UnarchiveRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_UnarchiveRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).UnarchiveRun(ctx, req.(*UnarchiveRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_DeleteRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).DeleteRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_DeleteRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).DeleteRun(ctx, req.(*DeleteRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_ReadArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadArtifactRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).ReadArtifact(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_ReadArtifact_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).ReadArtifact(ctx, req.(*ReadArtifactRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_TerminateRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TerminateRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).TerminateRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_TerminateRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).TerminateRun(ctx, req.(*TerminateRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RunService_RetryRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RetryRunRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RunServiceServer).RetryRun(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RunService_RetryRun_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RunServiceServer).RetryRun(ctx, req.(*RetryRunRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RunService_ServiceDesc is the grpc.ServiceDesc for RunService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RunService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.RunService", + HandlerType: (*RunServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateRun", + Handler: _RunService_CreateRun_Handler, + }, + { + MethodName: "GetRun", + Handler: _RunService_GetRun_Handler, + }, + { + MethodName: "ListRuns", + Handler: _RunService_ListRuns_Handler, + }, + { + MethodName: "ArchiveRun", + Handler: _RunService_ArchiveRun_Handler, + }, + { + MethodName: "UnarchiveRun", + Handler: _RunService_UnarchiveRun_Handler, + }, + { + MethodName: "DeleteRun", + Handler: _RunService_DeleteRun_Handler, + }, + { + MethodName: "ReadArtifact", + Handler: _RunService_ReadArtifact_Handler, + }, + { + MethodName: "TerminateRun", + Handler: _RunService_TerminateRun_Handler, + }, + { + MethodName: "RetryRun", + Handler: _RunService_RetryRun_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/run.proto", +} diff --git a/backend/api/v2beta1/go_client/runtime_config.pb.go b/backend/api/v2beta1/go_client/runtime_config.pb.go index 327174b7c0d..1855fb1ae80 100644 --- a/backend/api/v2beta1/go_client/runtime_config.pb.go +++ b/backend/api/v2beta1/go_client/runtime_config.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/runtime_config.proto package go_client @@ -26,6 +26,7 @@ import ( structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -37,27 +38,24 @@ const ( // The runtime config. type RuntimeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The runtime parameters of the Pipeline. The parameters will be // used to replace the placeholders at runtime. - Parameters map[string]*structpb.Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Parameters map[string]*structpb.Value `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // A path in a object store bucket which will be treated as the root // output directory of the pipeline. It is used by the system to // generate the paths of output artifacts. // Ref:(https://www.kubeflow.org/docs/components/pipelines/pipeline-root/) - PipelineRoot string `protobuf:"bytes,2,opt,name=pipeline_root,json=pipelineRoot,proto3" json:"pipeline_root,omitempty"` + PipelineRoot string `protobuf:"bytes,2,opt,name=pipeline_root,proto3" json:"pipeline_root,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RuntimeConfig) Reset() { *x = RuntimeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_runtime_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_runtime_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RuntimeConfig) String() string { @@ -68,7 +66,7 @@ func (*RuntimeConfig) ProtoMessage() {} func (x *RuntimeConfig) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_runtime_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -99,50 +97,32 @@ func (x *RuntimeConfig) GetPipelineRoot() string { var File_backend_api_v2beta1_runtime_config_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_runtime_config_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xf2, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x65, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, - 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x1a, 0x55, - 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v2beta1_runtime_config_proto_rawDesc = "" + + "\n" + + "(backend/api/v2beta1/runtime_config.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1cgoogle/protobuf/struct.proto\"\xf3\x01\n" + + "\rRuntimeConfig\x12e\n" + + "\n" + + "parameters\x18\x01 \x03(\v2E.kubeflow.pipelines.backend.api.v2beta1.RuntimeConfig.ParametersEntryR\n" + + "parameters\x12$\n" + + "\rpipeline_root\x18\x02 \x01(\tR\rpipeline_root\x1aU\n" + + "\x0fParametersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01B=Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_runtime_config_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_runtime_config_proto_rawDescData = file_backend_api_v2beta1_runtime_config_proto_rawDesc + file_backend_api_v2beta1_runtime_config_proto_rawDescData []byte ) func file_backend_api_v2beta1_runtime_config_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_runtime_config_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_runtime_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_runtime_config_proto_rawDescData) + file_backend_api_v2beta1_runtime_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_runtime_config_proto_rawDesc), len(file_backend_api_v2beta1_runtime_config_proto_rawDesc))) }) return file_backend_api_v2beta1_runtime_config_proto_rawDescData } var file_backend_api_v2beta1_runtime_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_backend_api_v2beta1_runtime_config_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_runtime_config_proto_goTypes = []any{ (*RuntimeConfig)(nil), // 0: kubeflow.pipelines.backend.api.v2beta1.RuntimeConfig nil, // 1: kubeflow.pipelines.backend.api.v2beta1.RuntimeConfig.ParametersEntry (*structpb.Value)(nil), // 2: google.protobuf.Value @@ -162,25 +142,11 @@ func file_backend_api_v2beta1_runtime_config_proto_init() { if File_backend_api_v2beta1_runtime_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_runtime_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_runtime_config_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_runtime_config_proto_rawDesc), len(file_backend_api_v2beta1_runtime_config_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, @@ -191,7 +157,6 @@ func file_backend_api_v2beta1_runtime_config_proto_init() { MessageInfos: file_backend_api_v2beta1_runtime_config_proto_msgTypes, }.Build() File_backend_api_v2beta1_runtime_config_proto = out.File - file_backend_api_v2beta1_runtime_config_proto_rawDesc = nil file_backend_api_v2beta1_runtime_config_proto_goTypes = nil file_backend_api_v2beta1_runtime_config_proto_depIdxs = nil } diff --git a/backend/api/v2beta1/go_client/visualization.pb.go b/backend/api/v2beta1/go_client/visualization.pb.go index b82350c1249..00a601723b1 100644 --- a/backend/api/v2beta1/go_client/visualization.pb.go +++ b/backend/api/v2beta1/go_client/visualization.pb.go @@ -14,24 +14,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: backend/api/v2beta1/visualization.proto package go_client import ( - context "context" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" - _ "google.golang.org/genproto/googleapis/rpc/status" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -103,21 +99,18 @@ func (Visualization_Type) EnumDescriptor() ([]byte, []int) { // and input data paths. Input dat paths are assumed to be unique and are used // for determining output path. type CreateVisualizationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Visualization *Visualization `protobuf:"bytes,1,opt,name=visualization,proto3" json:"visualization,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` unknownFields protoimpl.UnknownFields - - Visualization *Visualization `protobuf:"bytes,1,opt,name=visualization,proto3" json:"visualization,omitempty"` - Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CreateVisualizationRequest) Reset() { *x = CreateVisualizationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_visualization_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_visualization_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateVisualizationRequest) String() string { @@ -128,7 +121,7 @@ func (*CreateVisualizationRequest) ProtoMessage() {} func (x *CreateVisualizationRequest) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_visualization_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -158,11 +151,8 @@ func (x *CreateVisualizationRequest) GetNamespace() string { } type Visualization struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type Visualization_Type `protobuf:"varint,1,opt,name=type,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.Visualization_Type" json:"type,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Type Visualization_Type `protobuf:"varint,1,opt,name=type,proto3,enum=kubeflow.pipelines.backend.api.v2beta1.Visualization_Type" json:"type,omitempty"` // Path pattern of input data to be used during generation of visualizations. // This is required when creating the pipeline through CreateVisualization // API. @@ -177,16 +167,16 @@ type Visualization struct { // In case any error happens when generating visualizations, only // visualization ID and the error message are returned. Client has the // flexibility of choosing how to handle the error. - Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` + Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Visualization) Reset() { *x = Visualization{} - if protoimpl.UnsafeEnabled { - mi := &file_backend_api_v2beta1_visualization_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_backend_api_v2beta1_visualization_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Visualization) String() string { @@ -197,7 +187,7 @@ func (*Visualization) ProtoMessage() {} func (x *Visualization) ProtoReflect() protoreflect.Message { mi := &file_backend_api_v2beta1_visualization_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -249,87 +239,50 @@ func (x *Visualization) GetError() string { var File_backend_api_v2beta1_visualization_proto protoreflect.FileDescriptor -var file_backend_api_v2beta1_visualization_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x6b, 0x75, 0x62, 0x65, 0x66, - 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, - 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x22, 0x81, 0x02, 0x0a, 0x0d, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, - 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x74, 0x6d, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x74, 0x6d, 0x6c, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x40, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x4f, - 0x43, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x46, 0x44, - 0x56, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x46, 0x4d, 0x41, 0x10, 0x02, 0x12, 0x09, 0x0a, - 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, - 0x4f, 0x4d, 0x10, 0x04, 0x32, 0xec, 0x01, 0x0a, 0x14, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd3, 0x01, - 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, 0x12, 0x42, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x66, 0x6c, - 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6b, 0x75, - 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x3a, 0x0d, 0x76, 0x69, 0x73, 0x75, - 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, - 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x69, 0x73, 0x75, 0x61, 0x6c, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x7d, 0x42, 0x98, 0x01, 0x92, 0x41, 0x58, 0x2a, 0x02, 0x01, 0x02, 0x52, 0x23, 0x0a, - 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x12, 0x16, 0x0a, 0x14, 0x1a, 0x12, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x5a, 0x1f, 0x0a, 0x1d, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x13, - 0x08, 0x02, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, - 0x00, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, - 0x62, 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_backend_api_v2beta1_visualization_proto_rawDesc = "" + + "\n" + + "'backend/api/v2beta1/visualization.proto\x12&kubeflow.pipelines.backend.api.v2beta1\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\x97\x01\n" + + "\x1aCreateVisualizationRequest\x12[\n" + + "\rvisualization\x18\x01 \x01(\v25.kubeflow.pipelines.backend.api.v2beta1.VisualizationR\rvisualization\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\"\x81\x02\n" + + "\rVisualization\x12N\n" + + "\x04type\x18\x01 \x01(\x0e2:.kubeflow.pipelines.backend.api.v2beta1.Visualization.TypeR\x04type\x12\x16\n" + + "\x06source\x18\x02 \x01(\tR\x06source\x12\x1c\n" + + "\targuments\x18\x03 \x01(\tR\targuments\x12\x12\n" + + "\x04html\x18\x04 \x01(\tR\x04html\x12\x14\n" + + "\x05error\x18\x05 \x01(\tR\x05error\"@\n" + + "\x04Type\x12\r\n" + + "\tROC_CURVE\x10\x00\x12\b\n" + + "\x04TFDV\x10\x01\x12\b\n" + + "\x04TFMA\x10\x02\x12\t\n" + + "\x05TABLE\x10\x03\x12\n" + + "\n" + + "\x06CUSTOM\x10\x042\xec\x01\n" + + "\x14VisualizationService\x12\xd3\x01\n" + + "\x15CreateVisualizationV1\x12B.kubeflow.pipelines.backend.api.v2beta1.CreateVisualizationRequest\x1a5.kubeflow.pipelines.backend.api.v2beta1.Visualization\"?\x82\xd3\xe4\x93\x029:\rvisualization\"(/apis/v2beta1/visualizations/{namespace}B\x98\x01\x92AX*\x02\x01\x02R#\n" + + "\adefault\x12\x18\x12\x16\n" + + "\x14\x1a\x12.google.rpc.StatusZ\x1f\n" + + "\x1d\n" + + "\x06Bearer\x12\x13\b\x02\x1a\rauthorization \x02b\f\n" + + "\n" + + "\n" + + "\x06Bearer\x12\x00Z;github.com/kubeflow/pipelines/backend/api/v2beta1/go_clientb\x06proto3" var ( file_backend_api_v2beta1_visualization_proto_rawDescOnce sync.Once - file_backend_api_v2beta1_visualization_proto_rawDescData = file_backend_api_v2beta1_visualization_proto_rawDesc + file_backend_api_v2beta1_visualization_proto_rawDescData []byte ) func file_backend_api_v2beta1_visualization_proto_rawDescGZIP() []byte { file_backend_api_v2beta1_visualization_proto_rawDescOnce.Do(func() { - file_backend_api_v2beta1_visualization_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_api_v2beta1_visualization_proto_rawDescData) + file_backend_api_v2beta1_visualization_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_visualization_proto_rawDesc), len(file_backend_api_v2beta1_visualization_proto_rawDesc))) }) return file_backend_api_v2beta1_visualization_proto_rawDescData } var file_backend_api_v2beta1_visualization_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_backend_api_v2beta1_visualization_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_backend_api_v2beta1_visualization_proto_goTypes = []interface{}{ +var file_backend_api_v2beta1_visualization_proto_goTypes = []any{ (Visualization_Type)(0), // 0: kubeflow.pipelines.backend.api.v2beta1.Visualization.Type (*CreateVisualizationRequest)(nil), // 1: kubeflow.pipelines.backend.api.v2beta1.CreateVisualizationRequest (*Visualization)(nil), // 2: kubeflow.pipelines.backend.api.v2beta1.Visualization @@ -351,37 +304,11 @@ func file_backend_api_v2beta1_visualization_proto_init() { if File_backend_api_v2beta1_visualization_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_backend_api_v2beta1_visualization_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateVisualizationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_backend_api_v2beta1_visualization_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Visualization); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_backend_api_v2beta1_visualization_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_backend_api_v2beta1_visualization_proto_rawDesc), len(file_backend_api_v2beta1_visualization_proto_rawDesc)), NumEnums: 1, NumMessages: 2, NumExtensions: 0, @@ -393,87 +320,6 @@ func file_backend_api_v2beta1_visualization_proto_init() { MessageInfos: file_backend_api_v2beta1_visualization_proto_msgTypes, }.Build() File_backend_api_v2beta1_visualization_proto = out.File - file_backend_api_v2beta1_visualization_proto_rawDesc = nil file_backend_api_v2beta1_visualization_proto_goTypes = nil file_backend_api_v2beta1_visualization_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// VisualizationServiceClient is the client API for VisualizationService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type VisualizationServiceClient interface { - CreateVisualizationV1(ctx context.Context, in *CreateVisualizationRequest, opts ...grpc.CallOption) (*Visualization, error) -} - -type visualizationServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewVisualizationServiceClient(cc grpc.ClientConnInterface) VisualizationServiceClient { - return &visualizationServiceClient{cc} -} - -func (c *visualizationServiceClient) CreateVisualizationV1(ctx context.Context, in *CreateVisualizationRequest, opts ...grpc.CallOption) (*Visualization, error) { - out := new(Visualization) - err := c.cc.Invoke(ctx, "/kubeflow.pipelines.backend.api.v2beta1.VisualizationService/CreateVisualizationV1", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// VisualizationServiceServer is the server API for VisualizationService service. -type VisualizationServiceServer interface { - CreateVisualizationV1(context.Context, *CreateVisualizationRequest) (*Visualization, error) -} - -// UnimplementedVisualizationServiceServer can be embedded to have forward compatible implementations. -type UnimplementedVisualizationServiceServer struct { -} - -func (*UnimplementedVisualizationServiceServer) CreateVisualizationV1(context.Context, *CreateVisualizationRequest) (*Visualization, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateVisualizationV1 not implemented") -} - -func RegisterVisualizationServiceServer(s *grpc.Server, srv VisualizationServiceServer) { - s.RegisterService(&_VisualizationService_serviceDesc, srv) -} - -func _VisualizationService_CreateVisualizationV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateVisualizationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VisualizationServiceServer).CreateVisualizationV1(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kubeflow.pipelines.backend.api.v2beta1.VisualizationService/CreateVisualizationV1", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VisualizationServiceServer).CreateVisualizationV1(ctx, req.(*CreateVisualizationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _VisualizationService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "kubeflow.pipelines.backend.api.v2beta1.VisualizationService", - HandlerType: (*VisualizationServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateVisualizationV1", - Handler: _VisualizationService_CreateVisualizationV1_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "backend/api/v2beta1/visualization.proto", -} diff --git a/backend/api/v2beta1/go_client/visualization.pb.gw.go b/backend/api/v2beta1/go_client/visualization.pb.gw.go index 178660b4af2..aa8ddc90e2b 100644 --- a/backend/api/v2beta1/go_client/visualization.pb.gw.go +++ b/backend/api/v2beta1/go_client/visualization.pb.gw.go @@ -10,126 +10,101 @@ package go_client import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_VisualizationService_CreateVisualizationV1_0(ctx context.Context, marshaler runtime.Marshaler, client VisualizationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateVisualizationRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Visualization); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq CreateVisualizationRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["namespace"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Visualization); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } - protoReq.Namespace, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } - msg, err := client.CreateVisualizationV1(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_VisualizationService_CreateVisualizationV1_0(ctx context.Context, marshaler runtime.Marshaler, server VisualizationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateVisualizationRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Visualization); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - var ( - val string - ok bool - err error - _ = err + protoReq CreateVisualizationRequest + metadata runtime.ServerMetadata + err error ) - - val, ok = pathParams["namespace"] + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Visualization); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["namespace"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace") } - protoReq.Namespace, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err) } - msg, err := server.CreateVisualizationV1(ctx, &protoReq) return msg, metadata, err - } // RegisterVisualizationServiceHandlerServer registers the http handlers for service VisualizationService to "mux". // UnaryRPC :call VisualizationServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVisualizationServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterVisualizationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VisualizationServiceServer) error { - - mux.Handle("POST", pattern_VisualizationService_CreateVisualizationV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_VisualizationService_CreateVisualizationV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.VisualizationService/CreateVisualizationV1", runtime.WithHTTPPathPattern("/apis/v2beta1/visualizations/{namespace}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_VisualizationService_CreateVisualizationV1_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_VisualizationService_CreateVisualizationV1_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_VisualizationService_CreateVisualizationV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_VisualizationService_CreateVisualizationV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -138,25 +113,24 @@ func RegisterVisualizationServiceHandlerServer(ctx context.Context, mux *runtime // RegisterVisualizationServiceHandlerFromEndpoint is same as RegisterVisualizationServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterVisualizationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(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) + grpclog.Errorf("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) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterVisualizationServiceHandler(ctx, mux, conn) } @@ -170,34 +144,30 @@ func RegisterVisualizationServiceHandler(ctx context.Context, mux *runtime.Serve // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VisualizationServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VisualizationServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "VisualizationServiceClient" to call the correct interceptors. +// "VisualizationServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterVisualizationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VisualizationServiceClient) error { - - mux.Handle("POST", pattern_VisualizationService_CreateVisualizationV1_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_VisualizationService_CreateVisualizationV1_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/kubeflow.pipelines.backend.api.v2beta1.VisualizationService/CreateVisualizationV1", runtime.WithHTTPPathPattern("/apis/v2beta1/visualizations/{namespace}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_VisualizationService_CreateVisualizationV1_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_VisualizationService_CreateVisualizationV1_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_VisualizationService_CreateVisualizationV1_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_VisualizationService_CreateVisualizationV1_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_VisualizationService_CreateVisualizationV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "visualizations", "namespace"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_VisualizationService_CreateVisualizationV1_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v2beta1", "visualizations", "namespace"}, "")) ) var ( diff --git a/backend/api/v2beta1/go_client/visualization_grpc.pb.go b/backend/api/v2beta1/go_client/visualization_grpc.pb.go new file mode 100644 index 00000000000..d79a7a0a30e --- /dev/null +++ b/backend/api/v2beta1/go_client/visualization_grpc.pb.go @@ -0,0 +1,135 @@ +// Copyright 2023 The Kubeflow Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.31.1 +// source: backend/api/v2beta1/visualization.proto + +package go_client + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + VisualizationService_CreateVisualizationV1_FullMethodName = "/kubeflow.pipelines.backend.api.v2beta1.VisualizationService/CreateVisualizationV1" +) + +// VisualizationServiceClient is the client API for VisualizationService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type VisualizationServiceClient interface { + CreateVisualizationV1(ctx context.Context, in *CreateVisualizationRequest, opts ...grpc.CallOption) (*Visualization, error) +} + +type visualizationServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewVisualizationServiceClient(cc grpc.ClientConnInterface) VisualizationServiceClient { + return &visualizationServiceClient{cc} +} + +func (c *visualizationServiceClient) CreateVisualizationV1(ctx context.Context, in *CreateVisualizationRequest, opts ...grpc.CallOption) (*Visualization, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Visualization) + err := c.cc.Invoke(ctx, VisualizationService_CreateVisualizationV1_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VisualizationServiceServer is the server API for VisualizationService service. +// All implementations must embed UnimplementedVisualizationServiceServer +// for forward compatibility. +type VisualizationServiceServer interface { + CreateVisualizationV1(context.Context, *CreateVisualizationRequest) (*Visualization, error) + mustEmbedUnimplementedVisualizationServiceServer() +} + +// UnimplementedVisualizationServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedVisualizationServiceServer struct{} + +func (UnimplementedVisualizationServiceServer) CreateVisualizationV1(context.Context, *CreateVisualizationRequest) (*Visualization, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateVisualizationV1 not implemented") +} +func (UnimplementedVisualizationServiceServer) mustEmbedUnimplementedVisualizationServiceServer() {} +func (UnimplementedVisualizationServiceServer) testEmbeddedByValue() {} + +// UnsafeVisualizationServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to VisualizationServiceServer will +// result in compilation errors. +type UnsafeVisualizationServiceServer interface { + mustEmbedUnimplementedVisualizationServiceServer() +} + +func RegisterVisualizationServiceServer(s grpc.ServiceRegistrar, srv VisualizationServiceServer) { + // If the following call pancis, it indicates UnimplementedVisualizationServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&VisualizationService_ServiceDesc, srv) +} + +func _VisualizationService_CreateVisualizationV1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateVisualizationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VisualizationServiceServer).CreateVisualizationV1(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VisualizationService_CreateVisualizationV1_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VisualizationServiceServer).CreateVisualizationV1(ctx, req.(*CreateVisualizationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// VisualizationService_ServiceDesc is the grpc.ServiceDesc for VisualizationService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var VisualizationService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kubeflow.pipelines.backend.api.v2beta1.VisualizationService", + HandlerType: (*VisualizationServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateVisualizationV1", + Handler: _VisualizationService_CreateVisualizationV1_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "backend/api/v2beta1/visualization.proto", +} diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_client.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_client.go index 86641fdf126..5039c046829 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_client.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_client.go @@ -8,8 +8,7 @@ package experiment_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_client/experiment_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Experiment cli := new(Experiment) cli.Transport = transport - cli.ExperimentService = experiment_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Experiment is a client for experiment type Experiment struct { - ExperimentService *experiment_service.Client + ExperimentService experiment_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Experiment struct { // SetTransport changes the transport on the client and all its subresources func (c *Experiment) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.ExperimentService.SetTransport(transport) - } diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_parameters.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_parameters.go index 07435754939..2450bfcd789 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_parameters.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewExperimentServiceArchiveExperimentParams creates a new ExperimentServiceArchiveExperimentParams object -// with the default values initialized. +// NewExperimentServiceArchiveExperimentParams creates a new ExperimentServiceArchiveExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceArchiveExperimentParams() *ExperimentServiceArchiveExperimentParams { - var () return &ExperimentServiceArchiveExperimentParams{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceArchiveExperimentParamsWithTimeout creates a new ExperimentServiceArchiveExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceArchiveExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceArchiveExperimentParams { - var () return &ExperimentServiceArchiveExperimentParams{ - timeout: timeout, } } // NewExperimentServiceArchiveExperimentParamsWithContext creates a new ExperimentServiceArchiveExperimentParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceArchiveExperimentParamsWithContext(ctx context.Context) *ExperimentServiceArchiveExperimentParams { - var () return &ExperimentServiceArchiveExperimentParams{ - Context: ctx, } } // NewExperimentServiceArchiveExperimentParamsWithHTTPClient creates a new ExperimentServiceArchiveExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceArchiveExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceArchiveExperimentParams { - var () return &ExperimentServiceArchiveExperimentParams{ HTTPClient: client, } } -/*ExperimentServiceArchiveExperimentParams contains all the parameters to send to the API endpoint -for the experiment service archive experiment operation typically these are written to a http.Request +/* +ExperimentServiceArchiveExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service archive experiment operation. + + Typically these are written to a http.Request. */ type ExperimentServiceArchiveExperimentParams struct { - /*ExperimentID - The ID of the experiment to be archived. + /* ExperimentID. + The ID of the experiment to be archived. */ ExperimentID string @@ -72,6 +72,21 @@ type ExperimentServiceArchiveExperimentParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service archive experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceArchiveExperimentParams) WithDefaults() *ExperimentServiceArchiveExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service archive experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceArchiveExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service archive experiment params func (o *ExperimentServiceArchiveExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceArchiveExperimentParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_responses.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_responses.go index d0e4155fd99..263528aae90 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_responses.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_archive_experiment_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" ) // ExperimentServiceArchiveExperimentReader is a Reader for the ExperimentServiceArchiveExperiment structure. @@ -24,14 +24,12 @@ type ExperimentServiceArchiveExperimentReader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceArchiveExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceArchiveExperimentOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceArchiveExperimentDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceArchiveExperimentOK() *ExperimentServiceArchiveExperime return &ExperimentServiceArchiveExperimentOK{} } -/*ExperimentServiceArchiveExperimentOK handles this case with default header values. +/* +ExperimentServiceArchiveExperimentOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceArchiveExperimentOK struct { Payload interface{} } +// IsSuccess returns true when this experiment service archive experiment o k response has a 2xx status code +func (o *ExperimentServiceArchiveExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service archive experiment o k response has a 3xx status code +func (o *ExperimentServiceArchiveExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service archive experiment o k response has a 4xx status code +func (o *ExperimentServiceArchiveExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service archive experiment o k response has a 5xx status code +func (o *ExperimentServiceArchiveExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service archive experiment o k response a status code equal to that given +func (o *ExperimentServiceArchiveExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service archive experiment o k response +func (o *ExperimentServiceArchiveExperimentOK) Code() int { + return 200 +} + func (o *ExperimentServiceArchiveExperimentOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:archive][%d] experimentServiceArchiveExperimentOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:archive][%d] experimentServiceArchiveExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceArchiveExperimentOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:archive][%d] experimentServiceArchiveExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceArchiveExperimentOK) GetPayload() interface{} { + return o.Payload } func (o *ExperimentServiceArchiveExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewExperimentServiceArchiveExperimentDefault(code int) *ExperimentServiceAr } } -/*ExperimentServiceArchiveExperimentDefault handles this case with default header values. +/* +ExperimentServiceArchiveExperimentDefault describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceArchiveExperimentDefault struct { _statusCode int - Payload *experiment_model.RuntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service archive experiment default response has a 2xx status code +func (o *ExperimentServiceArchiveExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service archive experiment default response has a 3xx status code +func (o *ExperimentServiceArchiveExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service archive experiment default response has a 4xx status code +func (o *ExperimentServiceArchiveExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service archive experiment default response has a 5xx status code +func (o *ExperimentServiceArchiveExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service archive experiment default response a status code equal to that given +func (o *ExperimentServiceArchiveExperimentDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service archive experiment default response @@ -94,12 +159,22 @@ func (o *ExperimentServiceArchiveExperimentDefault) Code() int { } func (o *ExperimentServiceArchiveExperimentDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:archive][%d] ExperimentService_ArchiveExperiment default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:archive][%d] ExperimentService_ArchiveExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceArchiveExperimentDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:archive][%d] ExperimentService_ArchiveExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceArchiveExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceArchiveExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.RuntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_client.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_client.go index a8e10b88934..a77a67330b4 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_client.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_client.go @@ -7,15 +7,40 @@ package experiment_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new experiment service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new experiment service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new experiment service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for experiment service API */ @@ -24,16 +49,35 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + ExperimentServiceArchiveExperiment(params *ExperimentServiceArchiveExperimentParams, opts ...ClientOption) (*ExperimentServiceArchiveExperimentOK, error) + + ExperimentServiceCreateExperiment(params *ExperimentServiceCreateExperimentParams, opts ...ClientOption) (*ExperimentServiceCreateExperimentOK, error) + + ExperimentServiceDeleteExperiment(params *ExperimentServiceDeleteExperimentParams, opts ...ClientOption) (*ExperimentServiceDeleteExperimentOK, error) + + ExperimentServiceGetExperiment(params *ExperimentServiceGetExperimentParams, opts ...ClientOption) (*ExperimentServiceGetExperimentOK, error) + + ExperimentServiceListExperiments(params *ExperimentServiceListExperimentsParams, opts ...ClientOption) (*ExperimentServiceListExperimentsOK, error) + + ExperimentServiceUnarchiveExperiment(params *ExperimentServiceUnarchiveExperimentParams, opts ...ClientOption) (*ExperimentServiceUnarchiveExperimentOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* ExperimentServiceArchiveExperiment archives an experiment and the experiment s runs and recurring runs */ -func (a *Client) ExperimentServiceArchiveExperiment(params *ExperimentServiceArchiveExperimentParams) (*ExperimentServiceArchiveExperimentOK, error) { +func (a *Client) ExperimentServiceArchiveExperiment(params *ExperimentServiceArchiveExperimentParams, opts ...ClientOption) (*ExperimentServiceArchiveExperimentOK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceArchiveExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_ArchiveExperiment", Method: "POST", PathPattern: "/apis/v2beta1/experiments/{experiment_id}:archive", @@ -44,24 +88,33 @@ func (a *Client) ExperimentServiceArchiveExperiment(params *ExperimentServiceArc Reader: &ExperimentServiceArchiveExperimentReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceArchiveExperimentOK), nil - + success, ok := result.(*ExperimentServiceArchiveExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceArchiveExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceCreateExperiment creates a new experiment */ -func (a *Client) ExperimentServiceCreateExperiment(params *ExperimentServiceCreateExperimentParams) (*ExperimentServiceCreateExperimentOK, error) { +func (a *Client) ExperimentServiceCreateExperiment(params *ExperimentServiceCreateExperimentParams, opts ...ClientOption) (*ExperimentServiceCreateExperimentOK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceCreateExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_CreateExperiment", Method: "POST", PathPattern: "/apis/v2beta1/experiments", @@ -72,24 +125,33 @@ func (a *Client) ExperimentServiceCreateExperiment(params *ExperimentServiceCrea Reader: &ExperimentServiceCreateExperimentReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceCreateExperimentOK), nil - + success, ok := result.(*ExperimentServiceCreateExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceCreateExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceDeleteExperiment deletes an experiment without deleting the experiment s runs and recurring runs to avoid unexpected behaviors delete an experiment s runs and recurring runs before deleting the experiment */ -func (a *Client) ExperimentServiceDeleteExperiment(params *ExperimentServiceDeleteExperimentParams) (*ExperimentServiceDeleteExperimentOK, error) { +func (a *Client) ExperimentServiceDeleteExperiment(params *ExperimentServiceDeleteExperimentParams, opts ...ClientOption) (*ExperimentServiceDeleteExperimentOK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceDeleteExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_DeleteExperiment", Method: "DELETE", PathPattern: "/apis/v2beta1/experiments/{experiment_id}", @@ -100,24 +162,33 @@ func (a *Client) ExperimentServiceDeleteExperiment(params *ExperimentServiceDele Reader: &ExperimentServiceDeleteExperimentReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceDeleteExperimentOK), nil - + success, ok := result.(*ExperimentServiceDeleteExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceDeleteExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceGetExperiment finds a specific experiment by ID */ -func (a *Client) ExperimentServiceGetExperiment(params *ExperimentServiceGetExperimentParams) (*ExperimentServiceGetExperimentOK, error) { +func (a *Client) ExperimentServiceGetExperiment(params *ExperimentServiceGetExperimentParams, opts ...ClientOption) (*ExperimentServiceGetExperimentOK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceGetExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_GetExperiment", Method: "GET", PathPattern: "/apis/v2beta1/experiments/{experiment_id}", @@ -128,24 +199,33 @@ func (a *Client) ExperimentServiceGetExperiment(params *ExperimentServiceGetExpe Reader: &ExperimentServiceGetExperimentReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceGetExperimentOK), nil - + success, ok := result.(*ExperimentServiceGetExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceGetExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceListExperiments finds all experiments supports pagination and sorting on certain fields */ -func (a *Client) ExperimentServiceListExperiments(params *ExperimentServiceListExperimentsParams) (*ExperimentServiceListExperimentsOK, error) { +func (a *Client) ExperimentServiceListExperiments(params *ExperimentServiceListExperimentsParams, opts ...ClientOption) (*ExperimentServiceListExperimentsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceListExperimentsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_ListExperiments", Method: "GET", PathPattern: "/apis/v2beta1/experiments", @@ -156,24 +236,33 @@ func (a *Client) ExperimentServiceListExperiments(params *ExperimentServiceListE Reader: &ExperimentServiceListExperimentsReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceListExperimentsOK), nil - + success, ok := result.(*ExperimentServiceListExperimentsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceListExperimentsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* ExperimentServiceUnarchiveExperiment restores an archived experiment the experiment s archived runs and recurring runs will stay archived */ -func (a *Client) ExperimentServiceUnarchiveExperiment(params *ExperimentServiceUnarchiveExperimentParams) (*ExperimentServiceUnarchiveExperimentOK, error) { +func (a *Client) ExperimentServiceUnarchiveExperiment(params *ExperimentServiceUnarchiveExperimentParams, opts ...ClientOption) (*ExperimentServiceUnarchiveExperimentOK, error) { // TODO: Validate the params before sending if params == nil { params = NewExperimentServiceUnarchiveExperimentParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "ExperimentService_UnarchiveExperiment", Method: "POST", PathPattern: "/apis/v2beta1/experiments/{experiment_id}:unarchive", @@ -184,12 +273,22 @@ func (a *Client) ExperimentServiceUnarchiveExperiment(params *ExperimentServiceU Reader: &ExperimentServiceUnarchiveExperimentReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*ExperimentServiceUnarchiveExperimentOK), nil - + success, ok := result.(*ExperimentServiceUnarchiveExperimentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ExperimentServiceUnarchiveExperimentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_parameters.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_parameters.go index 1b9bcbff38a..090caa7fab3 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_parameters.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_parameters.go @@ -13,67 +13,82 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" ) -// NewExperimentServiceCreateExperimentParams creates a new ExperimentServiceCreateExperimentParams object -// with the default values initialized. +// NewExperimentServiceCreateExperimentParams creates a new ExperimentServiceCreateExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceCreateExperimentParams() *ExperimentServiceCreateExperimentParams { - var () return &ExperimentServiceCreateExperimentParams{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceCreateExperimentParamsWithTimeout creates a new ExperimentServiceCreateExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceCreateExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceCreateExperimentParams { - var () return &ExperimentServiceCreateExperimentParams{ - timeout: timeout, } } // NewExperimentServiceCreateExperimentParamsWithContext creates a new ExperimentServiceCreateExperimentParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceCreateExperimentParamsWithContext(ctx context.Context) *ExperimentServiceCreateExperimentParams { - var () return &ExperimentServiceCreateExperimentParams{ - Context: ctx, } } // NewExperimentServiceCreateExperimentParamsWithHTTPClient creates a new ExperimentServiceCreateExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceCreateExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceCreateExperimentParams { - var () return &ExperimentServiceCreateExperimentParams{ HTTPClient: client, } } -/*ExperimentServiceCreateExperimentParams contains all the parameters to send to the API endpoint -for the experiment service create experiment operation typically these are written to a http.Request +/* +ExperimentServiceCreateExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service create experiment operation. + + Typically these are written to a http.Request. */ type ExperimentServiceCreateExperimentParams struct { - /*Body - The experiment to be created. + /* Experiment. + The experiment to be created. */ - Body *experiment_model.V2beta1Experiment + Experiment *experiment_model.V2beta1Experiment timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service create experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceCreateExperimentParams) WithDefaults() *ExperimentServiceCreateExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service create experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceCreateExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service create experiment params func (o *ExperimentServiceCreateExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceCreateExperimentParams { o.SetTimeout(timeout) @@ -107,15 +122,15 @@ func (o *ExperimentServiceCreateExperimentParams) SetHTTPClient(client *http.Cli o.HTTPClient = client } -// WithBody adds the body to the experiment service create experiment params -func (o *ExperimentServiceCreateExperimentParams) WithBody(body *experiment_model.V2beta1Experiment) *ExperimentServiceCreateExperimentParams { - o.SetBody(body) +// WithExperiment adds the experiment to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) WithExperiment(experiment *experiment_model.V2beta1Experiment) *ExperimentServiceCreateExperimentParams { + o.SetExperiment(experiment) return o } -// SetBody adds the body to the experiment service create experiment params -func (o *ExperimentServiceCreateExperimentParams) SetBody(body *experiment_model.V2beta1Experiment) { - o.Body = body +// SetExperiment adds the experiment to the experiment service create experiment params +func (o *ExperimentServiceCreateExperimentParams) SetExperiment(experiment *experiment_model.V2beta1Experiment) { + o.Experiment = experiment } // WriteToRequest writes these params to a swagger request @@ -125,9 +140,8 @@ func (o *ExperimentServiceCreateExperimentParams) WriteToRequest(r runtime.Clien return err } var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { + if o.Experiment != nil { + if err := r.SetBodyParam(o.Experiment); err != nil { return err } } diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_responses.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_responses.go index 1a990faff53..019fb7266d2 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_responses.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_create_experiment_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" ) // ExperimentServiceCreateExperimentReader is a Reader for the ExperimentServiceCreateExperiment structure. @@ -24,14 +24,12 @@ type ExperimentServiceCreateExperimentReader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceCreateExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceCreateExperimentOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceCreateExperimentDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceCreateExperimentOK() *ExperimentServiceCreateExperiment return &ExperimentServiceCreateExperimentOK{} } -/*ExperimentServiceCreateExperimentOK handles this case with default header values. +/* +ExperimentServiceCreateExperimentOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceCreateExperimentOK struct { Payload *experiment_model.V2beta1Experiment } +// IsSuccess returns true when this experiment service create experiment o k response has a 2xx status code +func (o *ExperimentServiceCreateExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service create experiment o k response has a 3xx status code +func (o *ExperimentServiceCreateExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service create experiment o k response has a 4xx status code +func (o *ExperimentServiceCreateExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service create experiment o k response has a 5xx status code +func (o *ExperimentServiceCreateExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service create experiment o k response a status code equal to that given +func (o *ExperimentServiceCreateExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service create experiment o k response +func (o *ExperimentServiceCreateExperimentOK) Code() int { + return 200 +} + func (o *ExperimentServiceCreateExperimentOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/experiments][%d] experimentServiceCreateExperimentOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments][%d] experimentServiceCreateExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceCreateExperimentOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments][%d] experimentServiceCreateExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceCreateExperimentOK) GetPayload() *experiment_model.V2beta1Experiment { + return o.Payload } func (o *ExperimentServiceCreateExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewExperimentServiceCreateExperimentDefault(code int) *ExperimentServiceCre } } -/*ExperimentServiceCreateExperimentDefault handles this case with default header values. +/* +ExperimentServiceCreateExperimentDefault describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceCreateExperimentDefault struct { _statusCode int - Payload *experiment_model.RuntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service create experiment default response has a 2xx status code +func (o *ExperimentServiceCreateExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service create experiment default response has a 3xx status code +func (o *ExperimentServiceCreateExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service create experiment default response has a 4xx status code +func (o *ExperimentServiceCreateExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service create experiment default response has a 5xx status code +func (o *ExperimentServiceCreateExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service create experiment default response a status code equal to that given +func (o *ExperimentServiceCreateExperimentDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service create experiment default response @@ -96,12 +161,22 @@ func (o *ExperimentServiceCreateExperimentDefault) Code() int { } func (o *ExperimentServiceCreateExperimentDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/experiments][%d] ExperimentService_CreateExperiment default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments][%d] ExperimentService_CreateExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceCreateExperimentDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments][%d] ExperimentService_CreateExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceCreateExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceCreateExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.RuntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_parameters.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_parameters.go index 1a59065c1cc..aa1344a5829 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_parameters.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewExperimentServiceDeleteExperimentParams creates a new ExperimentServiceDeleteExperimentParams object -// with the default values initialized. +// NewExperimentServiceDeleteExperimentParams creates a new ExperimentServiceDeleteExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceDeleteExperimentParams() *ExperimentServiceDeleteExperimentParams { - var () return &ExperimentServiceDeleteExperimentParams{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceDeleteExperimentParamsWithTimeout creates a new ExperimentServiceDeleteExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceDeleteExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceDeleteExperimentParams { - var () return &ExperimentServiceDeleteExperimentParams{ - timeout: timeout, } } // NewExperimentServiceDeleteExperimentParamsWithContext creates a new ExperimentServiceDeleteExperimentParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceDeleteExperimentParamsWithContext(ctx context.Context) *ExperimentServiceDeleteExperimentParams { - var () return &ExperimentServiceDeleteExperimentParams{ - Context: ctx, } } // NewExperimentServiceDeleteExperimentParamsWithHTTPClient creates a new ExperimentServiceDeleteExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceDeleteExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceDeleteExperimentParams { - var () return &ExperimentServiceDeleteExperimentParams{ HTTPClient: client, } } -/*ExperimentServiceDeleteExperimentParams contains all the parameters to send to the API endpoint -for the experiment service delete experiment operation typically these are written to a http.Request +/* +ExperimentServiceDeleteExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service delete experiment operation. + + Typically these are written to a http.Request. */ type ExperimentServiceDeleteExperimentParams struct { - /*ExperimentID - The ID of the experiment to be deleted. + /* ExperimentID. + The ID of the experiment to be deleted. */ ExperimentID string @@ -72,6 +72,21 @@ type ExperimentServiceDeleteExperimentParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service delete experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceDeleteExperimentParams) WithDefaults() *ExperimentServiceDeleteExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service delete experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceDeleteExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service delete experiment params func (o *ExperimentServiceDeleteExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceDeleteExperimentParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_responses.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_responses.go index 92c4eb15697..aa8d6f6bf6a 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_responses.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_delete_experiment_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" ) // ExperimentServiceDeleteExperimentReader is a Reader for the ExperimentServiceDeleteExperiment structure. @@ -24,14 +24,12 @@ type ExperimentServiceDeleteExperimentReader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceDeleteExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceDeleteExperimentOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceDeleteExperimentDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceDeleteExperimentOK() *ExperimentServiceDeleteExperiment return &ExperimentServiceDeleteExperimentOK{} } -/*ExperimentServiceDeleteExperimentOK handles this case with default header values. +/* +ExperimentServiceDeleteExperimentOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceDeleteExperimentOK struct { Payload interface{} } +// IsSuccess returns true when this experiment service delete experiment o k response has a 2xx status code +func (o *ExperimentServiceDeleteExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service delete experiment o k response has a 3xx status code +func (o *ExperimentServiceDeleteExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service delete experiment o k response has a 4xx status code +func (o *ExperimentServiceDeleteExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service delete experiment o k response has a 5xx status code +func (o *ExperimentServiceDeleteExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service delete experiment o k response a status code equal to that given +func (o *ExperimentServiceDeleteExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service delete experiment o k response +func (o *ExperimentServiceDeleteExperimentOK) Code() int { + return 200 +} + func (o *ExperimentServiceDeleteExperimentOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/experiments/{experiment_id}][%d] experimentServiceDeleteExperimentOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/experiments/{experiment_id}][%d] experimentServiceDeleteExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceDeleteExperimentOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/experiments/{experiment_id}][%d] experimentServiceDeleteExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceDeleteExperimentOK) GetPayload() interface{} { + return o.Payload } func (o *ExperimentServiceDeleteExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewExperimentServiceDeleteExperimentDefault(code int) *ExperimentServiceDel } } -/*ExperimentServiceDeleteExperimentDefault handles this case with default header values. +/* +ExperimentServiceDeleteExperimentDefault describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceDeleteExperimentDefault struct { _statusCode int - Payload *experiment_model.RuntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service delete experiment default response has a 2xx status code +func (o *ExperimentServiceDeleteExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service delete experiment default response has a 3xx status code +func (o *ExperimentServiceDeleteExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service delete experiment default response has a 4xx status code +func (o *ExperimentServiceDeleteExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service delete experiment default response has a 5xx status code +func (o *ExperimentServiceDeleteExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service delete experiment default response a status code equal to that given +func (o *ExperimentServiceDeleteExperimentDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service delete experiment default response @@ -94,12 +159,22 @@ func (o *ExperimentServiceDeleteExperimentDefault) Code() int { } func (o *ExperimentServiceDeleteExperimentDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/experiments/{experiment_id}][%d] ExperimentService_DeleteExperiment default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/experiments/{experiment_id}][%d] ExperimentService_DeleteExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceDeleteExperimentDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/experiments/{experiment_id}][%d] ExperimentService_DeleteExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceDeleteExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceDeleteExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.RuntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_parameters.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_parameters.go index f6e57e728ed..755019b2f84 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_parameters.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewExperimentServiceGetExperimentParams creates a new ExperimentServiceGetExperimentParams object -// with the default values initialized. +// NewExperimentServiceGetExperimentParams creates a new ExperimentServiceGetExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceGetExperimentParams() *ExperimentServiceGetExperimentParams { - var () return &ExperimentServiceGetExperimentParams{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceGetExperimentParamsWithTimeout creates a new ExperimentServiceGetExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceGetExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceGetExperimentParams { - var () return &ExperimentServiceGetExperimentParams{ - timeout: timeout, } } // NewExperimentServiceGetExperimentParamsWithContext creates a new ExperimentServiceGetExperimentParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceGetExperimentParamsWithContext(ctx context.Context) *ExperimentServiceGetExperimentParams { - var () return &ExperimentServiceGetExperimentParams{ - Context: ctx, } } // NewExperimentServiceGetExperimentParamsWithHTTPClient creates a new ExperimentServiceGetExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceGetExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceGetExperimentParams { - var () return &ExperimentServiceGetExperimentParams{ HTTPClient: client, } } -/*ExperimentServiceGetExperimentParams contains all the parameters to send to the API endpoint -for the experiment service get experiment operation typically these are written to a http.Request +/* +ExperimentServiceGetExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service get experiment operation. + + Typically these are written to a http.Request. */ type ExperimentServiceGetExperimentParams struct { - /*ExperimentID - The ID of the experiment to be retrieved. + /* ExperimentID. + The ID of the experiment to be retrieved. */ ExperimentID string @@ -72,6 +72,21 @@ type ExperimentServiceGetExperimentParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service get experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceGetExperimentParams) WithDefaults() *ExperimentServiceGetExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service get experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceGetExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service get experiment params func (o *ExperimentServiceGetExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceGetExperimentParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_responses.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_responses.go index cd05dd71482..8203bbe4676 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_responses.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_get_experiment_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" ) // ExperimentServiceGetExperimentReader is a Reader for the ExperimentServiceGetExperiment structure. @@ -24,14 +24,12 @@ type ExperimentServiceGetExperimentReader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceGetExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceGetExperimentOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceGetExperimentDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceGetExperimentOK() *ExperimentServiceGetExperimentOK { return &ExperimentServiceGetExperimentOK{} } -/*ExperimentServiceGetExperimentOK handles this case with default header values. +/* +ExperimentServiceGetExperimentOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceGetExperimentOK struct { Payload *experiment_model.V2beta1Experiment } +// IsSuccess returns true when this experiment service get experiment o k response has a 2xx status code +func (o *ExperimentServiceGetExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service get experiment o k response has a 3xx status code +func (o *ExperimentServiceGetExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service get experiment o k response has a 4xx status code +func (o *ExperimentServiceGetExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service get experiment o k response has a 5xx status code +func (o *ExperimentServiceGetExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service get experiment o k response a status code equal to that given +func (o *ExperimentServiceGetExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service get experiment o k response +func (o *ExperimentServiceGetExperimentOK) Code() int { + return 200 +} + func (o *ExperimentServiceGetExperimentOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/experiments/{experiment_id}][%d] experimentServiceGetExperimentOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/experiments/{experiment_id}][%d] experimentServiceGetExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceGetExperimentOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/experiments/{experiment_id}][%d] experimentServiceGetExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceGetExperimentOK) GetPayload() *experiment_model.V2beta1Experiment { + return o.Payload } func (o *ExperimentServiceGetExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewExperimentServiceGetExperimentDefault(code int) *ExperimentServiceGetExp } } -/*ExperimentServiceGetExperimentDefault handles this case with default header values. +/* +ExperimentServiceGetExperimentDefault describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceGetExperimentDefault struct { _statusCode int - Payload *experiment_model.RuntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service get experiment default response has a 2xx status code +func (o *ExperimentServiceGetExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service get experiment default response has a 3xx status code +func (o *ExperimentServiceGetExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service get experiment default response has a 4xx status code +func (o *ExperimentServiceGetExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service get experiment default response has a 5xx status code +func (o *ExperimentServiceGetExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service get experiment default response a status code equal to that given +func (o *ExperimentServiceGetExperimentDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service get experiment default response @@ -96,12 +161,22 @@ func (o *ExperimentServiceGetExperimentDefault) Code() int { } func (o *ExperimentServiceGetExperimentDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/experiments/{experiment_id}][%d] ExperimentService_GetExperiment default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/experiments/{experiment_id}][%d] ExperimentService_GetExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceGetExperimentDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/experiments/{experiment_id}][%d] ExperimentService_GetExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceGetExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceGetExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.RuntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_parameters.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_parameters.go index 70f51c4baee..b8323e0b5b7 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_parameters.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_parameters.go @@ -13,84 +13,90 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewExperimentServiceListExperimentsParams creates a new ExperimentServiceListExperimentsParams object -// with the default values initialized. +// NewExperimentServiceListExperimentsParams creates a new ExperimentServiceListExperimentsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceListExperimentsParams() *ExperimentServiceListExperimentsParams { - var () return &ExperimentServiceListExperimentsParams{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceListExperimentsParamsWithTimeout creates a new ExperimentServiceListExperimentsParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceListExperimentsParamsWithTimeout(timeout time.Duration) *ExperimentServiceListExperimentsParams { - var () return &ExperimentServiceListExperimentsParams{ - timeout: timeout, } } // NewExperimentServiceListExperimentsParamsWithContext creates a new ExperimentServiceListExperimentsParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceListExperimentsParamsWithContext(ctx context.Context) *ExperimentServiceListExperimentsParams { - var () return &ExperimentServiceListExperimentsParams{ - Context: ctx, } } // NewExperimentServiceListExperimentsParamsWithHTTPClient creates a new ExperimentServiceListExperimentsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceListExperimentsParamsWithHTTPClient(client *http.Client) *ExperimentServiceListExperimentsParams { - var () return &ExperimentServiceListExperimentsParams{ HTTPClient: client, } } -/*ExperimentServiceListExperimentsParams contains all the parameters to send to the API endpoint -for the experiment service list experiments operation typically these are written to a http.Request +/* +ExperimentServiceListExperimentsParams contains all the parameters to send to the API endpoint + + for the experiment service list experiments operation. + + Typically these are written to a http.Request. */ type ExperimentServiceListExperimentsParams struct { - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)). + /* Filter. + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/v2beta1/api/filter.proto)). */ Filter *string - /*Namespace - Which namespace to filter the experiments on. + /* Namespace. + + Which namespace to filter the experiments on. */ Namespace *string - /*PageSize - The number of experiments to be listed per page. If there are more + + /* PageSize. + + The number of experiments to be listed per page. If there are more experiments than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the next page of results. The token is acquried + + /* PageToken. + + A page token to request the next page of results. The token is acquried from the nextPageToken field of the response from the previous ListExperiments call or can be omitted when fetching the first page. - */ PageToken *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - Ascending by default. + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + Ascending by default. */ SortBy *string @@ -99,6 +105,21 @@ type ExperimentServiceListExperimentsParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service list experiments params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceListExperimentsParams) WithDefaults() *ExperimentServiceListExperimentsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service list experiments params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceListExperimentsParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service list experiments params func (o *ExperimentServiceListExperimentsParams) WithTimeout(timeout time.Duration) *ExperimentServiceListExperimentsParams { o.SetTimeout(timeout) @@ -199,80 +220,85 @@ func (o *ExperimentServiceListExperimentsParams) WriteToRequest(r runtime.Client // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.Namespace != nil { // query param namespace var qrNamespace string + if o.Namespace != nil { qrNamespace = *o.Namespace } qNamespace := qrNamespace if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_responses.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_responses.go index 4f19a7e91cb..4468a68cc22 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_responses.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_list_experiments_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" ) // ExperimentServiceListExperimentsReader is a Reader for the ExperimentServiceListExperiments structure. @@ -24,14 +24,12 @@ type ExperimentServiceListExperimentsReader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceListExperimentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceListExperimentsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceListExperimentsDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceListExperimentsOK() *ExperimentServiceListExperimentsOK return &ExperimentServiceListExperimentsOK{} } -/*ExperimentServiceListExperimentsOK handles this case with default header values. +/* +ExperimentServiceListExperimentsOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceListExperimentsOK struct { Payload *experiment_model.V2beta1ListExperimentsResponse } +// IsSuccess returns true when this experiment service list experiments o k response has a 2xx status code +func (o *ExperimentServiceListExperimentsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service list experiments o k response has a 3xx status code +func (o *ExperimentServiceListExperimentsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service list experiments o k response has a 4xx status code +func (o *ExperimentServiceListExperimentsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service list experiments o k response has a 5xx status code +func (o *ExperimentServiceListExperimentsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service list experiments o k response a status code equal to that given +func (o *ExperimentServiceListExperimentsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service list experiments o k response +func (o *ExperimentServiceListExperimentsOK) Code() int { + return 200 +} + func (o *ExperimentServiceListExperimentsOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/experiments][%d] experimentServiceListExperimentsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/experiments][%d] experimentServiceListExperimentsOK %s", 200, payload) +} + +func (o *ExperimentServiceListExperimentsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/experiments][%d] experimentServiceListExperimentsOK %s", 200, payload) +} + +func (o *ExperimentServiceListExperimentsOK) GetPayload() *experiment_model.V2beta1ListExperimentsResponse { + return o.Payload } func (o *ExperimentServiceListExperimentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewExperimentServiceListExperimentsDefault(code int) *ExperimentServiceList } } -/*ExperimentServiceListExperimentsDefault handles this case with default header values. +/* +ExperimentServiceListExperimentsDefault describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceListExperimentsDefault struct { _statusCode int - Payload *experiment_model.RuntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service list experiments default response has a 2xx status code +func (o *ExperimentServiceListExperimentsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service list experiments default response has a 3xx status code +func (o *ExperimentServiceListExperimentsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service list experiments default response has a 4xx status code +func (o *ExperimentServiceListExperimentsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service list experiments default response has a 5xx status code +func (o *ExperimentServiceListExperimentsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service list experiments default response a status code equal to that given +func (o *ExperimentServiceListExperimentsDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service list experiments default response @@ -96,12 +161,22 @@ func (o *ExperimentServiceListExperimentsDefault) Code() int { } func (o *ExperimentServiceListExperimentsDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/experiments][%d] ExperimentService_ListExperiments default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/experiments][%d] ExperimentService_ListExperiments default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceListExperimentsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/experiments][%d] ExperimentService_ListExperiments default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceListExperimentsDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceListExperimentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.RuntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_parameters.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_parameters.go index a1b730480f3..61e2507f3fd 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_parameters.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewExperimentServiceUnarchiveExperimentParams creates a new ExperimentServiceUnarchiveExperimentParams object -// with the default values initialized. +// NewExperimentServiceUnarchiveExperimentParams creates a new ExperimentServiceUnarchiveExperimentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewExperimentServiceUnarchiveExperimentParams() *ExperimentServiceUnarchiveExperimentParams { - var () return &ExperimentServiceUnarchiveExperimentParams{ - timeout: cr.DefaultTimeout, } } // NewExperimentServiceUnarchiveExperimentParamsWithTimeout creates a new ExperimentServiceUnarchiveExperimentParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewExperimentServiceUnarchiveExperimentParamsWithTimeout(timeout time.Duration) *ExperimentServiceUnarchiveExperimentParams { - var () return &ExperimentServiceUnarchiveExperimentParams{ - timeout: timeout, } } // NewExperimentServiceUnarchiveExperimentParamsWithContext creates a new ExperimentServiceUnarchiveExperimentParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewExperimentServiceUnarchiveExperimentParamsWithContext(ctx context.Context) *ExperimentServiceUnarchiveExperimentParams { - var () return &ExperimentServiceUnarchiveExperimentParams{ - Context: ctx, } } // NewExperimentServiceUnarchiveExperimentParamsWithHTTPClient creates a new ExperimentServiceUnarchiveExperimentParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewExperimentServiceUnarchiveExperimentParamsWithHTTPClient(client *http.Client) *ExperimentServiceUnarchiveExperimentParams { - var () return &ExperimentServiceUnarchiveExperimentParams{ HTTPClient: client, } } -/*ExperimentServiceUnarchiveExperimentParams contains all the parameters to send to the API endpoint -for the experiment service unarchive experiment operation typically these are written to a http.Request +/* +ExperimentServiceUnarchiveExperimentParams contains all the parameters to send to the API endpoint + + for the experiment service unarchive experiment operation. + + Typically these are written to a http.Request. */ type ExperimentServiceUnarchiveExperimentParams struct { - /*ExperimentID - The ID of the experiment to be restored. + /* ExperimentID. + The ID of the experiment to be restored. */ ExperimentID string @@ -72,6 +72,21 @@ type ExperimentServiceUnarchiveExperimentParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the experiment service unarchive experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceUnarchiveExperimentParams) WithDefaults() *ExperimentServiceUnarchiveExperimentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the experiment service unarchive experiment params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ExperimentServiceUnarchiveExperimentParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the experiment service unarchive experiment params func (o *ExperimentServiceUnarchiveExperimentParams) WithTimeout(timeout time.Duration) *ExperimentServiceUnarchiveExperimentParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_responses.go b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_responses.go index c91860e1292..316b9520584 100644 --- a/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_responses.go +++ b/backend/api/v2beta1/go_http_client/experiment_client/experiment_service/experiment_service_unarchive_experiment_responses.go @@ -6,14 +6,14 @@ package experiment_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - experiment_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/experiment_model" ) // ExperimentServiceUnarchiveExperimentReader is a Reader for the ExperimentServiceUnarchiveExperiment structure. @@ -24,14 +24,12 @@ type ExperimentServiceUnarchiveExperimentReader struct { // ReadResponse reads a server response into the received o. func (o *ExperimentServiceUnarchiveExperimentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewExperimentServiceUnarchiveExperimentOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewExperimentServiceUnarchiveExperimentDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewExperimentServiceUnarchiveExperimentOK() *ExperimentServiceUnarchiveExpe return &ExperimentServiceUnarchiveExperimentOK{} } -/*ExperimentServiceUnarchiveExperimentOK handles this case with default header values. +/* +ExperimentServiceUnarchiveExperimentOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type ExperimentServiceUnarchiveExperimentOK struct { Payload interface{} } +// IsSuccess returns true when this experiment service unarchive experiment o k response has a 2xx status code +func (o *ExperimentServiceUnarchiveExperimentOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this experiment service unarchive experiment o k response has a 3xx status code +func (o *ExperimentServiceUnarchiveExperimentOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this experiment service unarchive experiment o k response has a 4xx status code +func (o *ExperimentServiceUnarchiveExperimentOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this experiment service unarchive experiment o k response has a 5xx status code +func (o *ExperimentServiceUnarchiveExperimentOK) IsServerError() bool { + return false +} + +// IsCode returns true when this experiment service unarchive experiment o k response a status code equal to that given +func (o *ExperimentServiceUnarchiveExperimentOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the experiment service unarchive experiment o k response +func (o *ExperimentServiceUnarchiveExperimentOK) Code() int { + return 200 +} + func (o *ExperimentServiceUnarchiveExperimentOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:unarchive][%d] experimentServiceUnarchiveExperimentOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:unarchive][%d] experimentServiceUnarchiveExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceUnarchiveExperimentOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:unarchive][%d] experimentServiceUnarchiveExperimentOK %s", 200, payload) +} + +func (o *ExperimentServiceUnarchiveExperimentOK) GetPayload() interface{} { + return o.Payload } func (o *ExperimentServiceUnarchiveExperimentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewExperimentServiceUnarchiveExperimentDefault(code int) *ExperimentService } } -/*ExperimentServiceUnarchiveExperimentDefault handles this case with default header values. +/* +ExperimentServiceUnarchiveExperimentDefault describes a response with status code -1, with default header values. An unexpected error response. */ type ExperimentServiceUnarchiveExperimentDefault struct { _statusCode int - Payload *experiment_model.RuntimeError + Payload *experiment_model.GooglerpcStatus +} + +// IsSuccess returns true when this experiment service unarchive experiment default response has a 2xx status code +func (o *ExperimentServiceUnarchiveExperimentDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this experiment service unarchive experiment default response has a 3xx status code +func (o *ExperimentServiceUnarchiveExperimentDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this experiment service unarchive experiment default response has a 4xx status code +func (o *ExperimentServiceUnarchiveExperimentDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this experiment service unarchive experiment default response has a 5xx status code +func (o *ExperimentServiceUnarchiveExperimentDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this experiment service unarchive experiment default response a status code equal to that given +func (o *ExperimentServiceUnarchiveExperimentDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the experiment service unarchive experiment default response @@ -94,12 +159,22 @@ func (o *ExperimentServiceUnarchiveExperimentDefault) Code() int { } func (o *ExperimentServiceUnarchiveExperimentDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:unarchive][%d] ExperimentService_UnarchiveExperiment default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:unarchive][%d] ExperimentService_UnarchiveExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceUnarchiveExperimentDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/experiments/{experiment_id}:unarchive][%d] ExperimentService_UnarchiveExperiment default %s", o._statusCode, payload) +} + +func (o *ExperimentServiceUnarchiveExperimentDefault) GetPayload() *experiment_model.GooglerpcStatus { + return o.Payload } func (o *ExperimentServiceUnarchiveExperimentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(experiment_model.RuntimeError) + o.Payload = new(experiment_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/experiment_model/googlerpc_status.go b/backend/api/v2beta1/go_http_client/experiment_model/googlerpc_status.go new file mode 100644 index 00000000000..8bd72b44496 --- /dev/null +++ b/backend/api/v2beta1/go_http_client/experiment_model/googlerpc_status.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package experiment_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by [gRPC](https://github.com/grpc). Each `Status` message contains +// three pieces of data: error code, error message, and error details. +// +// You can find out more about this error model and how to work with it in the +// [API Design Guide](https://cloud.google.com/apis/design/errors). +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + Code int32 `json:"code,omitempty"` + + // A list of messages that carry the error details. There is a common set of + // message types for APIs to use. + Details []*ProtobufAny `json:"details"` + + // A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v2beta1/go_http_client/experiment_model/protobuf_any.go b/backend/api/v2beta1/go_http_client/experiment_model/protobuf_any.go index 3c40be98525..ed8315b7a0f 100644 --- a/backend/api/v2beta1/go_http_client/experiment_model/protobuf_any.go +++ b/backend/api/v2beta1/go_http_client/experiment_model/protobuf_any.go @@ -6,9 +6,10 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v2beta1/go_http_client/experiment_model/runtime_error.go b/backend/api/v2beta1/go_http_client/experiment_model/runtime_error.go deleted file mode 100644 index 45761477b70..00000000000 --- a/backend/api/v2beta1/go_http_client/experiment_model/runtime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package experiment_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// RuntimeError runtime error -// swagger:model runtimeError -type RuntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this runtime error -func (m *RuntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeError) UnmarshalBinary(b []byte) error { - var res RuntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_experiment.go b/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_experiment.go index 8b809c17fa1..e24f2579303 100644 --- a/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_experiment.go +++ b/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_experiment.go @@ -6,14 +6,16 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1Experiment v2beta1 experiment +// // swagger:model v2beta1Experiment type V2beta1Experiment struct { @@ -38,7 +40,7 @@ type V2beta1Experiment struct { Namespace string `json:"namespace,omitempty"` // Output. Specifies whether this experiment is in archived or available state. - StorageState V2beta1ExperimentStorageState `json:"storage_state,omitempty"` + StorageState *V2beta1ExperimentStorageState `json:"storage_state,omitempty"` } // Validate validates this v2beta1 experiment @@ -64,7 +66,6 @@ func (m *V2beta1Experiment) Validate(formats strfmt.Registry) error { } func (m *V2beta1Experiment) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -77,7 +78,6 @@ func (m *V2beta1Experiment) validateCreatedAt(formats strfmt.Registry) error { } func (m *V2beta1Experiment) validateLastRunCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.LastRunCreatedAt) { // not required return nil } @@ -90,16 +90,54 @@ func (m *V2beta1Experiment) validateLastRunCreatedAt(formats strfmt.Registry) er } func (m *V2beta1Experiment) validateStorageState(formats strfmt.Registry) error { - if swag.IsZero(m.StorageState) { // not required return nil } - if err := m.StorageState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storage_state") + if m.StorageState != nil { + if err := m.StorageState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 experiment based on the context it is used +func (m *V2beta1Experiment) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStorageState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1Experiment) contextValidateStorageState(ctx context.Context, formats strfmt.Registry) error { + + if m.StorageState != nil { + + if swag.IsZero(m.StorageState) { // not required + return nil + } + + if err := m.StorageState.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err } - return err } return nil diff --git a/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_experiment_storage_state.go b/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_experiment_storage_state.go index 0a30d1c2b73..2aa9d585a3e 100644 --- a/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_experiment_storage_state.go +++ b/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_experiment_storage_state.go @@ -6,22 +6,32 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V2beta1ExperimentStorageState Describes whether an entity is available or archived. // -// - STORAGE_STATE_UNSPECIFIED: Default state. This state in not used -// - AVAILABLE: Entity is available. -// - ARCHIVED: Entity is archived. +// - STORAGE_STATE_UNSPECIFIED: Default state. This state in not used +// - AVAILABLE: Entity is available. +// - ARCHIVED: Entity is archived. +// // swagger:model v2beta1ExperimentStorageState type V2beta1ExperimentStorageState string +func NewV2beta1ExperimentStorageState(value V2beta1ExperimentStorageState) *V2beta1ExperimentStorageState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V2beta1ExperimentStorageState. +func (m V2beta1ExperimentStorageState) Pointer() *V2beta1ExperimentStorageState { + return &m +} + const ( // V2beta1ExperimentStorageStateSTORAGESTATEUNSPECIFIED captures enum value "STORAGE_STATE_UNSPECIFIED" @@ -48,7 +58,7 @@ func init() { } func (m V2beta1ExperimentStorageState) validateV2beta1ExperimentStorageStateEnum(path, location string, value V2beta1ExperimentStorageState) error { - if err := validate.Enum(path, location, value, v2beta1ExperimentStorageStateEnum); err != nil { + if err := validate.EnumCase(path, location, value, v2beta1ExperimentStorageStateEnum, true); err != nil { return err } return nil @@ -68,3 +78,8 @@ func (m V2beta1ExperimentStorageState) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v2beta1 experiment storage state based on context it is used +func (m V2beta1ExperimentStorageState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_list_experiments_response.go b/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_list_experiments_response.go index 2e4da629f22..d56ef147466 100644 --- a/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_list_experiments_response.go +++ b/backend/api/v2beta1/go_http_client/experiment_model/v2beta1_list_experiments_response.go @@ -6,15 +6,16 @@ package experiment_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1ListExperimentsResponse v2beta1 list experiments response +// // swagger:model v2beta1ListExperimentsResponse type V2beta1ListExperimentsResponse struct { @@ -43,7 +44,6 @@ func (m *V2beta1ListExperimentsResponse) Validate(formats strfmt.Registry) error } func (m *V2beta1ListExperimentsResponse) validateExperiments(formats strfmt.Registry) error { - if swag.IsZero(m.Experiments) { // not required return nil } @@ -57,6 +57,47 @@ func (m *V2beta1ListExperimentsResponse) validateExperiments(formats strfmt.Regi if err := m.Experiments[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("experiments" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("experiments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v2beta1 list experiments response based on the context it is used +func (m *V2beta1ListExperimentsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateExperiments(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1ListExperimentsResponse) contextValidateExperiments(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Experiments); i++ { + + if m.Experiments[i] != nil { + + if swag.IsZero(m.Experiments[i]) { // not required + return nil + } + + if err := m.Experiments[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("experiments" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("experiments" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/healthz_client/healthz_client.go b/backend/api/v2beta1/go_http_client/healthz_client/healthz_client.go index 5034e46519f..ea5303a98fc 100644 --- a/backend/api/v2beta1/go_http_client/healthz_client/healthz_client.go +++ b/backend/api/v2beta1/go_http_client/healthz_client/healthz_client.go @@ -8,8 +8,7 @@ package healthz_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/healthz_client/healthz_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Healthz { cli := new(Healthz) cli.Transport = transport - cli.HealthzService = healthz_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Healthz is a client for healthz type Healthz struct { - HealthzService *healthz_service.Client + HealthzService healthz_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Healthz struct { // SetTransport changes the transport on the client and all its subresources func (c *Healthz) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.HealthzService.SetTransport(transport) - } diff --git a/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_client.go b/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_client.go index 8697b832806..67bdd551fb8 100644 --- a/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_client.go +++ b/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_client.go @@ -7,15 +7,40 @@ package healthz_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new healthz service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new healthz service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new healthz service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for healthz service API */ @@ -24,16 +49,25 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HealthzServiceGetHealthzOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* HealthzServiceGetHealthz gets healthz data */ -func (a *Client) HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams, authInfo runtime.ClientAuthInfoWriter) (*HealthzServiceGetHealthzOK, error) { +func (a *Client) HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HealthzServiceGetHealthzOK, error) { // TODO: Validate the params before sending if params == nil { params = NewHealthzServiceGetHealthzParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "HealthzService_GetHealthz", Method: "GET", PathPattern: "/apis/v2beta1/healthz", @@ -45,12 +79,22 @@ func (a *Client) HealthzServiceGetHealthz(params *HealthzServiceGetHealthzParams AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*HealthzServiceGetHealthzOK), nil - + success, ok := result.(*HealthzServiceGetHealthzOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HealthzServiceGetHealthzDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go b/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go index cf0c78296ab..4cb71a4238b 100644 --- a/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go +++ b/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_parameters.go @@ -13,51 +13,51 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewHealthzServiceGetHealthzParams creates a new HealthzServiceGetHealthzParams object -// with the default values initialized. +// NewHealthzServiceGetHealthzParams creates a new HealthzServiceGetHealthzParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewHealthzServiceGetHealthzParams() *HealthzServiceGetHealthzParams { - return &HealthzServiceGetHealthzParams{ - timeout: cr.DefaultTimeout, } } // NewHealthzServiceGetHealthzParamsWithTimeout creates a new HealthzServiceGetHealthzParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewHealthzServiceGetHealthzParamsWithTimeout(timeout time.Duration) *HealthzServiceGetHealthzParams { - return &HealthzServiceGetHealthzParams{ - timeout: timeout, } } // NewHealthzServiceGetHealthzParamsWithContext creates a new HealthzServiceGetHealthzParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewHealthzServiceGetHealthzParamsWithContext(ctx context.Context) *HealthzServiceGetHealthzParams { - return &HealthzServiceGetHealthzParams{ - Context: ctx, } } // NewHealthzServiceGetHealthzParamsWithHTTPClient creates a new HealthzServiceGetHealthzParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewHealthzServiceGetHealthzParamsWithHTTPClient(client *http.Client) *HealthzServiceGetHealthzParams { - return &HealthzServiceGetHealthzParams{ HTTPClient: client, } } -/*HealthzServiceGetHealthzParams contains all the parameters to send to the API endpoint -for the healthz service get healthz operation typically these are written to a http.Request +/* +HealthzServiceGetHealthzParams contains all the parameters to send to the API endpoint + + for the healthz service get healthz operation. + + Typically these are written to a http.Request. */ type HealthzServiceGetHealthzParams struct { timeout time.Duration @@ -65,6 +65,21 @@ type HealthzServiceGetHealthzParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the healthz service get healthz params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *HealthzServiceGetHealthzParams) WithDefaults() *HealthzServiceGetHealthzParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the healthz service get healthz params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *HealthzServiceGetHealthzParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the healthz service get healthz params func (o *HealthzServiceGetHealthzParams) WithTimeout(timeout time.Duration) *HealthzServiceGetHealthzParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go b/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go index a4ed8d9e86e..27d948c114c 100644 --- a/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go +++ b/backend/api/v2beta1/go_http_client/healthz_client/healthz_service/healthz_service_get_healthz_responses.go @@ -6,14 +6,14 @@ package healthz_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - healthz_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/healthz_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/healthz_model" ) // HealthzServiceGetHealthzReader is a Reader for the HealthzServiceGetHealthz structure. @@ -24,14 +24,12 @@ type HealthzServiceGetHealthzReader struct { // ReadResponse reads a server response into the received o. func (o *HealthzServiceGetHealthzReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewHealthzServiceGetHealthzOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewHealthzServiceGetHealthzDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewHealthzServiceGetHealthzOK() *HealthzServiceGetHealthzOK { return &HealthzServiceGetHealthzOK{} } -/*HealthzServiceGetHealthzOK handles this case with default header values. +/* +HealthzServiceGetHealthzOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type HealthzServiceGetHealthzOK struct { Payload *healthz_model.V2beta1GetHealthzResponse } +// IsSuccess returns true when this healthz service get healthz o k response has a 2xx status code +func (o *HealthzServiceGetHealthzOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this healthz service get healthz o k response has a 3xx status code +func (o *HealthzServiceGetHealthzOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this healthz service get healthz o k response has a 4xx status code +func (o *HealthzServiceGetHealthzOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this healthz service get healthz o k response has a 5xx status code +func (o *HealthzServiceGetHealthzOK) IsServerError() bool { + return false +} + +// IsCode returns true when this healthz service get healthz o k response a status code equal to that given +func (o *HealthzServiceGetHealthzOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the healthz service get healthz o k response +func (o *HealthzServiceGetHealthzOK) Code() int { + return 200 +} + func (o *HealthzServiceGetHealthzOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/healthz][%d] healthzServiceGetHealthzOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/healthz][%d] healthzServiceGetHealthzOK %s", 200, payload) +} + +func (o *HealthzServiceGetHealthzOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/healthz][%d] healthzServiceGetHealthzOK %s", 200, payload) +} + +func (o *HealthzServiceGetHealthzOK) GetPayload() *healthz_model.V2beta1GetHealthzResponse { + return o.Payload } func (o *HealthzServiceGetHealthzOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewHealthzServiceGetHealthzDefault(code int) *HealthzServiceGetHealthzDefau } } -/*HealthzServiceGetHealthzDefault handles this case with default header values. +/* +HealthzServiceGetHealthzDefault describes a response with status code -1, with default header values. An unexpected error response. */ type HealthzServiceGetHealthzDefault struct { _statusCode int - Payload *healthz_model.RuntimeError + Payload *healthz_model.GooglerpcStatus +} + +// IsSuccess returns true when this healthz service get healthz default response has a 2xx status code +func (o *HealthzServiceGetHealthzDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this healthz service get healthz default response has a 3xx status code +func (o *HealthzServiceGetHealthzDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this healthz service get healthz default response has a 4xx status code +func (o *HealthzServiceGetHealthzDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this healthz service get healthz default response has a 5xx status code +func (o *HealthzServiceGetHealthzDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this healthz service get healthz default response a status code equal to that given +func (o *HealthzServiceGetHealthzDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the healthz service get healthz default response @@ -96,12 +161,22 @@ func (o *HealthzServiceGetHealthzDefault) Code() int { } func (o *HealthzServiceGetHealthzDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/healthz][%d] HealthzService_GetHealthz default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/healthz][%d] HealthzService_GetHealthz default %s", o._statusCode, payload) +} + +func (o *HealthzServiceGetHealthzDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/healthz][%d] HealthzService_GetHealthz default %s", o._statusCode, payload) +} + +func (o *HealthzServiceGetHealthzDefault) GetPayload() *healthz_model.GooglerpcStatus { + return o.Payload } func (o *HealthzServiceGetHealthzDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(healthz_model.RuntimeError) + o.Payload = new(healthz_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/healthz_model/googlerpc_status.go b/backend/api/v2beta1/go_http_client/healthz_model/googlerpc_status.go new file mode 100644 index 00000000000..1628ef60f0e --- /dev/null +++ b/backend/api/v2beta1/go_http_client/healthz_model/googlerpc_status.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package healthz_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by [gRPC](https://github.com/grpc). Each `Status` message contains +// three pieces of data: error code, error message, and error details. +// +// You can find out more about this error model and how to work with it in the +// [API Design Guide](https://cloud.google.com/apis/design/errors). +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + Code int32 `json:"code,omitempty"` + + // A list of messages that carry the error details. There is a common set of + // message types for APIs to use. + Details []*ProtobufAny `json:"details"` + + // A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v2beta1/go_http_client/healthz_model/protobuf_any.go b/backend/api/v2beta1/go_http_client/healthz_model/protobuf_any.go index cc274ef6e58..9695ae066c7 100644 --- a/backend/api/v2beta1/go_http_client/healthz_model/protobuf_any.go +++ b/backend/api/v2beta1/go_http_client/healthz_model/protobuf_any.go @@ -6,9 +6,10 @@ package healthz_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v2beta1/go_http_client/healthz_model/runtime_error.go b/backend/api/v2beta1/go_http_client/healthz_model/runtime_error.go deleted file mode 100644 index 86feccf8c1e..00000000000 --- a/backend/api/v2beta1/go_http_client/healthz_model/runtime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package healthz_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// RuntimeError runtime error -// swagger:model runtimeError -type RuntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this runtime error -func (m *RuntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeError) UnmarshalBinary(b []byte) error { - var res RuntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v2beta1/go_http_client/healthz_model/v2beta1_get_healthz_response.go b/backend/api/v2beta1/go_http_client/healthz_model/v2beta1_get_healthz_response.go index 0a86ca4dee8..6235cf5011c 100644 --- a/backend/api/v2beta1/go_http_client/healthz_model/v2beta1_get_healthz_response.go +++ b/backend/api/v2beta1/go_http_client/healthz_model/v2beta1_get_healthz_response.go @@ -6,12 +6,14 @@ package healthz_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1GetHealthzResponse v2beta1 get healthz response +// // swagger:model v2beta1GetHealthzResponse type V2beta1GetHealthzResponse struct { @@ -31,6 +33,11 @@ func (m *V2beta1GetHealthzResponse) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v2beta1 get healthz response based on context it is used +func (m *V2beta1GetHealthzResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1GetHealthzResponse) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_client.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_client.go index 8ac3d9acf9b..5dd8fa723eb 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_client.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_client.go @@ -8,8 +8,7 @@ package pipeline_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Pipeline { cli := new(Pipeline) cli.Transport = transport - cli.PipelineService = pipeline_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Pipeline is a client for pipeline type Pipeline struct { - PipelineService *pipeline_service.Client + PipelineService pipeline_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Pipeline struct { // SetTransport changes the transport on the client and all its subresources func (c *Pipeline) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.PipelineService.SetTransport(transport) - } diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go index 3cf89618349..a1b9f31d247 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_client.go @@ -7,15 +7,40 @@ package pipeline_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new pipeline service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new pipeline service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new pipeline service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for pipeline service API */ @@ -24,16 +49,43 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + PipelineServiceCreatePipeline(params *PipelineServiceCreatePipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineOK, error) + + PipelineServiceCreatePipelineAndVersion(params *PipelineServiceCreatePipelineAndVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineAndVersionOK, error) + + PipelineServiceCreatePipelineVersion(params *PipelineServiceCreatePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineVersionOK, error) + + PipelineServiceDeletePipeline(params *PipelineServiceDeletePipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineOK, error) + + PipelineServiceDeletePipelineVersion(params *PipelineServiceDeletePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineVersionOK, error) + + PipelineServiceGetPipeline(params *PipelineServiceGetPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineOK, error) + + PipelineServiceGetPipelineByName(params *PipelineServiceGetPipelineByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineByNameOK, error) + + PipelineServiceGetPipelineVersion(params *PipelineServiceGetPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionOK, error) + + PipelineServiceListPipelineVersions(params *PipelineServiceListPipelineVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelineVersionsOK, error) + + PipelineServiceListPipelines(params *PipelineServiceListPipelinesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelinesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* PipelineServiceCreatePipeline creates a pipeline */ -func (a *Client) PipelineServiceCreatePipeline(params *PipelineServiceCreatePipelineParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceCreatePipelineOK, error) { +func (a *Client) PipelineServiceCreatePipeline(params *PipelineServiceCreatePipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceCreatePipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_CreatePipeline", Method: "POST", PathPattern: "/apis/v2beta1/pipelines", @@ -45,24 +97,33 @@ func (a *Client) PipelineServiceCreatePipeline(params *PipelineServiceCreatePipe AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceCreatePipelineOK), nil - + success, ok := result.(*PipelineServiceCreatePipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceCreatePipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceCreatePipelineAndVersion creates a new pipeline and a new pipeline version in a single transaction */ -func (a *Client) PipelineServiceCreatePipelineAndVersion(params *PipelineServiceCreatePipelineAndVersionParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceCreatePipelineAndVersionOK, error) { +func (a *Client) PipelineServiceCreatePipelineAndVersion(params *PipelineServiceCreatePipelineAndVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineAndVersionOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceCreatePipelineAndVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_CreatePipelineAndVersion", Method: "POST", PathPattern: "/apis/v2beta1/pipelines/create", @@ -74,24 +135,33 @@ func (a *Client) PipelineServiceCreatePipelineAndVersion(params *PipelineService AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceCreatePipelineAndVersionOK), nil - + success, ok := result.(*PipelineServiceCreatePipelineAndVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceCreatePipelineAndVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceCreatePipelineVersion adds a pipeline version to the specified pipeline ID */ -func (a *Client) PipelineServiceCreatePipelineVersion(params *PipelineServiceCreatePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceCreatePipelineVersionOK, error) { +func (a *Client) PipelineServiceCreatePipelineVersion(params *PipelineServiceCreatePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceCreatePipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceCreatePipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_CreatePipelineVersion", Method: "POST", PathPattern: "/apis/v2beta1/pipelines/{pipeline_id}/versions", @@ -103,24 +173,33 @@ func (a *Client) PipelineServiceCreatePipelineVersion(params *PipelineServiceCre AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceCreatePipelineVersionOK), nil - + success, ok := result.(*PipelineServiceCreatePipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceCreatePipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceDeletePipeline deletes a pipeline by ID if cascade is false default it returns an error if the pipeline has any versions if cascade is true it will also delete all pipeline versions */ -func (a *Client) PipelineServiceDeletePipeline(params *PipelineServiceDeletePipelineParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceDeletePipelineOK, error) { +func (a *Client) PipelineServiceDeletePipeline(params *PipelineServiceDeletePipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceDeletePipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_DeletePipeline", Method: "DELETE", PathPattern: "/apis/v2beta1/pipelines/{pipeline_id}", @@ -132,24 +211,33 @@ func (a *Client) PipelineServiceDeletePipeline(params *PipelineServiceDeletePipe AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceDeletePipelineOK), nil - + success, ok := result.(*PipelineServiceDeletePipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceDeletePipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceDeletePipelineVersion deletes a specific pipeline version by pipeline version ID and pipeline ID */ -func (a *Client) PipelineServiceDeletePipelineVersion(params *PipelineServiceDeletePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceDeletePipelineVersionOK, error) { +func (a *Client) PipelineServiceDeletePipelineVersion(params *PipelineServiceDeletePipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceDeletePipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceDeletePipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_DeletePipelineVersion", Method: "DELETE", PathPattern: "/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}", @@ -161,24 +249,33 @@ func (a *Client) PipelineServiceDeletePipelineVersion(params *PipelineServiceDel AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceDeletePipelineVersionOK), nil - + success, ok := result.(*PipelineServiceDeletePipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceDeletePipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceGetPipeline finds a specific pipeline by ID */ -func (a *Client) PipelineServiceGetPipeline(params *PipelineServiceGetPipelineParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceGetPipelineOK, error) { +func (a *Client) PipelineServiceGetPipeline(params *PipelineServiceGetPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceGetPipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_GetPipeline", Method: "GET", PathPattern: "/apis/v2beta1/pipelines/{pipeline_id}", @@ -190,24 +287,33 @@ func (a *Client) PipelineServiceGetPipeline(params *PipelineServiceGetPipelinePa AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceGetPipelineOK), nil - + success, ok := result.(*PipelineServiceGetPipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceGetPipelineByName finds a specific pipeline by name and namespace */ -func (a *Client) PipelineServiceGetPipelineByName(params *PipelineServiceGetPipelineByNameParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceGetPipelineByNameOK, error) { +func (a *Client) PipelineServiceGetPipelineByName(params *PipelineServiceGetPipelineByNameParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineByNameOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceGetPipelineByNameParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_GetPipelineByName", Method: "GET", PathPattern: "/apis/v2beta1/pipelines/names/{name}", @@ -219,24 +325,33 @@ func (a *Client) PipelineServiceGetPipelineByName(params *PipelineServiceGetPipe AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceGetPipelineByNameOK), nil - + success, ok := result.(*PipelineServiceGetPipelineByNameOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineByNameDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceGetPipelineVersion gets a pipeline version by pipeline version ID and pipeline ID */ -func (a *Client) PipelineServiceGetPipelineVersion(params *PipelineServiceGetPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceGetPipelineVersionOK, error) { +func (a *Client) PipelineServiceGetPipelineVersion(params *PipelineServiceGetPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceGetPipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceGetPipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_GetPipelineVersion", Method: "GET", PathPattern: "/apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}", @@ -248,24 +363,33 @@ func (a *Client) PipelineServiceGetPipelineVersion(params *PipelineServiceGetPip AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceGetPipelineVersionOK), nil - + success, ok := result.(*PipelineServiceGetPipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceGetPipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceListPipelineVersions lists all pipeline versions of a given pipeline ID */ -func (a *Client) PipelineServiceListPipelineVersions(params *PipelineServiceListPipelineVersionsParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceListPipelineVersionsOK, error) { +func (a *Client) PipelineServiceListPipelineVersions(params *PipelineServiceListPipelineVersionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelineVersionsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceListPipelineVersionsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_ListPipelineVersions", Method: "GET", PathPattern: "/apis/v2beta1/pipelines/{pipeline_id}/versions", @@ -277,24 +401,33 @@ func (a *Client) PipelineServiceListPipelineVersions(params *PipelineServiceList AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceListPipelineVersionsOK), nil - + success, ok := result.(*PipelineServiceListPipelineVersionsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceListPipelineVersionsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* PipelineServiceListPipelines finds all pipelines within a namespace */ -func (a *Client) PipelineServiceListPipelines(params *PipelineServiceListPipelinesParams, authInfo runtime.ClientAuthInfoWriter) (*PipelineServiceListPipelinesOK, error) { +func (a *Client) PipelineServiceListPipelines(params *PipelineServiceListPipelinesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PipelineServiceListPipelinesOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPipelineServiceListPipelinesParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "PipelineService_ListPipelines", Method: "GET", PathPattern: "/apis/v2beta1/pipelines", @@ -306,12 +439,22 @@ func (a *Client) PipelineServiceListPipelines(params *PipelineServiceListPipelin AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*PipelineServiceListPipelinesOK), nil - + success, ok := result.(*PipelineServiceListPipelinesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PipelineServiceListPipelinesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_and_version_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_and_version_parameters.go index 869fee1da35..b90234313f3 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_and_version_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_and_version_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) -// NewPipelineServiceCreatePipelineAndVersionParams creates a new PipelineServiceCreatePipelineAndVersionParams object -// with the default values initialized. +// NewPipelineServiceCreatePipelineAndVersionParams creates a new PipelineServiceCreatePipelineAndVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceCreatePipelineAndVersionParams() *PipelineServiceCreatePipelineAndVersionParams { - var () return &PipelineServiceCreatePipelineAndVersionParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceCreatePipelineAndVersionParamsWithTimeout creates a new PipelineServiceCreatePipelineAndVersionParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceCreatePipelineAndVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineAndVersionParams { - var () return &PipelineServiceCreatePipelineAndVersionParams{ - timeout: timeout, } } // NewPipelineServiceCreatePipelineAndVersionParamsWithContext creates a new PipelineServiceCreatePipelineAndVersionParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceCreatePipelineAndVersionParamsWithContext(ctx context.Context) *PipelineServiceCreatePipelineAndVersionParams { - var () return &PipelineServiceCreatePipelineAndVersionParams{ - Context: ctx, } } // NewPipelineServiceCreatePipelineAndVersionParamsWithHTTPClient creates a new PipelineServiceCreatePipelineAndVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceCreatePipelineAndVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineAndVersionParams { - var () return &PipelineServiceCreatePipelineAndVersionParams{ HTTPClient: client, } } -/*PipelineServiceCreatePipelineAndVersionParams contains all the parameters to send to the API endpoint -for the pipeline service create pipeline and version operation typically these are written to a http.Request +/* +PipelineServiceCreatePipelineAndVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service create pipeline and version operation. + + Typically these are written to a http.Request. */ type PipelineServiceCreatePipelineAndVersionParams struct { - /*Body*/ + // Body. Body *pipeline_model.V2beta1CreatePipelineAndVersionRequest timeout time.Duration @@ -71,6 +71,21 @@ type PipelineServiceCreatePipelineAndVersionParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service create pipeline and version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineAndVersionParams) WithDefaults() *PipelineServiceCreatePipelineAndVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service create pipeline and version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineAndVersionParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service create pipeline and version params func (o *PipelineServiceCreatePipelineAndVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineAndVersionParams { o.SetTimeout(timeout) @@ -122,7 +137,6 @@ func (o *PipelineServiceCreatePipelineAndVersionParams) WriteToRequest(r runtime return err } var res []error - if o.Body != nil { if err := r.SetBodyParam(o.Body); err != nil { return err diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_and_version_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_and_version_responses.go index d00f98352bc..8ebfcaf81e1 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_and_version_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_and_version_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceCreatePipelineAndVersionReader is a Reader for the PipelineServiceCreatePipelineAndVersion structure. @@ -24,14 +24,12 @@ type PipelineServiceCreatePipelineAndVersionReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceCreatePipelineAndVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceCreatePipelineAndVersionOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceCreatePipelineAndVersionDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceCreatePipelineAndVersionOK() *PipelineServiceCreatePipeli return &PipelineServiceCreatePipelineAndVersionOK{} } -/*PipelineServiceCreatePipelineAndVersionOK handles this case with default header values. +/* +PipelineServiceCreatePipelineAndVersionOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceCreatePipelineAndVersionOK struct { Payload *pipeline_model.V2beta1Pipeline } +// IsSuccess returns true when this pipeline service create pipeline and version o k response has a 2xx status code +func (o *PipelineServiceCreatePipelineAndVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service create pipeline and version o k response has a 3xx status code +func (o *PipelineServiceCreatePipelineAndVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service create pipeline and version o k response has a 4xx status code +func (o *PipelineServiceCreatePipelineAndVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service create pipeline and version o k response has a 5xx status code +func (o *PipelineServiceCreatePipelineAndVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service create pipeline and version o k response a status code equal to that given +func (o *PipelineServiceCreatePipelineAndVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service create pipeline and version o k response +func (o *PipelineServiceCreatePipelineAndVersionOK) Code() int { + return 200 +} + func (o *PipelineServiceCreatePipelineAndVersionOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines/create][%d] pipelineServiceCreatePipelineAndVersionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/create][%d] pipelineServiceCreatePipelineAndVersionOK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineAndVersionOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/create][%d] pipelineServiceCreatePipelineAndVersionOK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineAndVersionOK) GetPayload() *pipeline_model.V2beta1Pipeline { + return o.Payload } func (o *PipelineServiceCreatePipelineAndVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceCreatePipelineAndVersionDefault(code int) *PipelineServic } } -/*PipelineServiceCreatePipelineAndVersionDefault handles this case with default header values. +/* +PipelineServiceCreatePipelineAndVersionDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceCreatePipelineAndVersionDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service create pipeline and version default response has a 2xx status code +func (o *PipelineServiceCreatePipelineAndVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service create pipeline and version default response has a 3xx status code +func (o *PipelineServiceCreatePipelineAndVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service create pipeline and version default response has a 4xx status code +func (o *PipelineServiceCreatePipelineAndVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service create pipeline and version default response has a 5xx status code +func (o *PipelineServiceCreatePipelineAndVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service create pipeline and version default response a status code equal to that given +func (o *PipelineServiceCreatePipelineAndVersionDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service create pipeline and version default response @@ -96,12 +161,22 @@ func (o *PipelineServiceCreatePipelineAndVersionDefault) Code() int { } func (o *PipelineServiceCreatePipelineAndVersionDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines/create][%d] PipelineService_CreatePipelineAndVersion default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/create][%d] PipelineService_CreatePipelineAndVersion default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineAndVersionDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/create][%d] PipelineService_CreatePipelineAndVersion default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineAndVersionDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceCreatePipelineAndVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_parameters.go index 44dbe451746..3568596225f 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_parameters.go @@ -13,67 +13,82 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) -// NewPipelineServiceCreatePipelineParams creates a new PipelineServiceCreatePipelineParams object -// with the default values initialized. +// NewPipelineServiceCreatePipelineParams creates a new PipelineServiceCreatePipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceCreatePipelineParams() *PipelineServiceCreatePipelineParams { - var () return &PipelineServiceCreatePipelineParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceCreatePipelineParamsWithTimeout creates a new PipelineServiceCreatePipelineParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceCreatePipelineParamsWithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineParams { - var () return &PipelineServiceCreatePipelineParams{ - timeout: timeout, } } // NewPipelineServiceCreatePipelineParamsWithContext creates a new PipelineServiceCreatePipelineParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceCreatePipelineParamsWithContext(ctx context.Context) *PipelineServiceCreatePipelineParams { - var () return &PipelineServiceCreatePipelineParams{ - Context: ctx, } } // NewPipelineServiceCreatePipelineParamsWithHTTPClient creates a new PipelineServiceCreatePipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceCreatePipelineParamsWithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineParams { - var () return &PipelineServiceCreatePipelineParams{ HTTPClient: client, } } -/*PipelineServiceCreatePipelineParams contains all the parameters to send to the API endpoint -for the pipeline service create pipeline operation typically these are written to a http.Request +/* +PipelineServiceCreatePipelineParams contains all the parameters to send to the API endpoint + + for the pipeline service create pipeline operation. + + Typically these are written to a http.Request. */ type PipelineServiceCreatePipelineParams struct { - /*Body - Required input. Pipeline that needs to be created. + /* Pipeline. + Required input. Pipeline that needs to be created. */ - Body *pipeline_model.V2beta1Pipeline + Pipeline *pipeline_model.V2beta1Pipeline timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service create pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineParams) WithDefaults() *PipelineServiceCreatePipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service create pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service create pipeline params func (o *PipelineServiceCreatePipelineParams) WithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineParams { o.SetTimeout(timeout) @@ -107,15 +122,15 @@ func (o *PipelineServiceCreatePipelineParams) SetHTTPClient(client *http.Client) o.HTTPClient = client } -// WithBody adds the body to the pipeline service create pipeline params -func (o *PipelineServiceCreatePipelineParams) WithBody(body *pipeline_model.V2beta1Pipeline) *PipelineServiceCreatePipelineParams { - o.SetBody(body) +// WithPipeline adds the pipeline to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) WithPipeline(pipeline *pipeline_model.V2beta1Pipeline) *PipelineServiceCreatePipelineParams { + o.SetPipeline(pipeline) return o } -// SetBody adds the body to the pipeline service create pipeline params -func (o *PipelineServiceCreatePipelineParams) SetBody(body *pipeline_model.V2beta1Pipeline) { - o.Body = body +// SetPipeline adds the pipeline to the pipeline service create pipeline params +func (o *PipelineServiceCreatePipelineParams) SetPipeline(pipeline *pipeline_model.V2beta1Pipeline) { + o.Pipeline = pipeline } // WriteToRequest writes these params to a swagger request @@ -125,9 +140,8 @@ func (o *PipelineServiceCreatePipelineParams) WriteToRequest(r runtime.ClientReq return err } var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { + if o.Pipeline != nil { + if err := r.SetBodyParam(o.Pipeline); err != nil { return err } } diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_responses.go index 6a471ddedfc..6d124b27b5b 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceCreatePipelineReader is a Reader for the PipelineServiceCreatePipeline structure. @@ -24,14 +24,12 @@ type PipelineServiceCreatePipelineReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceCreatePipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceCreatePipelineOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceCreatePipelineDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceCreatePipelineOK() *PipelineServiceCreatePipelineOK { return &PipelineServiceCreatePipelineOK{} } -/*PipelineServiceCreatePipelineOK handles this case with default header values. +/* +PipelineServiceCreatePipelineOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceCreatePipelineOK struct { Payload *pipeline_model.V2beta1Pipeline } +// IsSuccess returns true when this pipeline service create pipeline o k response has a 2xx status code +func (o *PipelineServiceCreatePipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service create pipeline o k response has a 3xx status code +func (o *PipelineServiceCreatePipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service create pipeline o k response has a 4xx status code +func (o *PipelineServiceCreatePipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service create pipeline o k response has a 5xx status code +func (o *PipelineServiceCreatePipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service create pipeline o k response a status code equal to that given +func (o *PipelineServiceCreatePipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service create pipeline o k response +func (o *PipelineServiceCreatePipelineOK) Code() int { + return 200 +} + func (o *PipelineServiceCreatePipelineOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines][%d] pipelineServiceCreatePipelineOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines][%d] pipelineServiceCreatePipelineOK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines][%d] pipelineServiceCreatePipelineOK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineOK) GetPayload() *pipeline_model.V2beta1Pipeline { + return o.Payload } func (o *PipelineServiceCreatePipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceCreatePipelineDefault(code int) *PipelineServiceCreatePip } } -/*PipelineServiceCreatePipelineDefault handles this case with default header values. +/* +PipelineServiceCreatePipelineDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceCreatePipelineDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service create pipeline default response has a 2xx status code +func (o *PipelineServiceCreatePipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service create pipeline default response has a 3xx status code +func (o *PipelineServiceCreatePipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service create pipeline default response has a 4xx status code +func (o *PipelineServiceCreatePipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service create pipeline default response has a 5xx status code +func (o *PipelineServiceCreatePipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service create pipeline default response a status code equal to that given +func (o *PipelineServiceCreatePipelineDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service create pipeline default response @@ -96,12 +161,22 @@ func (o *PipelineServiceCreatePipelineDefault) Code() int { } func (o *PipelineServiceCreatePipelineDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines][%d] PipelineService_CreatePipeline default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines][%d] PipelineService_CreatePipeline default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines][%d] PipelineService_CreatePipeline default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceCreatePipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_parameters.go index 4d295dbd391..17858a3f2ad 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_parameters.go @@ -13,72 +13,88 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) -// NewPipelineServiceCreatePipelineVersionParams creates a new PipelineServiceCreatePipelineVersionParams object -// with the default values initialized. +// NewPipelineServiceCreatePipelineVersionParams creates a new PipelineServiceCreatePipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceCreatePipelineVersionParams() *PipelineServiceCreatePipelineVersionParams { - var () return &PipelineServiceCreatePipelineVersionParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceCreatePipelineVersionParamsWithTimeout creates a new PipelineServiceCreatePipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceCreatePipelineVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineVersionParams { - var () return &PipelineServiceCreatePipelineVersionParams{ - timeout: timeout, } } // NewPipelineServiceCreatePipelineVersionParamsWithContext creates a new PipelineServiceCreatePipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceCreatePipelineVersionParamsWithContext(ctx context.Context) *PipelineServiceCreatePipelineVersionParams { - var () return &PipelineServiceCreatePipelineVersionParams{ - Context: ctx, } } // NewPipelineServiceCreatePipelineVersionParamsWithHTTPClient creates a new PipelineServiceCreatePipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceCreatePipelineVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceCreatePipelineVersionParams { - var () return &PipelineServiceCreatePipelineVersionParams{ HTTPClient: client, } } -/*PipelineServiceCreatePipelineVersionParams contains all the parameters to send to the API endpoint -for the pipeline service create pipeline version operation typically these are written to a http.Request +/* +PipelineServiceCreatePipelineVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service create pipeline version operation. + + Typically these are written to a http.Request. */ type PipelineServiceCreatePipelineVersionParams struct { - /*Body - Required input. Pipeline version ID to be created. + /* PipelineID. + Required input. ID of the parent pipeline. */ - Body *pipeline_model.V2beta1PipelineVersion - /*PipelineID - Required input. ID of the parent pipeline. + PipelineID string + + /* PipelineVersion. + Required input. Pipeline version ID to be created. */ - PipelineID string + PipelineVersion *pipeline_model.V2beta1PipelineVersion timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service create pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineVersionParams) WithDefaults() *PipelineServiceCreatePipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service create pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceCreatePipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service create pipeline version params func (o *PipelineServiceCreatePipelineVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceCreatePipelineVersionParams { o.SetTimeout(timeout) @@ -112,17 +128,6 @@ func (o *PipelineServiceCreatePipelineVersionParams) SetHTTPClient(client *http. o.HTTPClient = client } -// WithBody adds the body to the pipeline service create pipeline version params -func (o *PipelineServiceCreatePipelineVersionParams) WithBody(body *pipeline_model.V2beta1PipelineVersion) *PipelineServiceCreatePipelineVersionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the pipeline service create pipeline version params -func (o *PipelineServiceCreatePipelineVersionParams) SetBody(body *pipeline_model.V2beta1PipelineVersion) { - o.Body = body -} - // WithPipelineID adds the pipelineID to the pipeline service create pipeline version params func (o *PipelineServiceCreatePipelineVersionParams) WithPipelineID(pipelineID string) *PipelineServiceCreatePipelineVersionParams { o.SetPipelineID(pipelineID) @@ -134,6 +139,17 @@ func (o *PipelineServiceCreatePipelineVersionParams) SetPipelineID(pipelineID st o.PipelineID = pipelineID } +// WithPipelineVersion adds the pipelineVersion to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) WithPipelineVersion(pipelineVersion *pipeline_model.V2beta1PipelineVersion) *PipelineServiceCreatePipelineVersionParams { + o.SetPipelineVersion(pipelineVersion) + return o +} + +// SetPipelineVersion adds the pipelineVersion to the pipeline service create pipeline version params +func (o *PipelineServiceCreatePipelineVersionParams) SetPipelineVersion(pipelineVersion *pipeline_model.V2beta1PipelineVersion) { + o.PipelineVersion = pipelineVersion +} + // WriteToRequest writes these params to a swagger request func (o *PipelineServiceCreatePipelineVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -142,16 +158,15 @@ func (o *PipelineServiceCreatePipelineVersionParams) WriteToRequest(r runtime.Cl } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - // path param pipeline_id if err := r.SetPathParam("pipeline_id", o.PipelineID); err != nil { return err } + if o.PipelineVersion != nil { + if err := r.SetBodyParam(o.PipelineVersion); err != nil { + return err + } + } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_responses.go index bd5641a7a9a..42116214156 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_create_pipeline_version_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceCreatePipelineVersionReader is a Reader for the PipelineServiceCreatePipelineVersion structure. @@ -24,14 +24,12 @@ type PipelineServiceCreatePipelineVersionReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceCreatePipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceCreatePipelineVersionOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceCreatePipelineVersionDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceCreatePipelineVersionOK() *PipelineServiceCreatePipelineV return &PipelineServiceCreatePipelineVersionOK{} } -/*PipelineServiceCreatePipelineVersionOK handles this case with default header values. +/* +PipelineServiceCreatePipelineVersionOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceCreatePipelineVersionOK struct { Payload *pipeline_model.V2beta1PipelineVersion } +// IsSuccess returns true when this pipeline service create pipeline version o k response has a 2xx status code +func (o *PipelineServiceCreatePipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service create pipeline version o k response has a 3xx status code +func (o *PipelineServiceCreatePipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service create pipeline version o k response has a 4xx status code +func (o *PipelineServiceCreatePipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service create pipeline version o k response has a 5xx status code +func (o *PipelineServiceCreatePipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service create pipeline version o k response a status code equal to that given +func (o *PipelineServiceCreatePipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service create pipeline version o k response +func (o *PipelineServiceCreatePipelineVersionOK) Code() int { + return 200 +} + func (o *PipelineServiceCreatePipelineVersionOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] pipelineServiceCreatePipelineVersionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] pipelineServiceCreatePipelineVersionOK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineVersionOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] pipelineServiceCreatePipelineVersionOK %s", 200, payload) +} + +func (o *PipelineServiceCreatePipelineVersionOK) GetPayload() *pipeline_model.V2beta1PipelineVersion { + return o.Payload } func (o *PipelineServiceCreatePipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceCreatePipelineVersionDefault(code int) *PipelineServiceCr } } -/*PipelineServiceCreatePipelineVersionDefault handles this case with default header values. +/* +PipelineServiceCreatePipelineVersionDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceCreatePipelineVersionDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service create pipeline version default response has a 2xx status code +func (o *PipelineServiceCreatePipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service create pipeline version default response has a 3xx status code +func (o *PipelineServiceCreatePipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service create pipeline version default response has a 4xx status code +func (o *PipelineServiceCreatePipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service create pipeline version default response has a 5xx status code +func (o *PipelineServiceCreatePipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service create pipeline version default response a status code equal to that given +func (o *PipelineServiceCreatePipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service create pipeline version default response @@ -96,12 +161,22 @@ func (o *PipelineServiceCreatePipelineVersionDefault) Code() int { } func (o *PipelineServiceCreatePipelineVersionDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] PipelineService_CreatePipelineVersion default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] PipelineService_CreatePipelineVersion default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineVersionDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] PipelineService_CreatePipelineVersion default %s", o._statusCode, payload) +} + +func (o *PipelineServiceCreatePipelineVersionDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceCreatePipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_parameters.go index 77fec341d12..09f2acc089e 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_parameters.go @@ -13,64 +13,65 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewPipelineServiceDeletePipelineParams creates a new PipelineServiceDeletePipelineParams object -// with the default values initialized. +// NewPipelineServiceDeletePipelineParams creates a new PipelineServiceDeletePipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceDeletePipelineParams() *PipelineServiceDeletePipelineParams { - var () return &PipelineServiceDeletePipelineParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceDeletePipelineParamsWithTimeout creates a new PipelineServiceDeletePipelineParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceDeletePipelineParamsWithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineParams { - var () return &PipelineServiceDeletePipelineParams{ - timeout: timeout, } } // NewPipelineServiceDeletePipelineParamsWithContext creates a new PipelineServiceDeletePipelineParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceDeletePipelineParamsWithContext(ctx context.Context) *PipelineServiceDeletePipelineParams { - var () return &PipelineServiceDeletePipelineParams{ - Context: ctx, } } // NewPipelineServiceDeletePipelineParamsWithHTTPClient creates a new PipelineServiceDeletePipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceDeletePipelineParamsWithHTTPClient(client *http.Client) *PipelineServiceDeletePipelineParams { - var () return &PipelineServiceDeletePipelineParams{ HTTPClient: client, } } -/*PipelineServiceDeletePipelineParams contains all the parameters to send to the API endpoint -for the pipeline service delete pipeline operation typically these are written to a http.Request +/* +PipelineServiceDeletePipelineParams contains all the parameters to send to the API endpoint + + for the pipeline service delete pipeline operation. + + Typically these are written to a http.Request. */ type PipelineServiceDeletePipelineParams struct { - /*Cascade - Optional. If true, the pipeline and all its versions will be deleted. - If false (default), only the pipeline will be deleted if it has no versions. + /* Cascade. + Optional. If true, the pipeline and all its versions will be deleted. + If false (default), only the pipeline will be deleted if it has no versions. */ Cascade *bool - /*PipelineID - Required input. ID of the pipeline to be deleted. + /* PipelineID. + + Required input. ID of the pipeline to be deleted. */ PipelineID string @@ -79,6 +80,21 @@ type PipelineServiceDeletePipelineParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service delete pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineParams) WithDefaults() *PipelineServiceDeletePipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service delete pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service delete pipeline params func (o *PipelineServiceDeletePipelineParams) WithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineParams { o.SetTimeout(timeout) @@ -146,16 +162,17 @@ func (o *PipelineServiceDeletePipelineParams) WriteToRequest(r runtime.ClientReq // query param cascade var qrCascade bool + if o.Cascade != nil { qrCascade = *o.Cascade } qCascade := swag.FormatBool(qrCascade) if qCascade != "" { + if err := r.SetQueryParam("cascade", qCascade); err != nil { return err } } - } // path param pipeline_id diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_responses.go index 358acdceb3d..f16b165fe6b 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceDeletePipelineReader is a Reader for the PipelineServiceDeletePipeline structure. @@ -24,14 +24,12 @@ type PipelineServiceDeletePipelineReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceDeletePipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceDeletePipelineOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceDeletePipelineDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceDeletePipelineOK() *PipelineServiceDeletePipelineOK { return &PipelineServiceDeletePipelineOK{} } -/*PipelineServiceDeletePipelineOK handles this case with default header values. +/* +PipelineServiceDeletePipelineOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceDeletePipelineOK struct { Payload interface{} } +// IsSuccess returns true when this pipeline service delete pipeline o k response has a 2xx status code +func (o *PipelineServiceDeletePipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service delete pipeline o k response has a 3xx status code +func (o *PipelineServiceDeletePipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service delete pipeline o k response has a 4xx status code +func (o *PipelineServiceDeletePipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service delete pipeline o k response has a 5xx status code +func (o *PipelineServiceDeletePipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service delete pipeline o k response a status code equal to that given +func (o *PipelineServiceDeletePipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service delete pipeline o k response +func (o *PipelineServiceDeletePipelineOK) Code() int { + return 200 +} + func (o *PipelineServiceDeletePipelineOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}][%d] pipelineServiceDeletePipelineOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}][%d] pipelineServiceDeletePipelineOK %s", 200, payload) +} + +func (o *PipelineServiceDeletePipelineOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}][%d] pipelineServiceDeletePipelineOK %s", 200, payload) +} + +func (o *PipelineServiceDeletePipelineOK) GetPayload() interface{} { + return o.Payload } func (o *PipelineServiceDeletePipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewPipelineServiceDeletePipelineDefault(code int) *PipelineServiceDeletePip } } -/*PipelineServiceDeletePipelineDefault handles this case with default header values. +/* +PipelineServiceDeletePipelineDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceDeletePipelineDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service delete pipeline default response has a 2xx status code +func (o *PipelineServiceDeletePipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service delete pipeline default response has a 3xx status code +func (o *PipelineServiceDeletePipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service delete pipeline default response has a 4xx status code +func (o *PipelineServiceDeletePipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service delete pipeline default response has a 5xx status code +func (o *PipelineServiceDeletePipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service delete pipeline default response a status code equal to that given +func (o *PipelineServiceDeletePipelineDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service delete pipeline default response @@ -94,12 +159,22 @@ func (o *PipelineServiceDeletePipelineDefault) Code() int { } func (o *PipelineServiceDeletePipelineDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}][%d] PipelineService_DeletePipeline default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}][%d] PipelineService_DeletePipeline default %s", o._statusCode, payload) +} + +func (o *PipelineServiceDeletePipelineDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}][%d] PipelineService_DeletePipeline default %s", o._statusCode, payload) +} + +func (o *PipelineServiceDeletePipelineDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceDeletePipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_parameters.go index de95486707c..c9dffbb298c 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_parameters.go @@ -13,62 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceDeletePipelineVersionParams creates a new PipelineServiceDeletePipelineVersionParams object -// with the default values initialized. +// NewPipelineServiceDeletePipelineVersionParams creates a new PipelineServiceDeletePipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceDeletePipelineVersionParams() *PipelineServiceDeletePipelineVersionParams { - var () return &PipelineServiceDeletePipelineVersionParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceDeletePipelineVersionParamsWithTimeout creates a new PipelineServiceDeletePipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceDeletePipelineVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineVersionParams { - var () return &PipelineServiceDeletePipelineVersionParams{ - timeout: timeout, } } // NewPipelineServiceDeletePipelineVersionParamsWithContext creates a new PipelineServiceDeletePipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceDeletePipelineVersionParamsWithContext(ctx context.Context) *PipelineServiceDeletePipelineVersionParams { - var () return &PipelineServiceDeletePipelineVersionParams{ - Context: ctx, } } // NewPipelineServiceDeletePipelineVersionParamsWithHTTPClient creates a new PipelineServiceDeletePipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceDeletePipelineVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceDeletePipelineVersionParams { - var () return &PipelineServiceDeletePipelineVersionParams{ HTTPClient: client, } } -/*PipelineServiceDeletePipelineVersionParams contains all the parameters to send to the API endpoint -for the pipeline service delete pipeline version operation typically these are written to a http.Request +/* +PipelineServiceDeletePipelineVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service delete pipeline version operation. + + Typically these are written to a http.Request. */ type PipelineServiceDeletePipelineVersionParams struct { - /*PipelineID - Required input. ID of the parent pipeline. + /* PipelineID. + Required input. ID of the parent pipeline. */ PipelineID string - /*PipelineVersionID - Required input. The ID of the pipeline version to be deleted. + /* PipelineVersionID. + + Required input. The ID of the pipeline version to be deleted. */ PipelineVersionID string @@ -77,6 +78,21 @@ type PipelineServiceDeletePipelineVersionParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service delete pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineVersionParams) WithDefaults() *PipelineServiceDeletePipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service delete pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceDeletePipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service delete pipeline version params func (o *PipelineServiceDeletePipelineVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceDeletePipelineVersionParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_responses.go index bc640f2e5aa..b181e3b279d 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_delete_pipeline_version_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceDeletePipelineVersionReader is a Reader for the PipelineServiceDeletePipelineVersion structure. @@ -24,14 +24,12 @@ type PipelineServiceDeletePipelineVersionReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceDeletePipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceDeletePipelineVersionOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceDeletePipelineVersionDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceDeletePipelineVersionOK() *PipelineServiceDeletePipelineV return &PipelineServiceDeletePipelineVersionOK{} } -/*PipelineServiceDeletePipelineVersionOK handles this case with default header values. +/* +PipelineServiceDeletePipelineVersionOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceDeletePipelineVersionOK struct { Payload interface{} } +// IsSuccess returns true when this pipeline service delete pipeline version o k response has a 2xx status code +func (o *PipelineServiceDeletePipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service delete pipeline version o k response has a 3xx status code +func (o *PipelineServiceDeletePipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service delete pipeline version o k response has a 4xx status code +func (o *PipelineServiceDeletePipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service delete pipeline version o k response has a 5xx status code +func (o *PipelineServiceDeletePipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service delete pipeline version o k response a status code equal to that given +func (o *PipelineServiceDeletePipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service delete pipeline version o k response +func (o *PipelineServiceDeletePipelineVersionOK) Code() int { + return 200 +} + func (o *PipelineServiceDeletePipelineVersionOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] pipelineServiceDeletePipelineVersionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] pipelineServiceDeletePipelineVersionOK %s", 200, payload) +} + +func (o *PipelineServiceDeletePipelineVersionOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] pipelineServiceDeletePipelineVersionOK %s", 200, payload) +} + +func (o *PipelineServiceDeletePipelineVersionOK) GetPayload() interface{} { + return o.Payload } func (o *PipelineServiceDeletePipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewPipelineServiceDeletePipelineVersionDefault(code int) *PipelineServiceDe } } -/*PipelineServiceDeletePipelineVersionDefault handles this case with default header values. +/* +PipelineServiceDeletePipelineVersionDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceDeletePipelineVersionDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service delete pipeline version default response has a 2xx status code +func (o *PipelineServiceDeletePipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service delete pipeline version default response has a 3xx status code +func (o *PipelineServiceDeletePipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service delete pipeline version default response has a 4xx status code +func (o *PipelineServiceDeletePipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service delete pipeline version default response has a 5xx status code +func (o *PipelineServiceDeletePipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service delete pipeline version default response a status code equal to that given +func (o *PipelineServiceDeletePipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service delete pipeline version default response @@ -94,12 +159,22 @@ func (o *PipelineServiceDeletePipelineVersionDefault) Code() int { } func (o *PipelineServiceDeletePipelineVersionDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] PipelineService_DeletePipelineVersion default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] PipelineService_DeletePipelineVersion default %s", o._statusCode, payload) +} + +func (o *PipelineServiceDeletePipelineVersionDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] PipelineService_DeletePipelineVersion default %s", o._statusCode, payload) +} + +func (o *PipelineServiceDeletePipelineVersionDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceDeletePipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_parameters.go index 43f95bbec21..feb627c74aa 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_parameters.go @@ -13,64 +13,65 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceGetPipelineByNameParams creates a new PipelineServiceGetPipelineByNameParams object -// with the default values initialized. +// NewPipelineServiceGetPipelineByNameParams creates a new PipelineServiceGetPipelineByNameParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceGetPipelineByNameParams() *PipelineServiceGetPipelineByNameParams { - var () return &PipelineServiceGetPipelineByNameParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceGetPipelineByNameParamsWithTimeout creates a new PipelineServiceGetPipelineByNameParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceGetPipelineByNameParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineByNameParams { - var () return &PipelineServiceGetPipelineByNameParams{ - timeout: timeout, } } // NewPipelineServiceGetPipelineByNameParamsWithContext creates a new PipelineServiceGetPipelineByNameParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceGetPipelineByNameParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineByNameParams { - var () return &PipelineServiceGetPipelineByNameParams{ - Context: ctx, } } // NewPipelineServiceGetPipelineByNameParamsWithHTTPClient creates a new PipelineServiceGetPipelineByNameParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceGetPipelineByNameParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineByNameParams { - var () return &PipelineServiceGetPipelineByNameParams{ HTTPClient: client, } } -/*PipelineServiceGetPipelineByNameParams contains all the parameters to send to the API endpoint -for the pipeline service get pipeline by name operation typically these are written to a http.Request +/* +PipelineServiceGetPipelineByNameParams contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline by name operation. + + Typically these are written to a http.Request. */ type PipelineServiceGetPipelineByNameParams struct { - /*Name - Required input. Name of the pipeline to be retrieved. + /* Name. + Required input. Name of the pipeline to be retrieved. */ Name string - /*Namespace - Optional input. Namespace of the pipeline. + + /* Namespace. + + Optional input. Namespace of the pipeline. It could be empty if default namespaces needs to be used or if multi-user support is turned off. - */ Namespace *string @@ -79,6 +80,21 @@ type PipelineServiceGetPipelineByNameParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service get pipeline by name params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineByNameParams) WithDefaults() *PipelineServiceGetPipelineByNameParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline by name params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineByNameParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service get pipeline by name params func (o *PipelineServiceGetPipelineByNameParams) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineByNameParams { o.SetTimeout(timeout) @@ -151,16 +167,17 @@ func (o *PipelineServiceGetPipelineByNameParams) WriteToRequest(r runtime.Client // query param namespace var qrNamespace string + if o.Namespace != nil { qrNamespace = *o.Namespace } qNamespace := qrNamespace if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_responses.go index 4c33edf2881..918ce9e13b1 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_by_name_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceGetPipelineByNameReader is a Reader for the PipelineServiceGetPipelineByName structure. @@ -24,14 +24,12 @@ type PipelineServiceGetPipelineByNameReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceGetPipelineByNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceGetPipelineByNameOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceGetPipelineByNameDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceGetPipelineByNameOK() *PipelineServiceGetPipelineByNameOK return &PipelineServiceGetPipelineByNameOK{} } -/*PipelineServiceGetPipelineByNameOK handles this case with default header values. +/* +PipelineServiceGetPipelineByNameOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceGetPipelineByNameOK struct { Payload *pipeline_model.V2beta1Pipeline } +// IsSuccess returns true when this pipeline service get pipeline by name o k response has a 2xx status code +func (o *PipelineServiceGetPipelineByNameOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline by name o k response has a 3xx status code +func (o *PipelineServiceGetPipelineByNameOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline by name o k response has a 4xx status code +func (o *PipelineServiceGetPipelineByNameOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline by name o k response has a 5xx status code +func (o *PipelineServiceGetPipelineByNameOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline by name o k response a status code equal to that given +func (o *PipelineServiceGetPipelineByNameOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline by name o k response +func (o *PipelineServiceGetPipelineByNameOK) Code() int { + return 200 +} + func (o *PipelineServiceGetPipelineByNameOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines/names/{name}][%d] pipelineServiceGetPipelineByNameOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/names/{name}][%d] pipelineServiceGetPipelineByNameOK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineByNameOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/names/{name}][%d] pipelineServiceGetPipelineByNameOK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineByNameOK) GetPayload() *pipeline_model.V2beta1Pipeline { + return o.Payload } func (o *PipelineServiceGetPipelineByNameOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceGetPipelineByNameDefault(code int) *PipelineServiceGetPip } } -/*PipelineServiceGetPipelineByNameDefault handles this case with default header values. +/* +PipelineServiceGetPipelineByNameDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceGetPipelineByNameDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline by name default response has a 2xx status code +func (o *PipelineServiceGetPipelineByNameDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline by name default response has a 3xx status code +func (o *PipelineServiceGetPipelineByNameDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline by name default response has a 4xx status code +func (o *PipelineServiceGetPipelineByNameDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline by name default response has a 5xx status code +func (o *PipelineServiceGetPipelineByNameDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline by name default response a status code equal to that given +func (o *PipelineServiceGetPipelineByNameDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service get pipeline by name default response @@ -96,12 +161,22 @@ func (o *PipelineServiceGetPipelineByNameDefault) Code() int { } func (o *PipelineServiceGetPipelineByNameDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines/names/{name}][%d] PipelineService_GetPipelineByName default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/names/{name}][%d] PipelineService_GetPipelineByName default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineByNameDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/names/{name}][%d] PipelineService_GetPipelineByName default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineByNameDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceGetPipelineByNameDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_parameters.go index 17174ebac4b..b94f4121958 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceGetPipelineParams creates a new PipelineServiceGetPipelineParams object -// with the default values initialized. +// NewPipelineServiceGetPipelineParams creates a new PipelineServiceGetPipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceGetPipelineParams() *PipelineServiceGetPipelineParams { - var () return &PipelineServiceGetPipelineParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceGetPipelineParamsWithTimeout creates a new PipelineServiceGetPipelineParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceGetPipelineParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineParams { - var () return &PipelineServiceGetPipelineParams{ - timeout: timeout, } } // NewPipelineServiceGetPipelineParamsWithContext creates a new PipelineServiceGetPipelineParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceGetPipelineParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineParams { - var () return &PipelineServiceGetPipelineParams{ - Context: ctx, } } // NewPipelineServiceGetPipelineParamsWithHTTPClient creates a new PipelineServiceGetPipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceGetPipelineParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineParams { - var () return &PipelineServiceGetPipelineParams{ HTTPClient: client, } } -/*PipelineServiceGetPipelineParams contains all the parameters to send to the API endpoint -for the pipeline service get pipeline operation typically these are written to a http.Request +/* +PipelineServiceGetPipelineParams contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline operation. + + Typically these are written to a http.Request. */ type PipelineServiceGetPipelineParams struct { - /*PipelineID - Required input. The ID of the pipeline to be retrieved. + /* PipelineID. + Required input. The ID of the pipeline to be retrieved. */ PipelineID string @@ -72,6 +72,21 @@ type PipelineServiceGetPipelineParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service get pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineParams) WithDefaults() *PipelineServiceGetPipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service get pipeline params func (o *PipelineServiceGetPipelineParams) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_responses.go index 71802728827..4f9a42a48ac 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceGetPipelineReader is a Reader for the PipelineServiceGetPipeline structure. @@ -24,14 +24,12 @@ type PipelineServiceGetPipelineReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceGetPipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceGetPipelineOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceGetPipelineDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceGetPipelineOK() *PipelineServiceGetPipelineOK { return &PipelineServiceGetPipelineOK{} } -/*PipelineServiceGetPipelineOK handles this case with default header values. +/* +PipelineServiceGetPipelineOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceGetPipelineOK struct { Payload *pipeline_model.V2beta1Pipeline } +// IsSuccess returns true when this pipeline service get pipeline o k response has a 2xx status code +func (o *PipelineServiceGetPipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline o k response has a 3xx status code +func (o *PipelineServiceGetPipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline o k response has a 4xx status code +func (o *PipelineServiceGetPipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline o k response has a 5xx status code +func (o *PipelineServiceGetPipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline o k response a status code equal to that given +func (o *PipelineServiceGetPipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline o k response +func (o *PipelineServiceGetPipelineOK) Code() int { + return 200 +} + func (o *PipelineServiceGetPipelineOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}][%d] pipelineServiceGetPipelineOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}][%d] pipelineServiceGetPipelineOK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}][%d] pipelineServiceGetPipelineOK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineOK) GetPayload() *pipeline_model.V2beta1Pipeline { + return o.Payload } func (o *PipelineServiceGetPipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceGetPipelineDefault(code int) *PipelineServiceGetPipelineD } } -/*PipelineServiceGetPipelineDefault handles this case with default header values. +/* +PipelineServiceGetPipelineDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceGetPipelineDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline default response has a 2xx status code +func (o *PipelineServiceGetPipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline default response has a 3xx status code +func (o *PipelineServiceGetPipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline default response has a 4xx status code +func (o *PipelineServiceGetPipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline default response has a 5xx status code +func (o *PipelineServiceGetPipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline default response a status code equal to that given +func (o *PipelineServiceGetPipelineDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service get pipeline default response @@ -96,12 +161,22 @@ func (o *PipelineServiceGetPipelineDefault) Code() int { } func (o *PipelineServiceGetPipelineDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}][%d] PipelineService_GetPipeline default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}][%d] PipelineService_GetPipeline default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}][%d] PipelineService_GetPipeline default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceGetPipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_parameters.go index 0ad7f8636e3..997d717cba3 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_parameters.go @@ -13,62 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewPipelineServiceGetPipelineVersionParams creates a new PipelineServiceGetPipelineVersionParams object -// with the default values initialized. +// NewPipelineServiceGetPipelineVersionParams creates a new PipelineServiceGetPipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceGetPipelineVersionParams() *PipelineServiceGetPipelineVersionParams { - var () return &PipelineServiceGetPipelineVersionParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceGetPipelineVersionParamsWithTimeout creates a new PipelineServiceGetPipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceGetPipelineVersionParamsWithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionParams { - var () return &PipelineServiceGetPipelineVersionParams{ - timeout: timeout, } } // NewPipelineServiceGetPipelineVersionParamsWithContext creates a new PipelineServiceGetPipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceGetPipelineVersionParamsWithContext(ctx context.Context) *PipelineServiceGetPipelineVersionParams { - var () return &PipelineServiceGetPipelineVersionParams{ - Context: ctx, } } // NewPipelineServiceGetPipelineVersionParamsWithHTTPClient creates a new PipelineServiceGetPipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceGetPipelineVersionParamsWithHTTPClient(client *http.Client) *PipelineServiceGetPipelineVersionParams { - var () return &PipelineServiceGetPipelineVersionParams{ HTTPClient: client, } } -/*PipelineServiceGetPipelineVersionParams contains all the parameters to send to the API endpoint -for the pipeline service get pipeline version operation typically these are written to a http.Request +/* +PipelineServiceGetPipelineVersionParams contains all the parameters to send to the API endpoint + + for the pipeline service get pipeline version operation. + + Typically these are written to a http.Request. */ type PipelineServiceGetPipelineVersionParams struct { - /*PipelineID - Required input. ID of the parent pipeline. + /* PipelineID. + Required input. ID of the parent pipeline. */ PipelineID string - /*PipelineVersionID - Required input. ID of the pipeline version to be retrieved. + /* PipelineVersionID. + + Required input. ID of the pipeline version to be retrieved. */ PipelineVersionID string @@ -77,6 +78,21 @@ type PipelineServiceGetPipelineVersionParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service get pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionParams) WithDefaults() *PipelineServiceGetPipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service get pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceGetPipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service get pipeline version params func (o *PipelineServiceGetPipelineVersionParams) WithTimeout(timeout time.Duration) *PipelineServiceGetPipelineVersionParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_responses.go index 0e326be7a68..fc9d91e5a86 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_get_pipeline_version_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceGetPipelineVersionReader is a Reader for the PipelineServiceGetPipelineVersion structure. @@ -24,14 +24,12 @@ type PipelineServiceGetPipelineVersionReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceGetPipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceGetPipelineVersionOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceGetPipelineVersionDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceGetPipelineVersionOK() *PipelineServiceGetPipelineVersion return &PipelineServiceGetPipelineVersionOK{} } -/*PipelineServiceGetPipelineVersionOK handles this case with default header values. +/* +PipelineServiceGetPipelineVersionOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceGetPipelineVersionOK struct { Payload *pipeline_model.V2beta1PipelineVersion } +// IsSuccess returns true when this pipeline service get pipeline version o k response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service get pipeline version o k response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service get pipeline version o k response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service get pipeline version o k response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service get pipeline version o k response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service get pipeline version o k response +func (o *PipelineServiceGetPipelineVersionOK) Code() int { + return 200 +} + func (o *PipelineServiceGetPipelineVersionOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] pipelineServiceGetPipelineVersionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] pipelineServiceGetPipelineVersionOK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineVersionOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] pipelineServiceGetPipelineVersionOK %s", 200, payload) +} + +func (o *PipelineServiceGetPipelineVersionOK) GetPayload() *pipeline_model.V2beta1PipelineVersion { + return o.Payload } func (o *PipelineServiceGetPipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceGetPipelineVersionDefault(code int) *PipelineServiceGetPi } } -/*PipelineServiceGetPipelineVersionDefault handles this case with default header values. +/* +PipelineServiceGetPipelineVersionDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceGetPipelineVersionDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service get pipeline version default response has a 2xx status code +func (o *PipelineServiceGetPipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service get pipeline version default response has a 3xx status code +func (o *PipelineServiceGetPipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service get pipeline version default response has a 4xx status code +func (o *PipelineServiceGetPipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service get pipeline version default response has a 5xx status code +func (o *PipelineServiceGetPipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service get pipeline version default response a status code equal to that given +func (o *PipelineServiceGetPipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service get pipeline version default response @@ -96,12 +161,22 @@ func (o *PipelineServiceGetPipelineVersionDefault) Code() int { } func (o *PipelineServiceGetPipelineVersionDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] PipelineService_GetPipelineVersion default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] PipelineService_GetPipelineVersion default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineVersionDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions/{pipeline_version_id}][%d] PipelineService_GetPipelineVersion default %s", o._statusCode, payload) +} + +func (o *PipelineServiceGetPipelineVersionDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceGetPipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_parameters.go index b39941a37ca..174a17f387b 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_parameters.go @@ -13,82 +13,88 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewPipelineServiceListPipelineVersionsParams creates a new PipelineServiceListPipelineVersionsParams object -// with the default values initialized. +// NewPipelineServiceListPipelineVersionsParams creates a new PipelineServiceListPipelineVersionsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceListPipelineVersionsParams() *PipelineServiceListPipelineVersionsParams { - var () return &PipelineServiceListPipelineVersionsParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceListPipelineVersionsParamsWithTimeout creates a new PipelineServiceListPipelineVersionsParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceListPipelineVersionsParamsWithTimeout(timeout time.Duration) *PipelineServiceListPipelineVersionsParams { - var () return &PipelineServiceListPipelineVersionsParams{ - timeout: timeout, } } // NewPipelineServiceListPipelineVersionsParamsWithContext creates a new PipelineServiceListPipelineVersionsParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceListPipelineVersionsParamsWithContext(ctx context.Context) *PipelineServiceListPipelineVersionsParams { - var () return &PipelineServiceListPipelineVersionsParams{ - Context: ctx, } } // NewPipelineServiceListPipelineVersionsParamsWithHTTPClient creates a new PipelineServiceListPipelineVersionsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceListPipelineVersionsParamsWithHTTPClient(client *http.Client) *PipelineServiceListPipelineVersionsParams { - var () return &PipelineServiceListPipelineVersionsParams{ HTTPClient: client, } } -/*PipelineServiceListPipelineVersionsParams contains all the parameters to send to the API endpoint -for the pipeline service list pipeline versions operation typically these are written to a http.Request +/* +PipelineServiceListPipelineVersionsParams contains all the parameters to send to the API endpoint + + for the pipeline service list pipeline versions operation. + + Typically these are written to a http.Request. */ type PipelineServiceListPipelineVersionsParams struct { - /*Filter - A url-encoded, JSON-serialized filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). + /* Filter. + A url-encoded, JSON-serialized filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). */ Filter *string - /*PageSize - The number of pipeline versions to be listed per page. If there are more pipeline + + /* PageSize. + + The number of pipeline versions to be listed per page. If there are more pipeline versions than this number, the response message will contain a valid value in the nextPageToken field. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the results page. + /* PageToken. + + A page token to request the results page. */ PageToken *string - /*PipelineID - Required input. ID of the parent pipeline. + /* PipelineID. + + Required input. ID of the parent pipeline. */ PipelineID string - /*SortBy - Sorting order in form of "field_name", "field_name asc" or "field_name desc". - Ascending by default. + /* SortBy. + + Sorting order in form of "field_name", "field_name asc" or "field_name desc". + Ascending by default. */ SortBy *string @@ -97,6 +103,21 @@ type PipelineServiceListPipelineVersionsParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service list pipeline versions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelineVersionsParams) WithDefaults() *PipelineServiceListPipelineVersionsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service list pipeline versions params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelineVersionsParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service list pipeline versions params func (o *PipelineServiceListPipelineVersionsParams) WithTimeout(timeout time.Duration) *PipelineServiceListPipelineVersionsParams { o.SetTimeout(timeout) @@ -197,48 +218,51 @@ func (o *PipelineServiceListPipelineVersionsParams) WriteToRequest(r runtime.Cli // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } // path param pipeline_id @@ -250,16 +274,17 @@ func (o *PipelineServiceListPipelineVersionsParams) WriteToRequest(r runtime.Cli // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_responses.go index 35a59bd3344..673146a08fb 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipeline_versions_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceListPipelineVersionsReader is a Reader for the PipelineServiceListPipelineVersions structure. @@ -24,14 +24,12 @@ type PipelineServiceListPipelineVersionsReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceListPipelineVersionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceListPipelineVersionsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceListPipelineVersionsDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceListPipelineVersionsOK() *PipelineServiceListPipelineVers return &PipelineServiceListPipelineVersionsOK{} } -/*PipelineServiceListPipelineVersionsOK handles this case with default header values. +/* +PipelineServiceListPipelineVersionsOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceListPipelineVersionsOK struct { Payload *pipeline_model.V2beta1ListPipelineVersionsResponse } +// IsSuccess returns true when this pipeline service list pipeline versions o k response has a 2xx status code +func (o *PipelineServiceListPipelineVersionsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service list pipeline versions o k response has a 3xx status code +func (o *PipelineServiceListPipelineVersionsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service list pipeline versions o k response has a 4xx status code +func (o *PipelineServiceListPipelineVersionsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service list pipeline versions o k response has a 5xx status code +func (o *PipelineServiceListPipelineVersionsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service list pipeline versions o k response a status code equal to that given +func (o *PipelineServiceListPipelineVersionsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service list pipeline versions o k response +func (o *PipelineServiceListPipelineVersionsOK) Code() int { + return 200 +} + func (o *PipelineServiceListPipelineVersionsOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] pipelineServiceListPipelineVersionsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] pipelineServiceListPipelineVersionsOK %s", 200, payload) +} + +func (o *PipelineServiceListPipelineVersionsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] pipelineServiceListPipelineVersionsOK %s", 200, payload) +} + +func (o *PipelineServiceListPipelineVersionsOK) GetPayload() *pipeline_model.V2beta1ListPipelineVersionsResponse { + return o.Payload } func (o *PipelineServiceListPipelineVersionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceListPipelineVersionsDefault(code int) *PipelineServiceLis } } -/*PipelineServiceListPipelineVersionsDefault handles this case with default header values. +/* +PipelineServiceListPipelineVersionsDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceListPipelineVersionsDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service list pipeline versions default response has a 2xx status code +func (o *PipelineServiceListPipelineVersionsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service list pipeline versions default response has a 3xx status code +func (o *PipelineServiceListPipelineVersionsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service list pipeline versions default response has a 4xx status code +func (o *PipelineServiceListPipelineVersionsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service list pipeline versions default response has a 5xx status code +func (o *PipelineServiceListPipelineVersionsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service list pipeline versions default response a status code equal to that given +func (o *PipelineServiceListPipelineVersionsDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service list pipeline versions default response @@ -96,12 +161,22 @@ func (o *PipelineServiceListPipelineVersionsDefault) Code() int { } func (o *PipelineServiceListPipelineVersionsDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] PipelineService_ListPipelineVersions default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] PipelineService_ListPipelineVersions default %s", o._statusCode, payload) +} + +func (o *PipelineServiceListPipelineVersionsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines/{pipeline_id}/versions][%d] PipelineService_ListPipelineVersions default %s", o._statusCode, payload) +} + +func (o *PipelineServiceListPipelineVersionsDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceListPipelineVersionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_parameters.go index 7fcb5e89fd8..f3ef2b280cd 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_parameters.go @@ -13,82 +13,88 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewPipelineServiceListPipelinesParams creates a new PipelineServiceListPipelinesParams object -// with the default values initialized. +// NewPipelineServiceListPipelinesParams creates a new PipelineServiceListPipelinesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewPipelineServiceListPipelinesParams() *PipelineServiceListPipelinesParams { - var () return &PipelineServiceListPipelinesParams{ - timeout: cr.DefaultTimeout, } } // NewPipelineServiceListPipelinesParamsWithTimeout creates a new PipelineServiceListPipelinesParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewPipelineServiceListPipelinesParamsWithTimeout(timeout time.Duration) *PipelineServiceListPipelinesParams { - var () return &PipelineServiceListPipelinesParams{ - timeout: timeout, } } // NewPipelineServiceListPipelinesParamsWithContext creates a new PipelineServiceListPipelinesParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewPipelineServiceListPipelinesParamsWithContext(ctx context.Context) *PipelineServiceListPipelinesParams { - var () return &PipelineServiceListPipelinesParams{ - Context: ctx, } } // NewPipelineServiceListPipelinesParamsWithHTTPClient creates a new PipelineServiceListPipelinesParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewPipelineServiceListPipelinesParamsWithHTTPClient(client *http.Client) *PipelineServiceListPipelinesParams { - var () return &PipelineServiceListPipelinesParams{ HTTPClient: client, } } -/*PipelineServiceListPipelinesParams contains all the parameters to send to the API endpoint -for the pipeline service list pipelines operation typically these are written to a http.Request +/* +PipelineServiceListPipelinesParams contains all the parameters to send to the API endpoint + + for the pipeline service list pipelines operation. + + Typically these are written to a http.Request. */ type PipelineServiceListPipelinesParams struct { - /*Filter - A url-encoded, JSON-serialized filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). + /* Filter. + A url-encoded, JSON-serialized filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). */ Filter *string - /*Namespace - Optional input. Namespace for the pipelines. + /* Namespace. + + Optional input. Namespace for the pipelines. */ Namespace *string - /*PageSize - The number of pipelines to be listed per page. If there are more pipelines + + /* PageSize. + + The number of pipelines to be listed per page. If there are more pipelines than this number, the response message will contain a valid value in the nextPageToken field. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the results page. + /* PageToken. + + A page token to request the results page. */ PageToken *string - /*SortBy - Sorting order in form of "field_name", "field_name asc" or "field_name desc". - Ascending by default. + /* SortBy. + + Sorting order in form of "field_name", "field_name asc" or "field_name desc". + Ascending by default. */ SortBy *string @@ -97,6 +103,21 @@ type PipelineServiceListPipelinesParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the pipeline service list pipelines params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelinesParams) WithDefaults() *PipelineServiceListPipelinesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the pipeline service list pipelines params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *PipelineServiceListPipelinesParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the pipeline service list pipelines params func (o *PipelineServiceListPipelinesParams) WithTimeout(timeout time.Duration) *PipelineServiceListPipelinesParams { o.SetTimeout(timeout) @@ -197,80 +218,85 @@ func (o *PipelineServiceListPipelinesParams) WriteToRequest(r runtime.ClientRequ // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.Namespace != nil { // query param namespace var qrNamespace string + if o.Namespace != nil { qrNamespace = *o.Namespace } qNamespace := qrNamespace if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_responses.go b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_responses.go index 7c93e49b258..641e8135885 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_client/pipeline_service/pipeline_service_list_pipelines_responses.go @@ -6,14 +6,14 @@ package pipeline_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_model" ) // PipelineServiceListPipelinesReader is a Reader for the PipelineServiceListPipelines structure. @@ -24,14 +24,12 @@ type PipelineServiceListPipelinesReader struct { // ReadResponse reads a server response into the received o. func (o *PipelineServiceListPipelinesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewPipelineServiceListPipelinesOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewPipelineServiceListPipelinesDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewPipelineServiceListPipelinesOK() *PipelineServiceListPipelinesOK { return &PipelineServiceListPipelinesOK{} } -/*PipelineServiceListPipelinesOK handles this case with default header values. +/* +PipelineServiceListPipelinesOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type PipelineServiceListPipelinesOK struct { Payload *pipeline_model.V2beta1ListPipelinesResponse } +// IsSuccess returns true when this pipeline service list pipelines o k response has a 2xx status code +func (o *PipelineServiceListPipelinesOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this pipeline service list pipelines o k response has a 3xx status code +func (o *PipelineServiceListPipelinesOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this pipeline service list pipelines o k response has a 4xx status code +func (o *PipelineServiceListPipelinesOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this pipeline service list pipelines o k response has a 5xx status code +func (o *PipelineServiceListPipelinesOK) IsServerError() bool { + return false +} + +// IsCode returns true when this pipeline service list pipelines o k response a status code equal to that given +func (o *PipelineServiceListPipelinesOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the pipeline service list pipelines o k response +func (o *PipelineServiceListPipelinesOK) Code() int { + return 200 +} + func (o *PipelineServiceListPipelinesOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines][%d] pipelineServiceListPipelinesOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines][%d] pipelineServiceListPipelinesOK %s", 200, payload) +} + +func (o *PipelineServiceListPipelinesOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines][%d] pipelineServiceListPipelinesOK %s", 200, payload) +} + +func (o *PipelineServiceListPipelinesOK) GetPayload() *pipeline_model.V2beta1ListPipelinesResponse { + return o.Payload } func (o *PipelineServiceListPipelinesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewPipelineServiceListPipelinesDefault(code int) *PipelineServiceListPipeli } } -/*PipelineServiceListPipelinesDefault handles this case with default header values. +/* +PipelineServiceListPipelinesDefault describes a response with status code -1, with default header values. An unexpected error response. */ type PipelineServiceListPipelinesDefault struct { _statusCode int - Payload *pipeline_model.RuntimeError + Payload *pipeline_model.GooglerpcStatus +} + +// IsSuccess returns true when this pipeline service list pipelines default response has a 2xx status code +func (o *PipelineServiceListPipelinesDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this pipeline service list pipelines default response has a 3xx status code +func (o *PipelineServiceListPipelinesDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this pipeline service list pipelines default response has a 4xx status code +func (o *PipelineServiceListPipelinesDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this pipeline service list pipelines default response has a 5xx status code +func (o *PipelineServiceListPipelinesDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this pipeline service list pipelines default response a status code equal to that given +func (o *PipelineServiceListPipelinesDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the pipeline service list pipelines default response @@ -96,12 +161,22 @@ func (o *PipelineServiceListPipelinesDefault) Code() int { } func (o *PipelineServiceListPipelinesDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/pipelines][%d] PipelineService_ListPipelines default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines][%d] PipelineService_ListPipelines default %s", o._statusCode, payload) +} + +func (o *PipelineServiceListPipelinesDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/pipelines][%d] PipelineService_ListPipelines default %s", o._statusCode, payload) +} + +func (o *PipelineServiceListPipelinesDefault) GetPayload() *pipeline_model.GooglerpcStatus { + return o.Payload } func (o *PipelineServiceListPipelinesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(pipeline_model.RuntimeError) + o.Payload = new(pipeline_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/googlerpc_status.go b/backend/api/v2beta1/go_http_client/pipeline_model/googlerpc_status.go index 6b8a1fa849a..c693c3a254f 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/googlerpc_status.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/googlerpc_status.go @@ -6,11 +6,11 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -21,6 +21,7 @@ import ( // // You can find out more about this error model and how to work with it in the // [API Design Guide](https://cloud.google.com/apis/design/errors). +// // swagger:model googlerpcStatus type GooglerpcStatus struct { @@ -52,7 +53,6 @@ func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { } func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(m.Details) { // not required return nil } @@ -66,6 +66,47 @@ func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { if err := m.Details[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/protobuf_any.go b/backend/api/v2beta1/go_http_client/pipeline_model/protobuf_any.go index fb51adb0990..fba86c1d06b 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/protobuf_any.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/protobuf_any.go @@ -6,9 +6,10 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/protobuf_null_value.go b/backend/api/v2beta1/go_http_client/pipeline_model/protobuf_null_value.go index b1a32585701..82e1e427a2d 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/protobuf_null_value.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/protobuf_null_value.go @@ -6,23 +6,33 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // ProtobufNullValue `NullValue` is a singleton enumeration to represent the null value for the // `Value` type union. // -// The JSON representation for `NullValue` is JSON `null`. +// The JSON representation for `NullValue` is JSON `null`. +// +// - NULL_VALUE: Null value. // -// - NULL_VALUE: Null value. // swagger:model protobufNullValue type ProtobufNullValue string +func NewProtobufNullValue(value ProtobufNullValue) *ProtobufNullValue { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ProtobufNullValue. +func (m ProtobufNullValue) Pointer() *ProtobufNullValue { + return &m +} + const ( // ProtobufNullValueNULLVALUE captures enum value "NULL_VALUE" @@ -43,7 +53,7 @@ func init() { } func (m ProtobufNullValue) validateProtobufNullValueEnum(path, location string, value ProtobufNullValue) error { - if err := validate.Enum(path, location, value, protobufNullValueEnum); err != nil { + if err := validate.EnumCase(path, location, value, protobufNullValueEnum, true); err != nil { return err } return nil @@ -63,3 +73,8 @@ func (m ProtobufNullValue) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this protobuf null value based on context it is used +func (m ProtobufNullValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/runtime_error.go b/backend/api/v2beta1/go_http_client/pipeline_model/runtime_error.go deleted file mode 100644 index b622a5d87fe..00000000000 --- a/backend/api/v2beta1/go_http_client/pipeline_model/runtime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package pipeline_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// RuntimeError runtime error -// swagger:model runtimeError -type RuntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this runtime error -func (m *RuntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeError) UnmarshalBinary(b []byte) error { - var res RuntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_create_pipeline_and_version_request.go b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_create_pipeline_and_version_request.go index e17f36fcc27..154669009f9 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_create_pipeline_and_version_request.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_create_pipeline_and_version_request.go @@ -6,13 +6,15 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1CreatePipelineAndVersionRequest v2beta1 create pipeline and version request +// // swagger:model v2beta1CreatePipelineAndVersionRequest type V2beta1CreatePipelineAndVersionRequest struct { @@ -43,7 +45,6 @@ func (m *V2beta1CreatePipelineAndVersionRequest) Validate(formats strfmt.Registr } func (m *V2beta1CreatePipelineAndVersionRequest) validatePipeline(formats strfmt.Registry) error { - if swag.IsZero(m.Pipeline) { // not required return nil } @@ -52,6 +53,8 @@ func (m *V2beta1CreatePipelineAndVersionRequest) validatePipeline(formats strfmt if err := m.Pipeline.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline") } return err } @@ -61,7 +64,6 @@ func (m *V2beta1CreatePipelineAndVersionRequest) validatePipeline(formats strfmt } func (m *V2beta1CreatePipelineAndVersionRequest) validatePipelineVersion(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineVersion) { // not required return nil } @@ -70,6 +72,68 @@ func (m *V2beta1CreatePipelineAndVersionRequest) validatePipelineVersion(formats if err := m.PipelineVersion.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_version") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_version") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 create pipeline and version request based on the context it is used +func (m *V2beta1CreatePipelineAndVersionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePipeline(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePipelineVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1CreatePipelineAndVersionRequest) contextValidatePipeline(ctx context.Context, formats strfmt.Registry) error { + + if m.Pipeline != nil { + + if swag.IsZero(m.Pipeline) { // not required + return nil + } + + if err := m.Pipeline.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline") + } + return err + } + } + + return nil +} + +func (m *V2beta1CreatePipelineAndVersionRequest) contextValidatePipelineVersion(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineVersion != nil { + + if swag.IsZero(m.PipelineVersion) { // not required + return nil + } + + if err := m.PipelineVersion.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_version") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_version") } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_list_pipeline_versions_response.go b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_list_pipeline_versions_response.go index 8765950ca3f..0692a13bf10 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_list_pipeline_versions_response.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_list_pipeline_versions_response.go @@ -6,15 +6,16 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1ListPipelineVersionsResponse v2beta1 list pipeline versions response +// // swagger:model v2beta1ListPipelineVersionsResponse type V2beta1ListPipelineVersionsResponse struct { @@ -43,7 +44,6 @@ func (m *V2beta1ListPipelineVersionsResponse) Validate(formats strfmt.Registry) } func (m *V2beta1ListPipelineVersionsResponse) validatePipelineVersions(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineVersions) { // not required return nil } @@ -57,6 +57,47 @@ func (m *V2beta1ListPipelineVersionsResponse) validatePipelineVersions(formats s if err := m.PipelineVersions[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_versions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_versions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v2beta1 list pipeline versions response based on the context it is used +func (m *V2beta1ListPipelineVersionsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePipelineVersions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1ListPipelineVersionsResponse) contextValidatePipelineVersions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PipelineVersions); i++ { + + if m.PipelineVersions[i] != nil { + + if swag.IsZero(m.PipelineVersions[i]) { // not required + return nil + } + + if err := m.PipelineVersions[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_versions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_versions" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_list_pipelines_response.go b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_list_pipelines_response.go index e3f0013e1ee..f279082cb3e 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_list_pipelines_response.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_list_pipelines_response.go @@ -6,15 +6,16 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1ListPipelinesResponse v2beta1 list pipelines response +// // swagger:model v2beta1ListPipelinesResponse type V2beta1ListPipelinesResponse struct { @@ -44,7 +45,6 @@ func (m *V2beta1ListPipelinesResponse) Validate(formats strfmt.Registry) error { } func (m *V2beta1ListPipelinesResponse) validatePipelines(formats strfmt.Registry) error { - if swag.IsZero(m.Pipelines) { // not required return nil } @@ -58,6 +58,47 @@ func (m *V2beta1ListPipelinesResponse) validatePipelines(formats strfmt.Registry if err := m.Pipelines[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v2beta1 list pipelines response based on the context it is used +func (m *V2beta1ListPipelinesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePipelines(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1ListPipelinesResponse) contextValidatePipelines(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Pipelines); i++ { + + if m.Pipelines[i] != nil { + + if swag.IsZero(m.Pipelines[i]) { // not required + return nil + } + + if err := m.Pipelines[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipelines" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipelines" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_pipeline.go b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_pipeline.go index 93a299e2bf7..f29b1c6307e 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_pipeline.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_pipeline.go @@ -6,14 +6,16 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1Pipeline v2beta1 pipeline +// // swagger:model v2beta1Pipeline type V2beta1Pipeline struct { @@ -63,7 +65,6 @@ func (m *V2beta1Pipeline) Validate(formats strfmt.Registry) error { } func (m *V2beta1Pipeline) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -76,7 +77,6 @@ func (m *V2beta1Pipeline) validateCreatedAt(formats strfmt.Registry) error { } func (m *V2beta1Pipeline) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required return nil } @@ -85,6 +85,43 @@ func (m *V2beta1Pipeline) validateError(formats strfmt.Registry) error { if err := m.Error.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 pipeline based on the context it is used +func (m *V2beta1Pipeline) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1Pipeline) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_pipeline_version.go b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_pipeline_version.go index 0e323131a38..24508b9d004 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_pipeline_version.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_pipeline_version.go @@ -6,14 +6,16 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1PipelineVersion v2beta1 pipeline version +// // swagger:model v2beta1PipelineVersion type V2beta1PipelineVersion struct { @@ -84,7 +86,6 @@ func (m *V2beta1PipelineVersion) Validate(formats strfmt.Registry) error { } func (m *V2beta1PipelineVersion) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -97,7 +98,6 @@ func (m *V2beta1PipelineVersion) validateCreatedAt(formats strfmt.Registry) erro } func (m *V2beta1PipelineVersion) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required return nil } @@ -106,6 +106,8 @@ func (m *V2beta1PipelineVersion) validateError(formats strfmt.Registry) error { if err := m.Error.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") } return err } @@ -115,7 +117,6 @@ func (m *V2beta1PipelineVersion) validateError(formats strfmt.Registry) error { } func (m *V2beta1PipelineVersion) validatePackageURL(formats strfmt.Registry) error { - if swag.IsZero(m.PackageURL) { // not required return nil } @@ -124,6 +125,68 @@ func (m *V2beta1PipelineVersion) validatePackageURL(formats strfmt.Registry) err if err := m.PackageURL.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 pipeline version based on the context it is used +func (m *V2beta1PipelineVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePackageURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1PipelineVersion) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *V2beta1PipelineVersion) contextValidatePackageURL(ctx context.Context, formats strfmt.Registry) error { + + if m.PackageURL != nil { + + if swag.IsZero(m.PackageURL) { // not required + return nil + } + + if err := m.PackageURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_url.go b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_url.go index 3b167fedbde..cb4c267f6aa 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_url.go +++ b/backend/api/v2beta1/go_http_client/pipeline_model/v2beta1_url.go @@ -6,12 +6,14 @@ package pipeline_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1URL v2beta1 Url +// // swagger:model v2beta1Url type V2beta1URL struct { @@ -24,6 +26,11 @@ func (m *V2beta1URL) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v2beta1 Url based on context it is used +func (m *V2beta1URL) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1URL) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_client.go b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_client.go index 32e48929fc1..5d8d7829576 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_client.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_client.go @@ -8,8 +8,7 @@ package pipeline_upload_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PipelineUp cli := new(PipelineUpload) cli.Transport = transport - cli.PipelineUploadService = pipeline_upload_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // PipelineUpload is a client for pipeline upload type PipelineUpload struct { - PipelineUploadService *pipeline_upload_service.Client + PipelineUploadService pipeline_upload_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type PipelineUpload struct { // SetTransport changes the transport on the client and all its subresources func (c *PipelineUpload) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.PipelineUploadService.SetTransport(transport) - } diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go index 0e86bf15295..5fa7ead4322 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/pipeline_upload_service_client.go @@ -7,15 +7,40 @@ package pipeline_upload_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new pipeline upload service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new pipeline upload service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new pipeline upload service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for pipeline upload service API */ @@ -24,16 +49,51 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// This client is generated with a few options you might find useful for your swagger spec. +// +// Feel free to add you own set of options. + +// WithContentType allows the client to force the Content-Type header +// to negotiate a specific Consumer from the server. +// +// You may use this option to set arbitrary extensions to your MIME media type. +func WithContentType(mime string) ClientOption { + return func(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{mime} + } +} + +// WithContentTypeApplicationJSON sets the Content-Type header to "application/json". +func WithContentTypeApplicationJSON(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{"application/json"} +} + +// WithContentTypeMultipartFormData sets the Content-Type header to "multipart/form-data". +func WithContentTypeMultipartFormData(r *runtime.ClientOperation) { + r.ConsumesMediaTypes = []string{"multipart/form-data"} +} + +// ClientService is the interface for Client methods +type ClientService interface { + UploadPipeline(params *UploadPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPipelineOK, error) + + UploadPipelineVersion(params *UploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPipelineVersionOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* UploadPipeline upload pipeline API */ -func (a *Client) UploadPipeline(params *UploadPipelineParams, authInfo runtime.ClientAuthInfoWriter) (*UploadPipelineOK, error) { +func (a *Client) UploadPipeline(params *UploadPipelineParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPipelineOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUploadPipelineParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "UploadPipeline", Method: "POST", PathPattern: "/apis/v2beta1/pipelines/upload", @@ -45,24 +105,33 @@ func (a *Client) UploadPipeline(params *UploadPipelineParams, authInfo runtime.C AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UploadPipelineOK), nil - + success, ok := result.(*UploadPipelineOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*UploadPipelineDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* UploadPipelineVersion upload pipeline version API */ -func (a *Client) UploadPipelineVersion(params *UploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter) (*UploadPipelineVersionOK, error) { +func (a *Client) UploadPipelineVersion(params *UploadPipelineVersionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPipelineVersionOK, error) { // TODO: Validate the params before sending if params == nil { params = NewUploadPipelineVersionParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "UploadPipelineVersion", Method: "POST", PathPattern: "/apis/v2beta1/pipelines/upload_version", @@ -74,12 +143,22 @@ func (a *Client) UploadPipelineVersion(params *UploadPipelineVersionParams, auth AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*UploadPipelineVersionOK), nil - + success, ok := result.(*UploadPipelineVersionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*UploadPipelineVersionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go index 8973d65a536..4bd2e970768 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_parameters.go @@ -13,65 +13,69 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewUploadPipelineParams creates a new UploadPipelineParams object -// with the default values initialized. +// NewUploadPipelineParams creates a new UploadPipelineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewUploadPipelineParams() *UploadPipelineParams { - var () return &UploadPipelineParams{ - timeout: cr.DefaultTimeout, } } // NewUploadPipelineParamsWithTimeout creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewUploadPipelineParamsWithTimeout(timeout time.Duration) *UploadPipelineParams { - var () return &UploadPipelineParams{ - timeout: timeout, } } // NewUploadPipelineParamsWithContext creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewUploadPipelineParamsWithContext(ctx context.Context) *UploadPipelineParams { - var () return &UploadPipelineParams{ - Context: ctx, } } // NewUploadPipelineParamsWithHTTPClient creates a new UploadPipelineParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewUploadPipelineParamsWithHTTPClient(client *http.Client) *UploadPipelineParams { - var () return &UploadPipelineParams{ HTTPClient: client, } } -/*UploadPipelineParams contains all the parameters to send to the API endpoint -for the upload pipeline operation typically these are written to a http.Request +/* +UploadPipelineParams contains all the parameters to send to the API endpoint + + for the upload pipeline operation. + + Typically these are written to a http.Request. */ type UploadPipelineParams struct { - /*Description*/ + // Description. Description *string - /*DisplayName*/ + + // DisplayName. DisplayName *string - /*Name*/ + + // Name. Name *string - /*Namespace*/ + + // Namespace. Namespace *string - /*Uploadfile - The pipeline to upload. Maximum size of 32MB is supported. + /* Uploadfile. + + The pipeline to upload. Maximum size of 32MB is supported. */ Uploadfile runtime.NamedReadCloser @@ -80,6 +84,21 @@ type UploadPipelineParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the upload pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadPipelineParams) WithDefaults() *UploadPipelineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the upload pipeline params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadPipelineParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the upload pipeline params func (o *UploadPipelineParams) WithTimeout(timeout time.Duration) *UploadPipelineParams { o.SetTimeout(timeout) @@ -180,66 +199,69 @@ func (o *UploadPipelineParams) WriteToRequest(r runtime.ClientRequest, reg strfm // query param description var qrDescription string + if o.Description != nil { qrDescription = *o.Description } qDescription := qrDescription if qDescription != "" { + if err := r.SetQueryParam("description", qDescription); err != nil { return err } } - } if o.DisplayName != nil { // query param display_name var qrDisplayName string + if o.DisplayName != nil { qrDisplayName = *o.DisplayName } qDisplayName := qrDisplayName if qDisplayName != "" { + if err := r.SetQueryParam("display_name", qDisplayName); err != nil { return err } } - } if o.Name != nil { // query param name var qrName string + if o.Name != nil { qrName = *o.Name } qName := qrName if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { return err } } - } if o.Namespace != nil { // query param namespace var qrNamespace string + if o.Namespace != nil { qrNamespace = *o.Namespace } qNamespace := qrNamespace if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { return err } } - } - // form file param uploadfile if err := r.SetFileParam("uploadfile", o.Uploadfile); err != nil { return err diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go index beccd61bfe4..3f5479cf0dc 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_responses.go @@ -6,14 +6,14 @@ package pipeline_upload_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_upload_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_upload_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_upload_model" ) // UploadPipelineReader is a Reader for the UploadPipeline structure. @@ -24,14 +24,12 @@ type UploadPipelineReader struct { // ReadResponse reads a server response into the received o. func (o *UploadPipelineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewUploadPipelineOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewUploadPipelineDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewUploadPipelineOK() *UploadPipelineOK { return &UploadPipelineOK{} } -/*UploadPipelineOK handles this case with default header values. +/* +UploadPipelineOK describes a response with status code 200, with default header values. UploadPipelineOK upload pipeline o k */ @@ -57,8 +56,48 @@ type UploadPipelineOK struct { Payload *pipeline_upload_model.V2beta1Pipeline } +// IsSuccess returns true when this upload pipeline o k response has a 2xx status code +func (o *UploadPipelineOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this upload pipeline o k response has a 3xx status code +func (o *UploadPipelineOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this upload pipeline o k response has a 4xx status code +func (o *UploadPipelineOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this upload pipeline o k response has a 5xx status code +func (o *UploadPipelineOK) IsServerError() bool { + return false +} + +// IsCode returns true when this upload pipeline o k response a status code equal to that given +func (o *UploadPipelineOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the upload pipeline o k response +func (o *UploadPipelineOK) Code() int { + return 200 +} + func (o *UploadPipelineOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload][%d] uploadPipelineOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload][%d] uploadPipelineOK %s", 200, payload) +} + +func (o *UploadPipelineOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload][%d] uploadPipelineOK %s", 200, payload) +} + +func (o *UploadPipelineOK) GetPayload() *pipeline_upload_model.V2beta1Pipeline { + return o.Payload } func (o *UploadPipelineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,7 +119,8 @@ func NewUploadPipelineDefault(code int) *UploadPipelineDefault { } } -/*UploadPipelineDefault handles this case with default header values. +/* +UploadPipelineDefault describes a response with status code -1, with default header values. UploadPipelineDefault upload pipeline default */ @@ -90,13 +130,48 @@ type UploadPipelineDefault struct { Payload *pipeline_upload_model.GooglerpcStatus } +// IsSuccess returns true when this upload pipeline default response has a 2xx status code +func (o *UploadPipelineDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this upload pipeline default response has a 3xx status code +func (o *UploadPipelineDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this upload pipeline default response has a 4xx status code +func (o *UploadPipelineDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this upload pipeline default response has a 5xx status code +func (o *UploadPipelineDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this upload pipeline default response a status code equal to that given +func (o *UploadPipelineDefault) IsCode(code int) bool { + return o._statusCode == code +} + // Code gets the status code for the upload pipeline default response func (o *UploadPipelineDefault) Code() int { return o._statusCode } func (o *UploadPipelineDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload][%d] UploadPipeline default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload][%d] UploadPipeline default %s", o._statusCode, payload) +} + +func (o *UploadPipelineDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload][%d] UploadPipeline default %s", o._statusCode, payload) +} + +func (o *UploadPipelineDefault) GetPayload() *pipeline_upload_model.GooglerpcStatus { + return o.Payload } func (o *UploadPipelineDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go index 22172771f1e..74a82210c7b 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_parameters.go @@ -13,65 +13,69 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewUploadPipelineVersionParams creates a new UploadPipelineVersionParams object -// with the default values initialized. +// NewUploadPipelineVersionParams creates a new UploadPipelineVersionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewUploadPipelineVersionParams() *UploadPipelineVersionParams { - var () return &UploadPipelineVersionParams{ - timeout: cr.DefaultTimeout, } } // NewUploadPipelineVersionParamsWithTimeout creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewUploadPipelineVersionParamsWithTimeout(timeout time.Duration) *UploadPipelineVersionParams { - var () return &UploadPipelineVersionParams{ - timeout: timeout, } } // NewUploadPipelineVersionParamsWithContext creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewUploadPipelineVersionParamsWithContext(ctx context.Context) *UploadPipelineVersionParams { - var () return &UploadPipelineVersionParams{ - Context: ctx, } } // NewUploadPipelineVersionParamsWithHTTPClient creates a new UploadPipelineVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewUploadPipelineVersionParamsWithHTTPClient(client *http.Client) *UploadPipelineVersionParams { - var () return &UploadPipelineVersionParams{ HTTPClient: client, } } -/*UploadPipelineVersionParams contains all the parameters to send to the API endpoint -for the upload pipeline version operation typically these are written to a http.Request +/* +UploadPipelineVersionParams contains all the parameters to send to the API endpoint + + for the upload pipeline version operation. + + Typically these are written to a http.Request. */ type UploadPipelineVersionParams struct { - /*Description*/ + // Description. Description *string - /*DisplayName*/ + + // DisplayName. DisplayName *string - /*Name*/ + + // Name. Name *string - /*Pipelineid*/ + + // Pipelineid. Pipelineid *string - /*Uploadfile - The pipeline to upload. Maximum size of 32MB is supported. + /* Uploadfile. + + The pipeline to upload. Maximum size of 32MB is supported. */ Uploadfile runtime.NamedReadCloser @@ -80,6 +84,21 @@ type UploadPipelineVersionParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the upload pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadPipelineVersionParams) WithDefaults() *UploadPipelineVersionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the upload pipeline version params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UploadPipelineVersionParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the upload pipeline version params func (o *UploadPipelineVersionParams) WithTimeout(timeout time.Duration) *UploadPipelineVersionParams { o.SetTimeout(timeout) @@ -180,66 +199,69 @@ func (o *UploadPipelineVersionParams) WriteToRequest(r runtime.ClientRequest, re // query param description var qrDescription string + if o.Description != nil { qrDescription = *o.Description } qDescription := qrDescription if qDescription != "" { + if err := r.SetQueryParam("description", qDescription); err != nil { return err } } - } if o.DisplayName != nil { // query param display_name var qrDisplayName string + if o.DisplayName != nil { qrDisplayName = *o.DisplayName } qDisplayName := qrDisplayName if qDisplayName != "" { + if err := r.SetQueryParam("display_name", qDisplayName); err != nil { return err } } - } if o.Name != nil { // query param name var qrName string + if o.Name != nil { qrName = *o.Name } qName := qrName if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { return err } } - } if o.Pipelineid != nil { // query param pipelineid var qrPipelineid string + if o.Pipelineid != nil { qrPipelineid = *o.Pipelineid } qPipelineid := qrPipelineid if qPipelineid != "" { + if err := r.SetQueryParam("pipelineid", qPipelineid); err != nil { return err } } - } - // form file param uploadfile if err := r.SetFileParam("uploadfile", o.Uploadfile); err != nil { return err diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go index d7364ac772a..099d8577e92 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_client/pipeline_upload_service/upload_pipeline_version_responses.go @@ -6,14 +6,14 @@ package pipeline_upload_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - pipeline_upload_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_upload_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/pipeline_upload_model" ) // UploadPipelineVersionReader is a Reader for the UploadPipelineVersion structure. @@ -24,14 +24,12 @@ type UploadPipelineVersionReader struct { // ReadResponse reads a server response into the received o. func (o *UploadPipelineVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewUploadPipelineVersionOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewUploadPipelineVersionDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewUploadPipelineVersionOK() *UploadPipelineVersionOK { return &UploadPipelineVersionOK{} } -/*UploadPipelineVersionOK handles this case with default header values. +/* +UploadPipelineVersionOK describes a response with status code 200, with default header values. UploadPipelineVersionOK upload pipeline version o k */ @@ -57,8 +56,48 @@ type UploadPipelineVersionOK struct { Payload *pipeline_upload_model.V2beta1PipelineVersion } +// IsSuccess returns true when this upload pipeline version o k response has a 2xx status code +func (o *UploadPipelineVersionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this upload pipeline version o k response has a 3xx status code +func (o *UploadPipelineVersionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this upload pipeline version o k response has a 4xx status code +func (o *UploadPipelineVersionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this upload pipeline version o k response has a 5xx status code +func (o *UploadPipelineVersionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this upload pipeline version o k response a status code equal to that given +func (o *UploadPipelineVersionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the upload pipeline version o k response +func (o *UploadPipelineVersionOK) Code() int { + return 200 +} + func (o *UploadPipelineVersionOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload_version][%d] uploadPipelineVersionOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload_version][%d] uploadPipelineVersionOK %s", 200, payload) +} + +func (o *UploadPipelineVersionOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload_version][%d] uploadPipelineVersionOK %s", 200, payload) +} + +func (o *UploadPipelineVersionOK) GetPayload() *pipeline_upload_model.V2beta1PipelineVersion { + return o.Payload } func (o *UploadPipelineVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,7 +119,8 @@ func NewUploadPipelineVersionDefault(code int) *UploadPipelineVersionDefault { } } -/*UploadPipelineVersionDefault handles this case with default header values. +/* +UploadPipelineVersionDefault describes a response with status code -1, with default header values. UploadPipelineVersionDefault upload pipeline version default */ @@ -90,13 +130,48 @@ type UploadPipelineVersionDefault struct { Payload *pipeline_upload_model.GooglerpcStatus } +// IsSuccess returns true when this upload pipeline version default response has a 2xx status code +func (o *UploadPipelineVersionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this upload pipeline version default response has a 3xx status code +func (o *UploadPipelineVersionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this upload pipeline version default response has a 4xx status code +func (o *UploadPipelineVersionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this upload pipeline version default response has a 5xx status code +func (o *UploadPipelineVersionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this upload pipeline version default response a status code equal to that given +func (o *UploadPipelineVersionDefault) IsCode(code int) bool { + return o._statusCode == code +} + // Code gets the status code for the upload pipeline version default response func (o *UploadPipelineVersionDefault) Code() int { return o._statusCode } func (o *UploadPipelineVersionDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload_version][%d] UploadPipelineVersion default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload_version][%d] UploadPipelineVersion default %s", o._statusCode, payload) +} + +func (o *UploadPipelineVersionDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/pipelines/upload_version][%d] UploadPipelineVersion default %s", o._statusCode, payload) +} + +func (o *UploadPipelineVersionDefault) GetPayload() *pipeline_upload_model.GooglerpcStatus { + return o.Payload } func (o *UploadPipelineVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_model/googlerpc_status.go b/backend/api/v2beta1/go_http_client/pipeline_upload_model/googlerpc_status.go index 15fca7b664b..58d7931ed35 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_model/googlerpc_status.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_model/googlerpc_status.go @@ -6,11 +6,11 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -21,6 +21,7 @@ import ( // // You can find out more about this error model and how to work with it in the // [API Design Guide](https://cloud.google.com/apis/design/errors). +// // swagger:model googlerpcStatus type GooglerpcStatus struct { @@ -52,7 +53,6 @@ func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { } func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(m.Details) { // not required return nil } @@ -66,6 +66,47 @@ func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { if err := m.Details[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_model/protobuf_any.go b/backend/api/v2beta1/go_http_client/pipeline_upload_model/protobuf_any.go index 80a4d4cd71f..3031bdebdde 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_model/protobuf_any.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_model/protobuf_any.go @@ -6,9 +6,9 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,42 +20,42 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -63,34 +63,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON // ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -129,26 +129,11 @@ type ProtobufAny struct { // Validate validates this protobuf any func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateValue(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { - - if swag.IsZero(m.Value) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_pipeline.go b/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_pipeline.go index 10e115525bb..34b18903e2b 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_pipeline.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_pipeline.go @@ -6,14 +6,16 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1Pipeline v2beta1 pipeline +// // swagger:model v2beta1Pipeline type V2beta1Pipeline struct { @@ -63,7 +65,6 @@ func (m *V2beta1Pipeline) Validate(formats strfmt.Registry) error { } func (m *V2beta1Pipeline) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -76,7 +77,6 @@ func (m *V2beta1Pipeline) validateCreatedAt(formats strfmt.Registry) error { } func (m *V2beta1Pipeline) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required return nil } @@ -85,6 +85,43 @@ func (m *V2beta1Pipeline) validateError(formats strfmt.Registry) error { if err := m.Error.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 pipeline based on the context it is used +func (m *V2beta1Pipeline) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1Pipeline) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_pipeline_version.go b/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_pipeline_version.go index 979104ca072..a9704ebba12 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_pipeline_version.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_pipeline_version.go @@ -6,14 +6,16 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1PipelineVersion v2beta1 pipeline version +// // swagger:model v2beta1PipelineVersion type V2beta1PipelineVersion struct { @@ -80,7 +82,6 @@ func (m *V2beta1PipelineVersion) Validate(formats strfmt.Registry) error { } func (m *V2beta1PipelineVersion) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -93,7 +94,6 @@ func (m *V2beta1PipelineVersion) validateCreatedAt(formats strfmt.Registry) erro } func (m *V2beta1PipelineVersion) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required return nil } @@ -102,6 +102,8 @@ func (m *V2beta1PipelineVersion) validateError(formats strfmt.Registry) error { if err := m.Error.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") } return err } @@ -111,7 +113,6 @@ func (m *V2beta1PipelineVersion) validateError(formats strfmt.Registry) error { } func (m *V2beta1PipelineVersion) validatePackageURL(formats strfmt.Registry) error { - if swag.IsZero(m.PackageURL) { // not required return nil } @@ -120,6 +121,68 @@ func (m *V2beta1PipelineVersion) validatePackageURL(formats strfmt.Registry) err if err := m.PackageURL.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 pipeline version based on the context it is used +func (m *V2beta1PipelineVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePackageURL(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1PipelineVersion) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *V2beta1PipelineVersion) contextValidatePackageURL(ctx context.Context, formats strfmt.Registry) error { + + if m.PackageURL != nil { + + if swag.IsZero(m.PackageURL) { // not required + return nil + } + + if err := m.PackageURL.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("package_url") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("package_url") } return err } diff --git a/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_url.go b/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_url.go index 0a8ea1c8758..f9f273499fd 100644 --- a/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_url.go +++ b/backend/api/v2beta1/go_http_client/pipeline_upload_model/v2beta1_url.go @@ -6,12 +6,14 @@ package pipeline_upload_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1URL v2beta1 Url +// // swagger:model v2beta1Url type V2beta1URL struct { @@ -24,6 +26,11 @@ func (m *V2beta1URL) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v2beta1 Url based on context it is used +func (m *V2beta1URL) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1URL) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_client.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_client.go index 8eea9a41bd2..1498270d778 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_client.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_client.go @@ -8,8 +8,7 @@ package recurring_run_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *RecurringR cli := new(RecurringRun) cli.Transport = transport - cli.RecurringRunService = recurring_run_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // RecurringRun is a client for recurring run type RecurringRun struct { - RecurringRunService *recurring_run_service.Client + RecurringRunService recurring_run_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type RecurringRun struct { // SetTransport changes the transport on the client and all its subresources func (c *RecurringRun) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.RecurringRunService.SetTransport(transport) - } diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_client.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_client.go index 0af258f1b63..286ff12f685 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_client.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_client.go @@ -7,15 +7,40 @@ package recurring_run_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new recurring run service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new recurring run service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new recurring run service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for recurring run service API */ @@ -24,16 +49,35 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + RecurringRunServiceCreateRecurringRun(params *RecurringRunServiceCreateRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceCreateRecurringRunOK, error) + + RecurringRunServiceDeleteRecurringRun(params *RecurringRunServiceDeleteRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceDeleteRecurringRunOK, error) + + RecurringRunServiceDisableRecurringRun(params *RecurringRunServiceDisableRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceDisableRecurringRunOK, error) + + RecurringRunServiceEnableRecurringRun(params *RecurringRunServiceEnableRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceEnableRecurringRunOK, error) + + RecurringRunServiceGetRecurringRun(params *RecurringRunServiceGetRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceGetRecurringRunOK, error) + + RecurringRunServiceListRecurringRuns(params *RecurringRunServiceListRecurringRunsParams, opts ...ClientOption) (*RecurringRunServiceListRecurringRunsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* RecurringRunServiceCreateRecurringRun creates a new recurring run in an experiment given the experiment ID */ -func (a *Client) RecurringRunServiceCreateRecurringRun(params *RecurringRunServiceCreateRecurringRunParams) (*RecurringRunServiceCreateRecurringRunOK, error) { +func (a *Client) RecurringRunServiceCreateRecurringRun(params *RecurringRunServiceCreateRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceCreateRecurringRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRecurringRunServiceCreateRecurringRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RecurringRunService_CreateRecurringRun", Method: "POST", PathPattern: "/apis/v2beta1/recurringruns", @@ -44,24 +88,33 @@ func (a *Client) RecurringRunServiceCreateRecurringRun(params *RecurringRunServi Reader: &RecurringRunServiceCreateRecurringRunReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RecurringRunServiceCreateRecurringRunOK), nil - + success, ok := result.(*RecurringRunServiceCreateRecurringRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RecurringRunServiceCreateRecurringRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RecurringRunServiceDeleteRecurringRun deletes a recurring run */ -func (a *Client) RecurringRunServiceDeleteRecurringRun(params *RecurringRunServiceDeleteRecurringRunParams) (*RecurringRunServiceDeleteRecurringRunOK, error) { +func (a *Client) RecurringRunServiceDeleteRecurringRun(params *RecurringRunServiceDeleteRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceDeleteRecurringRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRecurringRunServiceDeleteRecurringRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RecurringRunService_DeleteRecurringRun", Method: "DELETE", PathPattern: "/apis/v2beta1/recurringruns/{recurring_run_id}", @@ -72,24 +125,33 @@ func (a *Client) RecurringRunServiceDeleteRecurringRun(params *RecurringRunServi Reader: &RecurringRunServiceDeleteRecurringRunReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RecurringRunServiceDeleteRecurringRunOK), nil - + success, ok := result.(*RecurringRunServiceDeleteRecurringRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RecurringRunServiceDeleteRecurringRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RecurringRunServiceDisableRecurringRun stops a recurring run and all its associated runs the recurring run is not deleted */ -func (a *Client) RecurringRunServiceDisableRecurringRun(params *RecurringRunServiceDisableRecurringRunParams) (*RecurringRunServiceDisableRecurringRunOK, error) { +func (a *Client) RecurringRunServiceDisableRecurringRun(params *RecurringRunServiceDisableRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceDisableRecurringRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRecurringRunServiceDisableRecurringRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RecurringRunService_DisableRecurringRun", Method: "POST", PathPattern: "/apis/v2beta1/recurringruns/{recurring_run_id}:disable", @@ -100,24 +162,33 @@ func (a *Client) RecurringRunServiceDisableRecurringRun(params *RecurringRunServ Reader: &RecurringRunServiceDisableRecurringRunReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RecurringRunServiceDisableRecurringRunOK), nil - + success, ok := result.(*RecurringRunServiceDisableRecurringRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RecurringRunServiceDisableRecurringRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RecurringRunServiceEnableRecurringRun restarts a recurring run that was previously stopped all runs associated with the recurring run will continue */ -func (a *Client) RecurringRunServiceEnableRecurringRun(params *RecurringRunServiceEnableRecurringRunParams) (*RecurringRunServiceEnableRecurringRunOK, error) { +func (a *Client) RecurringRunServiceEnableRecurringRun(params *RecurringRunServiceEnableRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceEnableRecurringRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRecurringRunServiceEnableRecurringRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RecurringRunService_EnableRecurringRun", Method: "POST", PathPattern: "/apis/v2beta1/recurringruns/{recurring_run_id}:enable", @@ -128,24 +199,33 @@ func (a *Client) RecurringRunServiceEnableRecurringRun(params *RecurringRunServi Reader: &RecurringRunServiceEnableRecurringRunReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RecurringRunServiceEnableRecurringRunOK), nil - + success, ok := result.(*RecurringRunServiceEnableRecurringRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RecurringRunServiceEnableRecurringRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RecurringRunServiceGetRecurringRun finds a specific recurring run by ID */ -func (a *Client) RecurringRunServiceGetRecurringRun(params *RecurringRunServiceGetRecurringRunParams) (*RecurringRunServiceGetRecurringRunOK, error) { +func (a *Client) RecurringRunServiceGetRecurringRun(params *RecurringRunServiceGetRecurringRunParams, opts ...ClientOption) (*RecurringRunServiceGetRecurringRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRecurringRunServiceGetRecurringRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RecurringRunService_GetRecurringRun", Method: "GET", PathPattern: "/apis/v2beta1/recurringruns/{recurring_run_id}", @@ -156,24 +236,33 @@ func (a *Client) RecurringRunServiceGetRecurringRun(params *RecurringRunServiceG Reader: &RecurringRunServiceGetRecurringRunReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RecurringRunServiceGetRecurringRunOK), nil - + success, ok := result.(*RecurringRunServiceGetRecurringRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RecurringRunServiceGetRecurringRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RecurringRunServiceListRecurringRuns finds all recurring runs given experiment and namespace if experiment ID is not specified find all recurring runs across all experiments */ -func (a *Client) RecurringRunServiceListRecurringRuns(params *RecurringRunServiceListRecurringRunsParams) (*RecurringRunServiceListRecurringRunsOK, error) { +func (a *Client) RecurringRunServiceListRecurringRuns(params *RecurringRunServiceListRecurringRunsParams, opts ...ClientOption) (*RecurringRunServiceListRecurringRunsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRecurringRunServiceListRecurringRunsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RecurringRunService_ListRecurringRuns", Method: "GET", PathPattern: "/apis/v2beta1/recurringruns", @@ -184,12 +273,22 @@ func (a *Client) RecurringRunServiceListRecurringRuns(params *RecurringRunServic Reader: &RecurringRunServiceListRecurringRunsReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RecurringRunServiceListRecurringRunsOK), nil - + success, ok := result.(*RecurringRunServiceListRecurringRunsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RecurringRunServiceListRecurringRunsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_create_recurring_run_parameters.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_create_recurring_run_parameters.go index b9fc0c63ad5..b45b5ee7370 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_create_recurring_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_create_recurring_run_parameters.go @@ -13,67 +13,82 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - recurring_run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" ) -// NewRecurringRunServiceCreateRecurringRunParams creates a new RecurringRunServiceCreateRecurringRunParams object -// with the default values initialized. +// NewRecurringRunServiceCreateRecurringRunParams creates a new RecurringRunServiceCreateRecurringRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRecurringRunServiceCreateRecurringRunParams() *RecurringRunServiceCreateRecurringRunParams { - var () return &RecurringRunServiceCreateRecurringRunParams{ - timeout: cr.DefaultTimeout, } } // NewRecurringRunServiceCreateRecurringRunParamsWithTimeout creates a new RecurringRunServiceCreateRecurringRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRecurringRunServiceCreateRecurringRunParamsWithTimeout(timeout time.Duration) *RecurringRunServiceCreateRecurringRunParams { - var () return &RecurringRunServiceCreateRecurringRunParams{ - timeout: timeout, } } // NewRecurringRunServiceCreateRecurringRunParamsWithContext creates a new RecurringRunServiceCreateRecurringRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRecurringRunServiceCreateRecurringRunParamsWithContext(ctx context.Context) *RecurringRunServiceCreateRecurringRunParams { - var () return &RecurringRunServiceCreateRecurringRunParams{ - Context: ctx, } } // NewRecurringRunServiceCreateRecurringRunParamsWithHTTPClient creates a new RecurringRunServiceCreateRecurringRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRecurringRunServiceCreateRecurringRunParamsWithHTTPClient(client *http.Client) *RecurringRunServiceCreateRecurringRunParams { - var () return &RecurringRunServiceCreateRecurringRunParams{ HTTPClient: client, } } -/*RecurringRunServiceCreateRecurringRunParams contains all the parameters to send to the API endpoint -for the recurring run service create recurring run operation typically these are written to a http.Request +/* +RecurringRunServiceCreateRecurringRunParams contains all the parameters to send to the API endpoint + + for the recurring run service create recurring run operation. + + Typically these are written to a http.Request. */ type RecurringRunServiceCreateRecurringRunParams struct { - /*Body - The recurring run to be created. + /* RecurringRun. + The recurring run to be created. */ - Body *recurring_run_model.V2beta1RecurringRun + RecurringRun *recurring_run_model.V2beta1RecurringRun timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the recurring run service create recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceCreateRecurringRunParams) WithDefaults() *RecurringRunServiceCreateRecurringRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the recurring run service create recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceCreateRecurringRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the recurring run service create recurring run params func (o *RecurringRunServiceCreateRecurringRunParams) WithTimeout(timeout time.Duration) *RecurringRunServiceCreateRecurringRunParams { o.SetTimeout(timeout) @@ -107,15 +122,15 @@ func (o *RecurringRunServiceCreateRecurringRunParams) SetHTTPClient(client *http o.HTTPClient = client } -// WithBody adds the body to the recurring run service create recurring run params -func (o *RecurringRunServiceCreateRecurringRunParams) WithBody(body *recurring_run_model.V2beta1RecurringRun) *RecurringRunServiceCreateRecurringRunParams { - o.SetBody(body) +// WithRecurringRun adds the recurringRun to the recurring run service create recurring run params +func (o *RecurringRunServiceCreateRecurringRunParams) WithRecurringRun(recurringRun *recurring_run_model.V2beta1RecurringRun) *RecurringRunServiceCreateRecurringRunParams { + o.SetRecurringRun(recurringRun) return o } -// SetBody adds the body to the recurring run service create recurring run params -func (o *RecurringRunServiceCreateRecurringRunParams) SetBody(body *recurring_run_model.V2beta1RecurringRun) { - o.Body = body +// SetRecurringRun adds the recurringRun to the recurring run service create recurring run params +func (o *RecurringRunServiceCreateRecurringRunParams) SetRecurringRun(recurringRun *recurring_run_model.V2beta1RecurringRun) { + o.RecurringRun = recurringRun } // WriteToRequest writes these params to a swagger request @@ -125,9 +140,8 @@ func (o *RecurringRunServiceCreateRecurringRunParams) WriteToRequest(r runtime.C return err } var res []error - - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { + if o.RecurringRun != nil { + if err := r.SetBodyParam(o.RecurringRun); err != nil { return err } } diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_create_recurring_run_responses.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_create_recurring_run_responses.go index f0ba81fc79b..c4a6d62b190 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_create_recurring_run_responses.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_create_recurring_run_responses.go @@ -6,14 +6,14 @@ package recurring_run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - recurring_run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" ) // RecurringRunServiceCreateRecurringRunReader is a Reader for the RecurringRunServiceCreateRecurringRun structure. @@ -24,14 +24,12 @@ type RecurringRunServiceCreateRecurringRunReader struct { // ReadResponse reads a server response into the received o. func (o *RecurringRunServiceCreateRecurringRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRecurringRunServiceCreateRecurringRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRecurringRunServiceCreateRecurringRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRecurringRunServiceCreateRecurringRunOK() *RecurringRunServiceCreateRecu return &RecurringRunServiceCreateRecurringRunOK{} } -/*RecurringRunServiceCreateRecurringRunOK handles this case with default header values. +/* +RecurringRunServiceCreateRecurringRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RecurringRunServiceCreateRecurringRunOK struct { Payload *recurring_run_model.V2beta1RecurringRun } +// IsSuccess returns true when this recurring run service create recurring run o k response has a 2xx status code +func (o *RecurringRunServiceCreateRecurringRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this recurring run service create recurring run o k response has a 3xx status code +func (o *RecurringRunServiceCreateRecurringRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this recurring run service create recurring run o k response has a 4xx status code +func (o *RecurringRunServiceCreateRecurringRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this recurring run service create recurring run o k response has a 5xx status code +func (o *RecurringRunServiceCreateRecurringRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this recurring run service create recurring run o k response a status code equal to that given +func (o *RecurringRunServiceCreateRecurringRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the recurring run service create recurring run o k response +func (o *RecurringRunServiceCreateRecurringRunOK) Code() int { + return 200 +} + func (o *RecurringRunServiceCreateRecurringRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/recurringruns][%d] recurringRunServiceCreateRecurringRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns][%d] recurringRunServiceCreateRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceCreateRecurringRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns][%d] recurringRunServiceCreateRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceCreateRecurringRunOK) GetPayload() *recurring_run_model.V2beta1RecurringRun { + return o.Payload } func (o *RecurringRunServiceCreateRecurringRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRecurringRunServiceCreateRecurringRunDefault(code int) *RecurringRunServ } } -/*RecurringRunServiceCreateRecurringRunDefault handles this case with default header values. +/* +RecurringRunServiceCreateRecurringRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RecurringRunServiceCreateRecurringRunDefault struct { _statusCode int - Payload *recurring_run_model.RuntimeError + Payload *recurring_run_model.GooglerpcStatus +} + +// IsSuccess returns true when this recurring run service create recurring run default response has a 2xx status code +func (o *RecurringRunServiceCreateRecurringRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this recurring run service create recurring run default response has a 3xx status code +func (o *RecurringRunServiceCreateRecurringRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this recurring run service create recurring run default response has a 4xx status code +func (o *RecurringRunServiceCreateRecurringRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this recurring run service create recurring run default response has a 5xx status code +func (o *RecurringRunServiceCreateRecurringRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this recurring run service create recurring run default response a status code equal to that given +func (o *RecurringRunServiceCreateRecurringRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the recurring run service create recurring run default response @@ -96,12 +161,22 @@ func (o *RecurringRunServiceCreateRecurringRunDefault) Code() int { } func (o *RecurringRunServiceCreateRecurringRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/recurringruns][%d] RecurringRunService_CreateRecurringRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns][%d] RecurringRunService_CreateRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceCreateRecurringRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns][%d] RecurringRunService_CreateRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceCreateRecurringRunDefault) GetPayload() *recurring_run_model.GooglerpcStatus { + return o.Payload } func (o *RecurringRunServiceCreateRecurringRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(recurring_run_model.RuntimeError) + o.Payload = new(recurring_run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_delete_recurring_run_parameters.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_delete_recurring_run_parameters.go index eee7ea35e94..7f606f3c0bf 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_delete_recurring_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_delete_recurring_run_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRecurringRunServiceDeleteRecurringRunParams creates a new RecurringRunServiceDeleteRecurringRunParams object -// with the default values initialized. +// NewRecurringRunServiceDeleteRecurringRunParams creates a new RecurringRunServiceDeleteRecurringRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRecurringRunServiceDeleteRecurringRunParams() *RecurringRunServiceDeleteRecurringRunParams { - var () return &RecurringRunServiceDeleteRecurringRunParams{ - timeout: cr.DefaultTimeout, } } // NewRecurringRunServiceDeleteRecurringRunParamsWithTimeout creates a new RecurringRunServiceDeleteRecurringRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRecurringRunServiceDeleteRecurringRunParamsWithTimeout(timeout time.Duration) *RecurringRunServiceDeleteRecurringRunParams { - var () return &RecurringRunServiceDeleteRecurringRunParams{ - timeout: timeout, } } // NewRecurringRunServiceDeleteRecurringRunParamsWithContext creates a new RecurringRunServiceDeleteRecurringRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRecurringRunServiceDeleteRecurringRunParamsWithContext(ctx context.Context) *RecurringRunServiceDeleteRecurringRunParams { - var () return &RecurringRunServiceDeleteRecurringRunParams{ - Context: ctx, } } // NewRecurringRunServiceDeleteRecurringRunParamsWithHTTPClient creates a new RecurringRunServiceDeleteRecurringRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRecurringRunServiceDeleteRecurringRunParamsWithHTTPClient(client *http.Client) *RecurringRunServiceDeleteRecurringRunParams { - var () return &RecurringRunServiceDeleteRecurringRunParams{ HTTPClient: client, } } -/*RecurringRunServiceDeleteRecurringRunParams contains all the parameters to send to the API endpoint -for the recurring run service delete recurring run operation typically these are written to a http.Request +/* +RecurringRunServiceDeleteRecurringRunParams contains all the parameters to send to the API endpoint + + for the recurring run service delete recurring run operation. + + Typically these are written to a http.Request. */ type RecurringRunServiceDeleteRecurringRunParams struct { - /*RecurringRunID - The ID of the recurring run to be deleted. + /* RecurringRunID. + The ID of the recurring run to be deleted. */ RecurringRunID string @@ -72,6 +72,21 @@ type RecurringRunServiceDeleteRecurringRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the recurring run service delete recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceDeleteRecurringRunParams) WithDefaults() *RecurringRunServiceDeleteRecurringRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the recurring run service delete recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceDeleteRecurringRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the recurring run service delete recurring run params func (o *RecurringRunServiceDeleteRecurringRunParams) WithTimeout(timeout time.Duration) *RecurringRunServiceDeleteRecurringRunParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_delete_recurring_run_responses.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_delete_recurring_run_responses.go index 183b8ca191d..ddb97635065 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_delete_recurring_run_responses.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_delete_recurring_run_responses.go @@ -6,14 +6,14 @@ package recurring_run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - recurring_run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" ) // RecurringRunServiceDeleteRecurringRunReader is a Reader for the RecurringRunServiceDeleteRecurringRun structure. @@ -24,14 +24,12 @@ type RecurringRunServiceDeleteRecurringRunReader struct { // ReadResponse reads a server response into the received o. func (o *RecurringRunServiceDeleteRecurringRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRecurringRunServiceDeleteRecurringRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRecurringRunServiceDeleteRecurringRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRecurringRunServiceDeleteRecurringRunOK() *RecurringRunServiceDeleteRecu return &RecurringRunServiceDeleteRecurringRunOK{} } -/*RecurringRunServiceDeleteRecurringRunOK handles this case with default header values. +/* +RecurringRunServiceDeleteRecurringRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RecurringRunServiceDeleteRecurringRunOK struct { Payload interface{} } +// IsSuccess returns true when this recurring run service delete recurring run o k response has a 2xx status code +func (o *RecurringRunServiceDeleteRecurringRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this recurring run service delete recurring run o k response has a 3xx status code +func (o *RecurringRunServiceDeleteRecurringRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this recurring run service delete recurring run o k response has a 4xx status code +func (o *RecurringRunServiceDeleteRecurringRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this recurring run service delete recurring run o k response has a 5xx status code +func (o *RecurringRunServiceDeleteRecurringRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this recurring run service delete recurring run o k response a status code equal to that given +func (o *RecurringRunServiceDeleteRecurringRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the recurring run service delete recurring run o k response +func (o *RecurringRunServiceDeleteRecurringRunOK) Code() int { + return 200 +} + func (o *RecurringRunServiceDeleteRecurringRunOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/recurringruns/{recurring_run_id}][%d] recurringRunServiceDeleteRecurringRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/recurringruns/{recurring_run_id}][%d] recurringRunServiceDeleteRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceDeleteRecurringRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/recurringruns/{recurring_run_id}][%d] recurringRunServiceDeleteRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceDeleteRecurringRunOK) GetPayload() interface{} { + return o.Payload } func (o *RecurringRunServiceDeleteRecurringRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRecurringRunServiceDeleteRecurringRunDefault(code int) *RecurringRunServ } } -/*RecurringRunServiceDeleteRecurringRunDefault handles this case with default header values. +/* +RecurringRunServiceDeleteRecurringRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RecurringRunServiceDeleteRecurringRunDefault struct { _statusCode int - Payload *recurring_run_model.RuntimeError + Payload *recurring_run_model.GooglerpcStatus +} + +// IsSuccess returns true when this recurring run service delete recurring run default response has a 2xx status code +func (o *RecurringRunServiceDeleteRecurringRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this recurring run service delete recurring run default response has a 3xx status code +func (o *RecurringRunServiceDeleteRecurringRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this recurring run service delete recurring run default response has a 4xx status code +func (o *RecurringRunServiceDeleteRecurringRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this recurring run service delete recurring run default response has a 5xx status code +func (o *RecurringRunServiceDeleteRecurringRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this recurring run service delete recurring run default response a status code equal to that given +func (o *RecurringRunServiceDeleteRecurringRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the recurring run service delete recurring run default response @@ -94,12 +159,22 @@ func (o *RecurringRunServiceDeleteRecurringRunDefault) Code() int { } func (o *RecurringRunServiceDeleteRecurringRunDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/recurringruns/{recurring_run_id}][%d] RecurringRunService_DeleteRecurringRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/recurringruns/{recurring_run_id}][%d] RecurringRunService_DeleteRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceDeleteRecurringRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/recurringruns/{recurring_run_id}][%d] RecurringRunService_DeleteRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceDeleteRecurringRunDefault) GetPayload() *recurring_run_model.GooglerpcStatus { + return o.Payload } func (o *RecurringRunServiceDeleteRecurringRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(recurring_run_model.RuntimeError) + o.Payload = new(recurring_run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_disable_recurring_run_parameters.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_disable_recurring_run_parameters.go index 4388f25402f..299a04721e1 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_disable_recurring_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_disable_recurring_run_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRecurringRunServiceDisableRecurringRunParams creates a new RecurringRunServiceDisableRecurringRunParams object -// with the default values initialized. +// NewRecurringRunServiceDisableRecurringRunParams creates a new RecurringRunServiceDisableRecurringRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRecurringRunServiceDisableRecurringRunParams() *RecurringRunServiceDisableRecurringRunParams { - var () return &RecurringRunServiceDisableRecurringRunParams{ - timeout: cr.DefaultTimeout, } } // NewRecurringRunServiceDisableRecurringRunParamsWithTimeout creates a new RecurringRunServiceDisableRecurringRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRecurringRunServiceDisableRecurringRunParamsWithTimeout(timeout time.Duration) *RecurringRunServiceDisableRecurringRunParams { - var () return &RecurringRunServiceDisableRecurringRunParams{ - timeout: timeout, } } // NewRecurringRunServiceDisableRecurringRunParamsWithContext creates a new RecurringRunServiceDisableRecurringRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRecurringRunServiceDisableRecurringRunParamsWithContext(ctx context.Context) *RecurringRunServiceDisableRecurringRunParams { - var () return &RecurringRunServiceDisableRecurringRunParams{ - Context: ctx, } } // NewRecurringRunServiceDisableRecurringRunParamsWithHTTPClient creates a new RecurringRunServiceDisableRecurringRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRecurringRunServiceDisableRecurringRunParamsWithHTTPClient(client *http.Client) *RecurringRunServiceDisableRecurringRunParams { - var () return &RecurringRunServiceDisableRecurringRunParams{ HTTPClient: client, } } -/*RecurringRunServiceDisableRecurringRunParams contains all the parameters to send to the API endpoint -for the recurring run service disable recurring run operation typically these are written to a http.Request +/* +RecurringRunServiceDisableRecurringRunParams contains all the parameters to send to the API endpoint + + for the recurring run service disable recurring run operation. + + Typically these are written to a http.Request. */ type RecurringRunServiceDisableRecurringRunParams struct { - /*RecurringRunID - The ID of the recurring runs to be disabled. + /* RecurringRunID. + The ID of the recurring runs to be disabled. */ RecurringRunID string @@ -72,6 +72,21 @@ type RecurringRunServiceDisableRecurringRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the recurring run service disable recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceDisableRecurringRunParams) WithDefaults() *RecurringRunServiceDisableRecurringRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the recurring run service disable recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceDisableRecurringRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the recurring run service disable recurring run params func (o *RecurringRunServiceDisableRecurringRunParams) WithTimeout(timeout time.Duration) *RecurringRunServiceDisableRecurringRunParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_disable_recurring_run_responses.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_disable_recurring_run_responses.go index 71a5dd9d52e..77413b7e675 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_disable_recurring_run_responses.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_disable_recurring_run_responses.go @@ -6,14 +6,14 @@ package recurring_run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - recurring_run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" ) // RecurringRunServiceDisableRecurringRunReader is a Reader for the RecurringRunServiceDisableRecurringRun structure. @@ -24,14 +24,12 @@ type RecurringRunServiceDisableRecurringRunReader struct { // ReadResponse reads a server response into the received o. func (o *RecurringRunServiceDisableRecurringRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRecurringRunServiceDisableRecurringRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRecurringRunServiceDisableRecurringRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRecurringRunServiceDisableRecurringRunOK() *RecurringRunServiceDisableRe return &RecurringRunServiceDisableRecurringRunOK{} } -/*RecurringRunServiceDisableRecurringRunOK handles this case with default header values. +/* +RecurringRunServiceDisableRecurringRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RecurringRunServiceDisableRecurringRunOK struct { Payload interface{} } +// IsSuccess returns true when this recurring run service disable recurring run o k response has a 2xx status code +func (o *RecurringRunServiceDisableRecurringRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this recurring run service disable recurring run o k response has a 3xx status code +func (o *RecurringRunServiceDisableRecurringRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this recurring run service disable recurring run o k response has a 4xx status code +func (o *RecurringRunServiceDisableRecurringRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this recurring run service disable recurring run o k response has a 5xx status code +func (o *RecurringRunServiceDisableRecurringRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this recurring run service disable recurring run o k response a status code equal to that given +func (o *RecurringRunServiceDisableRecurringRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the recurring run service disable recurring run o k response +func (o *RecurringRunServiceDisableRecurringRunOK) Code() int { + return 200 +} + func (o *RecurringRunServiceDisableRecurringRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:disable][%d] recurringRunServiceDisableRecurringRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:disable][%d] recurringRunServiceDisableRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceDisableRecurringRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:disable][%d] recurringRunServiceDisableRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceDisableRecurringRunOK) GetPayload() interface{} { + return o.Payload } func (o *RecurringRunServiceDisableRecurringRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRecurringRunServiceDisableRecurringRunDefault(code int) *RecurringRunSer } } -/*RecurringRunServiceDisableRecurringRunDefault handles this case with default header values. +/* +RecurringRunServiceDisableRecurringRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RecurringRunServiceDisableRecurringRunDefault struct { _statusCode int - Payload *recurring_run_model.RuntimeError + Payload *recurring_run_model.GooglerpcStatus +} + +// IsSuccess returns true when this recurring run service disable recurring run default response has a 2xx status code +func (o *RecurringRunServiceDisableRecurringRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this recurring run service disable recurring run default response has a 3xx status code +func (o *RecurringRunServiceDisableRecurringRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this recurring run service disable recurring run default response has a 4xx status code +func (o *RecurringRunServiceDisableRecurringRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this recurring run service disable recurring run default response has a 5xx status code +func (o *RecurringRunServiceDisableRecurringRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this recurring run service disable recurring run default response a status code equal to that given +func (o *RecurringRunServiceDisableRecurringRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the recurring run service disable recurring run default response @@ -94,12 +159,22 @@ func (o *RecurringRunServiceDisableRecurringRunDefault) Code() int { } func (o *RecurringRunServiceDisableRecurringRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:disable][%d] RecurringRunService_DisableRecurringRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:disable][%d] RecurringRunService_DisableRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceDisableRecurringRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:disable][%d] RecurringRunService_DisableRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceDisableRecurringRunDefault) GetPayload() *recurring_run_model.GooglerpcStatus { + return o.Payload } func (o *RecurringRunServiceDisableRecurringRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(recurring_run_model.RuntimeError) + o.Payload = new(recurring_run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_enable_recurring_run_parameters.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_enable_recurring_run_parameters.go index 9547b10b11d..8d9dac92d6f 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_enable_recurring_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_enable_recurring_run_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRecurringRunServiceEnableRecurringRunParams creates a new RecurringRunServiceEnableRecurringRunParams object -// with the default values initialized. +// NewRecurringRunServiceEnableRecurringRunParams creates a new RecurringRunServiceEnableRecurringRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRecurringRunServiceEnableRecurringRunParams() *RecurringRunServiceEnableRecurringRunParams { - var () return &RecurringRunServiceEnableRecurringRunParams{ - timeout: cr.DefaultTimeout, } } // NewRecurringRunServiceEnableRecurringRunParamsWithTimeout creates a new RecurringRunServiceEnableRecurringRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRecurringRunServiceEnableRecurringRunParamsWithTimeout(timeout time.Duration) *RecurringRunServiceEnableRecurringRunParams { - var () return &RecurringRunServiceEnableRecurringRunParams{ - timeout: timeout, } } // NewRecurringRunServiceEnableRecurringRunParamsWithContext creates a new RecurringRunServiceEnableRecurringRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRecurringRunServiceEnableRecurringRunParamsWithContext(ctx context.Context) *RecurringRunServiceEnableRecurringRunParams { - var () return &RecurringRunServiceEnableRecurringRunParams{ - Context: ctx, } } // NewRecurringRunServiceEnableRecurringRunParamsWithHTTPClient creates a new RecurringRunServiceEnableRecurringRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRecurringRunServiceEnableRecurringRunParamsWithHTTPClient(client *http.Client) *RecurringRunServiceEnableRecurringRunParams { - var () return &RecurringRunServiceEnableRecurringRunParams{ HTTPClient: client, } } -/*RecurringRunServiceEnableRecurringRunParams contains all the parameters to send to the API endpoint -for the recurring run service enable recurring run operation typically these are written to a http.Request +/* +RecurringRunServiceEnableRecurringRunParams contains all the parameters to send to the API endpoint + + for the recurring run service enable recurring run operation. + + Typically these are written to a http.Request. */ type RecurringRunServiceEnableRecurringRunParams struct { - /*RecurringRunID - The ID of the recurring runs to be enabled. + /* RecurringRunID. + The ID of the recurring runs to be enabled. */ RecurringRunID string @@ -72,6 +72,21 @@ type RecurringRunServiceEnableRecurringRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the recurring run service enable recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceEnableRecurringRunParams) WithDefaults() *RecurringRunServiceEnableRecurringRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the recurring run service enable recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceEnableRecurringRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the recurring run service enable recurring run params func (o *RecurringRunServiceEnableRecurringRunParams) WithTimeout(timeout time.Duration) *RecurringRunServiceEnableRecurringRunParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_enable_recurring_run_responses.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_enable_recurring_run_responses.go index 4f0ee34c931..3c6ef1d56f9 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_enable_recurring_run_responses.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_enable_recurring_run_responses.go @@ -6,14 +6,14 @@ package recurring_run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - recurring_run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" ) // RecurringRunServiceEnableRecurringRunReader is a Reader for the RecurringRunServiceEnableRecurringRun structure. @@ -24,14 +24,12 @@ type RecurringRunServiceEnableRecurringRunReader struct { // ReadResponse reads a server response into the received o. func (o *RecurringRunServiceEnableRecurringRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRecurringRunServiceEnableRecurringRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRecurringRunServiceEnableRecurringRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRecurringRunServiceEnableRecurringRunOK() *RecurringRunServiceEnableRecu return &RecurringRunServiceEnableRecurringRunOK{} } -/*RecurringRunServiceEnableRecurringRunOK handles this case with default header values. +/* +RecurringRunServiceEnableRecurringRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RecurringRunServiceEnableRecurringRunOK struct { Payload interface{} } +// IsSuccess returns true when this recurring run service enable recurring run o k response has a 2xx status code +func (o *RecurringRunServiceEnableRecurringRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this recurring run service enable recurring run o k response has a 3xx status code +func (o *RecurringRunServiceEnableRecurringRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this recurring run service enable recurring run o k response has a 4xx status code +func (o *RecurringRunServiceEnableRecurringRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this recurring run service enable recurring run o k response has a 5xx status code +func (o *RecurringRunServiceEnableRecurringRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this recurring run service enable recurring run o k response a status code equal to that given +func (o *RecurringRunServiceEnableRecurringRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the recurring run service enable recurring run o k response +func (o *RecurringRunServiceEnableRecurringRunOK) Code() int { + return 200 +} + func (o *RecurringRunServiceEnableRecurringRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:enable][%d] recurringRunServiceEnableRecurringRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:enable][%d] recurringRunServiceEnableRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceEnableRecurringRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:enable][%d] recurringRunServiceEnableRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceEnableRecurringRunOK) GetPayload() interface{} { + return o.Payload } func (o *RecurringRunServiceEnableRecurringRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRecurringRunServiceEnableRecurringRunDefault(code int) *RecurringRunServ } } -/*RecurringRunServiceEnableRecurringRunDefault handles this case with default header values. +/* +RecurringRunServiceEnableRecurringRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RecurringRunServiceEnableRecurringRunDefault struct { _statusCode int - Payload *recurring_run_model.RuntimeError + Payload *recurring_run_model.GooglerpcStatus +} + +// IsSuccess returns true when this recurring run service enable recurring run default response has a 2xx status code +func (o *RecurringRunServiceEnableRecurringRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this recurring run service enable recurring run default response has a 3xx status code +func (o *RecurringRunServiceEnableRecurringRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this recurring run service enable recurring run default response has a 4xx status code +func (o *RecurringRunServiceEnableRecurringRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this recurring run service enable recurring run default response has a 5xx status code +func (o *RecurringRunServiceEnableRecurringRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this recurring run service enable recurring run default response a status code equal to that given +func (o *RecurringRunServiceEnableRecurringRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the recurring run service enable recurring run default response @@ -94,12 +159,22 @@ func (o *RecurringRunServiceEnableRecurringRunDefault) Code() int { } func (o *RecurringRunServiceEnableRecurringRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:enable][%d] RecurringRunService_EnableRecurringRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:enable][%d] RecurringRunService_EnableRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceEnableRecurringRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/recurringruns/{recurring_run_id}:enable][%d] RecurringRunService_EnableRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceEnableRecurringRunDefault) GetPayload() *recurring_run_model.GooglerpcStatus { + return o.Payload } func (o *RecurringRunServiceEnableRecurringRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(recurring_run_model.RuntimeError) + o.Payload = new(recurring_run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_get_recurring_run_parameters.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_get_recurring_run_parameters.go index 14ab9b6df2c..dbbcd0c43fb 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_get_recurring_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_get_recurring_run_parameters.go @@ -13,57 +13,57 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRecurringRunServiceGetRecurringRunParams creates a new RecurringRunServiceGetRecurringRunParams object -// with the default values initialized. +// NewRecurringRunServiceGetRecurringRunParams creates a new RecurringRunServiceGetRecurringRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRecurringRunServiceGetRecurringRunParams() *RecurringRunServiceGetRecurringRunParams { - var () return &RecurringRunServiceGetRecurringRunParams{ - timeout: cr.DefaultTimeout, } } // NewRecurringRunServiceGetRecurringRunParamsWithTimeout creates a new RecurringRunServiceGetRecurringRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRecurringRunServiceGetRecurringRunParamsWithTimeout(timeout time.Duration) *RecurringRunServiceGetRecurringRunParams { - var () return &RecurringRunServiceGetRecurringRunParams{ - timeout: timeout, } } // NewRecurringRunServiceGetRecurringRunParamsWithContext creates a new RecurringRunServiceGetRecurringRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRecurringRunServiceGetRecurringRunParamsWithContext(ctx context.Context) *RecurringRunServiceGetRecurringRunParams { - var () return &RecurringRunServiceGetRecurringRunParams{ - Context: ctx, } } // NewRecurringRunServiceGetRecurringRunParamsWithHTTPClient creates a new RecurringRunServiceGetRecurringRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRecurringRunServiceGetRecurringRunParamsWithHTTPClient(client *http.Client) *RecurringRunServiceGetRecurringRunParams { - var () return &RecurringRunServiceGetRecurringRunParams{ HTTPClient: client, } } -/*RecurringRunServiceGetRecurringRunParams contains all the parameters to send to the API endpoint -for the recurring run service get recurring run operation typically these are written to a http.Request +/* +RecurringRunServiceGetRecurringRunParams contains all the parameters to send to the API endpoint + + for the recurring run service get recurring run operation. + + Typically these are written to a http.Request. */ type RecurringRunServiceGetRecurringRunParams struct { - /*RecurringRunID - The ID of the recurring run to be retrieved. + /* RecurringRunID. + The ID of the recurring run to be retrieved. */ RecurringRunID string @@ -72,6 +72,21 @@ type RecurringRunServiceGetRecurringRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the recurring run service get recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceGetRecurringRunParams) WithDefaults() *RecurringRunServiceGetRecurringRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the recurring run service get recurring run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceGetRecurringRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the recurring run service get recurring run params func (o *RecurringRunServiceGetRecurringRunParams) WithTimeout(timeout time.Duration) *RecurringRunServiceGetRecurringRunParams { o.SetTimeout(timeout) diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_get_recurring_run_responses.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_get_recurring_run_responses.go index 5af212d2f17..ea2e8d4df96 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_get_recurring_run_responses.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_get_recurring_run_responses.go @@ -6,14 +6,14 @@ package recurring_run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - recurring_run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" ) // RecurringRunServiceGetRecurringRunReader is a Reader for the RecurringRunServiceGetRecurringRun structure. @@ -24,14 +24,12 @@ type RecurringRunServiceGetRecurringRunReader struct { // ReadResponse reads a server response into the received o. func (o *RecurringRunServiceGetRecurringRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRecurringRunServiceGetRecurringRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRecurringRunServiceGetRecurringRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRecurringRunServiceGetRecurringRunOK() *RecurringRunServiceGetRecurringR return &RecurringRunServiceGetRecurringRunOK{} } -/*RecurringRunServiceGetRecurringRunOK handles this case with default header values. +/* +RecurringRunServiceGetRecurringRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RecurringRunServiceGetRecurringRunOK struct { Payload *recurring_run_model.V2beta1RecurringRun } +// IsSuccess returns true when this recurring run service get recurring run o k response has a 2xx status code +func (o *RecurringRunServiceGetRecurringRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this recurring run service get recurring run o k response has a 3xx status code +func (o *RecurringRunServiceGetRecurringRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this recurring run service get recurring run o k response has a 4xx status code +func (o *RecurringRunServiceGetRecurringRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this recurring run service get recurring run o k response has a 5xx status code +func (o *RecurringRunServiceGetRecurringRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this recurring run service get recurring run o k response a status code equal to that given +func (o *RecurringRunServiceGetRecurringRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the recurring run service get recurring run o k response +func (o *RecurringRunServiceGetRecurringRunOK) Code() int { + return 200 +} + func (o *RecurringRunServiceGetRecurringRunOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/recurringruns/{recurring_run_id}][%d] recurringRunServiceGetRecurringRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/recurringruns/{recurring_run_id}][%d] recurringRunServiceGetRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceGetRecurringRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/recurringruns/{recurring_run_id}][%d] recurringRunServiceGetRecurringRunOK %s", 200, payload) +} + +func (o *RecurringRunServiceGetRecurringRunOK) GetPayload() *recurring_run_model.V2beta1RecurringRun { + return o.Payload } func (o *RecurringRunServiceGetRecurringRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRecurringRunServiceGetRecurringRunDefault(code int) *RecurringRunService } } -/*RecurringRunServiceGetRecurringRunDefault handles this case with default header values. +/* +RecurringRunServiceGetRecurringRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RecurringRunServiceGetRecurringRunDefault struct { _statusCode int - Payload *recurring_run_model.RuntimeError + Payload *recurring_run_model.GooglerpcStatus +} + +// IsSuccess returns true when this recurring run service get recurring run default response has a 2xx status code +func (o *RecurringRunServiceGetRecurringRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this recurring run service get recurring run default response has a 3xx status code +func (o *RecurringRunServiceGetRecurringRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this recurring run service get recurring run default response has a 4xx status code +func (o *RecurringRunServiceGetRecurringRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this recurring run service get recurring run default response has a 5xx status code +func (o *RecurringRunServiceGetRecurringRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this recurring run service get recurring run default response a status code equal to that given +func (o *RecurringRunServiceGetRecurringRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the recurring run service get recurring run default response @@ -96,12 +161,22 @@ func (o *RecurringRunServiceGetRecurringRunDefault) Code() int { } func (o *RecurringRunServiceGetRecurringRunDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/recurringruns/{recurring_run_id}][%d] RecurringRunService_GetRecurringRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/recurringruns/{recurring_run_id}][%d] RecurringRunService_GetRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceGetRecurringRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/recurringruns/{recurring_run_id}][%d] RecurringRunService_GetRecurringRun default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceGetRecurringRunDefault) GetPayload() *recurring_run_model.GooglerpcStatus { + return o.Payload } func (o *RecurringRunServiceGetRecurringRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(recurring_run_model.RuntimeError) + o.Payload = new(recurring_run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_list_recurring_runs_parameters.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_list_recurring_runs_parameters.go index a48b68a30ff..8ed3e1d7813 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_list_recurring_runs_parameters.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_list_recurring_runs_parameters.go @@ -13,89 +13,96 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewRecurringRunServiceListRecurringRunsParams creates a new RecurringRunServiceListRecurringRunsParams object -// with the default values initialized. +// NewRecurringRunServiceListRecurringRunsParams creates a new RecurringRunServiceListRecurringRunsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRecurringRunServiceListRecurringRunsParams() *RecurringRunServiceListRecurringRunsParams { - var () return &RecurringRunServiceListRecurringRunsParams{ - timeout: cr.DefaultTimeout, } } // NewRecurringRunServiceListRecurringRunsParamsWithTimeout creates a new RecurringRunServiceListRecurringRunsParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRecurringRunServiceListRecurringRunsParamsWithTimeout(timeout time.Duration) *RecurringRunServiceListRecurringRunsParams { - var () return &RecurringRunServiceListRecurringRunsParams{ - timeout: timeout, } } // NewRecurringRunServiceListRecurringRunsParamsWithContext creates a new RecurringRunServiceListRecurringRunsParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRecurringRunServiceListRecurringRunsParamsWithContext(ctx context.Context) *RecurringRunServiceListRecurringRunsParams { - var () return &RecurringRunServiceListRecurringRunsParams{ - Context: ctx, } } // NewRecurringRunServiceListRecurringRunsParamsWithHTTPClient creates a new RecurringRunServiceListRecurringRunsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRecurringRunServiceListRecurringRunsParamsWithHTTPClient(client *http.Client) *RecurringRunServiceListRecurringRunsParams { - var () return &RecurringRunServiceListRecurringRunsParams{ HTTPClient: client, } } -/*RecurringRunServiceListRecurringRunsParams contains all the parameters to send to the API endpoint -for the recurring run service list recurring runs operation typically these are written to a http.Request +/* +RecurringRunServiceListRecurringRunsParams contains all the parameters to send to the API endpoint + + for the recurring run service list recurring runs operation. + + Typically these are written to a http.Request. */ type RecurringRunServiceListRecurringRunsParams struct { - /*ExperimentID - The ID of the experiment to be retrieved. If empty, list recurring runs across all experiments. + /* ExperimentID. + The ID of the experiment to be retrieved. If empty, list recurring runs across all experiments. */ ExperimentID *string - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). + /* Filter. + + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). */ Filter *string - /*Namespace - Optional input. The namespace the recurring runs belong to. + /* Namespace. + + Optional input. The namespace the recurring runs belong to. */ Namespace *string - /*PageSize - The number of recurring runs to be listed per page. If there are more recurring runs + + /* PageSize. + + The number of recurring runs to be listed per page. If there are more recurring runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the next page of results. The token is acquired + + /* PageToken. + + A page token to request the next page of results. The token is acquired from the nextPageToken field of the response from the previous ListRecurringRuns call or can be omitted when fetching the first page. - */ PageToken *string - /*SortBy - Can be formatted as "field_name", "field_name asc" or "field_name desc". - Ascending by default. + /* SortBy. + + Can be formatted as "field_name", "field_name asc" or "field_name desc". + Ascending by default. */ SortBy *string @@ -104,6 +111,21 @@ type RecurringRunServiceListRecurringRunsParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the recurring run service list recurring runs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceListRecurringRunsParams) WithDefaults() *RecurringRunServiceListRecurringRunsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the recurring run service list recurring runs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RecurringRunServiceListRecurringRunsParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the recurring run service list recurring runs params func (o *RecurringRunServiceListRecurringRunsParams) WithTimeout(timeout time.Duration) *RecurringRunServiceListRecurringRunsParams { o.SetTimeout(timeout) @@ -215,96 +237,102 @@ func (o *RecurringRunServiceListRecurringRunsParams) WriteToRequest(r runtime.Cl // query param experiment_id var qrExperimentID string + if o.ExperimentID != nil { qrExperimentID = *o.ExperimentID } qExperimentID := qrExperimentID if qExperimentID != "" { + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { return err } } - } if o.Filter != nil { // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.Namespace != nil { // query param namespace var qrNamespace string + if o.Namespace != nil { qrNamespace = *o.Namespace } qNamespace := qrNamespace if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_list_recurring_runs_responses.go b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_list_recurring_runs_responses.go index 53f519829ac..085b8f66314 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_list_recurring_runs_responses.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_client/recurring_run_service/recurring_run_service_list_recurring_runs_responses.go @@ -6,14 +6,14 @@ package recurring_run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - recurring_run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/recurring_run_model" ) // RecurringRunServiceListRecurringRunsReader is a Reader for the RecurringRunServiceListRecurringRuns structure. @@ -24,14 +24,12 @@ type RecurringRunServiceListRecurringRunsReader struct { // ReadResponse reads a server response into the received o. func (o *RecurringRunServiceListRecurringRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRecurringRunServiceListRecurringRunsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRecurringRunServiceListRecurringRunsDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRecurringRunServiceListRecurringRunsOK() *RecurringRunServiceListRecurri return &RecurringRunServiceListRecurringRunsOK{} } -/*RecurringRunServiceListRecurringRunsOK handles this case with default header values. +/* +RecurringRunServiceListRecurringRunsOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RecurringRunServiceListRecurringRunsOK struct { Payload *recurring_run_model.V2beta1ListRecurringRunsResponse } +// IsSuccess returns true when this recurring run service list recurring runs o k response has a 2xx status code +func (o *RecurringRunServiceListRecurringRunsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this recurring run service list recurring runs o k response has a 3xx status code +func (o *RecurringRunServiceListRecurringRunsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this recurring run service list recurring runs o k response has a 4xx status code +func (o *RecurringRunServiceListRecurringRunsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this recurring run service list recurring runs o k response has a 5xx status code +func (o *RecurringRunServiceListRecurringRunsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this recurring run service list recurring runs o k response a status code equal to that given +func (o *RecurringRunServiceListRecurringRunsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the recurring run service list recurring runs o k response +func (o *RecurringRunServiceListRecurringRunsOK) Code() int { + return 200 +} + func (o *RecurringRunServiceListRecurringRunsOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/recurringruns][%d] recurringRunServiceListRecurringRunsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/recurringruns][%d] recurringRunServiceListRecurringRunsOK %s", 200, payload) +} + +func (o *RecurringRunServiceListRecurringRunsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/recurringruns][%d] recurringRunServiceListRecurringRunsOK %s", 200, payload) +} + +func (o *RecurringRunServiceListRecurringRunsOK) GetPayload() *recurring_run_model.V2beta1ListRecurringRunsResponse { + return o.Payload } func (o *RecurringRunServiceListRecurringRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRecurringRunServiceListRecurringRunsDefault(code int) *RecurringRunServi } } -/*RecurringRunServiceListRecurringRunsDefault handles this case with default header values. +/* +RecurringRunServiceListRecurringRunsDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RecurringRunServiceListRecurringRunsDefault struct { _statusCode int - Payload *recurring_run_model.RuntimeError + Payload *recurring_run_model.GooglerpcStatus +} + +// IsSuccess returns true when this recurring run service list recurring runs default response has a 2xx status code +func (o *RecurringRunServiceListRecurringRunsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this recurring run service list recurring runs default response has a 3xx status code +func (o *RecurringRunServiceListRecurringRunsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this recurring run service list recurring runs default response has a 4xx status code +func (o *RecurringRunServiceListRecurringRunsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this recurring run service list recurring runs default response has a 5xx status code +func (o *RecurringRunServiceListRecurringRunsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this recurring run service list recurring runs default response a status code equal to that given +func (o *RecurringRunServiceListRecurringRunsDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the recurring run service list recurring runs default response @@ -96,12 +161,22 @@ func (o *RecurringRunServiceListRecurringRunsDefault) Code() int { } func (o *RecurringRunServiceListRecurringRunsDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/recurringruns][%d] RecurringRunService_ListRecurringRuns default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/recurringruns][%d] RecurringRunService_ListRecurringRuns default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceListRecurringRunsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/recurringruns][%d] RecurringRunService_ListRecurringRuns default %s", o._statusCode, payload) +} + +func (o *RecurringRunServiceListRecurringRunsDefault) GetPayload() *recurring_run_model.GooglerpcStatus { + return o.Payload } func (o *RecurringRunServiceListRecurringRunsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(recurring_run_model.RuntimeError) + o.Payload = new(recurring_run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/googlerpc_status.go b/backend/api/v2beta1/go_http_client/recurring_run_model/googlerpc_status.go index 9d5a79b5d66..c4df5298e5c 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/googlerpc_status.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/googlerpc_status.go @@ -6,11 +6,11 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -21,6 +21,7 @@ import ( // // You can find out more about this error model and how to work with it in the // [API Design Guide](https://cloud.google.com/apis/design/errors). +// // swagger:model googlerpcStatus type GooglerpcStatus struct { @@ -52,7 +53,6 @@ func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { } func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(m.Details) { // not required return nil } @@ -66,6 +66,47 @@ func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { if err := m.Details[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/protobuf_any.go b/backend/api/v2beta1/go_http_client/recurring_run_model/protobuf_any.go index c166ea4221d..d6772c9bea4 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/protobuf_any.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/protobuf_any.go @@ -6,9 +6,10 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/protobuf_null_value.go b/backend/api/v2beta1/go_http_client/recurring_run_model/protobuf_null_value.go index 178328ff966..634987561e2 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/protobuf_null_value.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/protobuf_null_value.go @@ -6,23 +6,33 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // ProtobufNullValue `NullValue` is a singleton enumeration to represent the null value for the // `Value` type union. // -// The JSON representation for `NullValue` is JSON `null`. +// The JSON representation for `NullValue` is JSON `null`. +// +// - NULL_VALUE: Null value. // -// - NULL_VALUE: Null value. // swagger:model protobufNullValue type ProtobufNullValue string +func NewProtobufNullValue(value ProtobufNullValue) *ProtobufNullValue { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ProtobufNullValue. +func (m ProtobufNullValue) Pointer() *ProtobufNullValue { + return &m +} + const ( // ProtobufNullValueNULLVALUE captures enum value "NULL_VALUE" @@ -43,7 +53,7 @@ func init() { } func (m ProtobufNullValue) validateProtobufNullValueEnum(path, location string, value ProtobufNullValue) error { - if err := validate.Enum(path, location, value, protobufNullValueEnum); err != nil { + if err := validate.EnumCase(path, location, value, protobufNullValueEnum, true); err != nil { return err } return nil @@ -63,3 +73,8 @@ func (m ProtobufNullValue) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this protobuf null value based on context it is used +func (m ProtobufNullValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/recurring_run_mode.go b/backend/api/v2beta1/go_http_client/recurring_run_model/recurring_run_mode.go index 15e9b127e97..50145f3de8c 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/recurring_run_mode.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/recurring_run_mode.go @@ -6,11 +6,11 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) @@ -18,10 +18,20 @@ import ( // User setting to enable or disable the recurring run. // Only used for creation of recurring runs. Later updates use enable/disable API. // -// - DISABLE: The recurring run won't schedule any run if disabled. +// - DISABLE: The recurring run won't schedule any run if disabled. +// // swagger:model RecurringRunMode type RecurringRunMode string +func NewRecurringRunMode(value RecurringRunMode) *RecurringRunMode { + return &value +} + +// Pointer returns a pointer to a freshly-allocated RecurringRunMode. +func (m RecurringRunMode) Pointer() *RecurringRunMode { + return &m +} + const ( // RecurringRunModeMODEUNSPECIFIED captures enum value "MODE_UNSPECIFIED" @@ -48,7 +58,7 @@ func init() { } func (m RecurringRunMode) validateRecurringRunModeEnum(path, location string, value RecurringRunMode) error { - if err := validate.Enum(path, location, value, recurringRunModeEnum); err != nil { + if err := validate.EnumCase(path, location, value, recurringRunModeEnum, true); err != nil { return err } return nil @@ -68,3 +78,8 @@ func (m RecurringRunMode) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this recurring run mode based on context it is used +func (m RecurringRunMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/runtime_error.go b/backend/api/v2beta1/go_http_client/recurring_run_model/runtime_error.go deleted file mode 100644 index 470bc222149..00000000000 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/runtime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package recurring_run_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// RuntimeError runtime error -// swagger:model runtimeError -type RuntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this runtime error -func (m *RuntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeError) UnmarshalBinary(b []byte) error { - var res RuntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_cron_schedule.go b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_cron_schedule.go index 50627e34ee3..3bc7d600657 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_cron_schedule.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_cron_schedule.go @@ -6,14 +6,16 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1CronSchedule CronSchedule allow scheduling the recurring run with unix-like cron. +// // swagger:model v2beta1CronSchedule type V2beta1CronSchedule struct { @@ -49,7 +51,6 @@ func (m *V2beta1CronSchedule) Validate(formats strfmt.Registry) error { } func (m *V2beta1CronSchedule) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required return nil } @@ -62,7 +63,6 @@ func (m *V2beta1CronSchedule) validateEndTime(formats strfmt.Registry) error { } func (m *V2beta1CronSchedule) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required return nil } @@ -74,6 +74,11 @@ func (m *V2beta1CronSchedule) validateStartTime(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v2beta1 cron schedule based on context it is used +func (m *V2beta1CronSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1CronSchedule) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_list_recurring_runs_response.go b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_list_recurring_runs_response.go index eafa98b5b11..3553d15bd2b 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_list_recurring_runs_response.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_list_recurring_runs_response.go @@ -6,15 +6,16 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1ListRecurringRunsResponse v2beta1 list recurring runs response +// // swagger:model v2beta1ListRecurringRunsResponse type V2beta1ListRecurringRunsResponse struct { @@ -43,7 +44,6 @@ func (m *V2beta1ListRecurringRunsResponse) Validate(formats strfmt.Registry) err } func (m *V2beta1ListRecurringRunsResponse) validateRecurringRuns(formats strfmt.Registry) error { - if swag.IsZero(m.RecurringRuns) { // not required return nil } @@ -57,6 +57,47 @@ func (m *V2beta1ListRecurringRunsResponse) validateRecurringRuns(formats strfmt. if err := m.RecurringRuns[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("recurringRuns" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("recurringRuns" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v2beta1 list recurring runs response based on the context it is used +func (m *V2beta1ListRecurringRunsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRecurringRuns(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1ListRecurringRunsResponse) contextValidateRecurringRuns(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RecurringRuns); i++ { + + if m.RecurringRuns[i] != nil { + + if swag.IsZero(m.RecurringRuns[i]) { // not required + return nil + } + + if err := m.RecurringRuns[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("recurringRuns" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("recurringRuns" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_periodic_schedule.go b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_periodic_schedule.go index 4e88adff3a1..53279671b87 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_periodic_schedule.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_periodic_schedule.go @@ -6,14 +6,16 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1PeriodicSchedule PeriodicSchedule allow scheduling the recurring run periodically with certain interval. +// // swagger:model v2beta1PeriodicSchedule type V2beta1PeriodicSchedule struct { @@ -48,7 +50,6 @@ func (m *V2beta1PeriodicSchedule) Validate(formats strfmt.Registry) error { } func (m *V2beta1PeriodicSchedule) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required return nil } @@ -61,7 +62,6 @@ func (m *V2beta1PeriodicSchedule) validateEndTime(formats strfmt.Registry) error } func (m *V2beta1PeriodicSchedule) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required return nil } @@ -73,6 +73,11 @@ func (m *V2beta1PeriodicSchedule) validateStartTime(formats strfmt.Registry) err return nil } +// ContextValidate validates this v2beta1 periodic schedule based on context it is used +func (m *V2beta1PeriodicSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1PeriodicSchedule) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_pipeline_version_reference.go b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_pipeline_version_reference.go index 615a11c457e..086cdc4b00a 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_pipeline_version_reference.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_pipeline_version_reference.go @@ -6,12 +6,14 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1PipelineVersionReference Reference to an existing pipeline version. +// // swagger:model v2beta1PipelineVersionReference type V2beta1PipelineVersionReference struct { @@ -27,6 +29,11 @@ func (m *V2beta1PipelineVersionReference) Validate(formats strfmt.Registry) erro return nil } +// ContextValidate validates this v2beta1 pipeline version reference based on context it is used +func (m *V2beta1PipelineVersionReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1PipelineVersionReference) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_recurring_run.go b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_recurring_run.go index b7935a92bc3..3796c3cea12 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_recurring_run.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_recurring_run.go @@ -6,14 +6,16 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1RecurringRun v2beta1 recurring run +// // swagger:model v2beta1RecurringRun type V2beta1RecurringRun struct { @@ -40,7 +42,7 @@ type V2beta1RecurringRun struct { MaxConcurrency int64 `json:"max_concurrency,omitempty,string"` // mode - Mode RecurringRunMode `json:"mode,omitempty"` + Mode *RecurringRunMode `json:"mode,omitempty"` // TODO (gkclat): consider removing this field if it can be obtained from the parent experiment. // Output only. Namespace this recurring run belongs to. Derived from the parent experiment. @@ -71,7 +73,7 @@ type V2beta1RecurringRun struct { ServiceAccount string `json:"service_account,omitempty"` // status - Status V2beta1RecurringRunStatus `json:"status,omitempty"` + Status *V2beta1RecurringRunStatus `json:"status,omitempty"` // Required input field. // Specifies how a run is triggered. Support cron mode or periodic mode. @@ -125,7 +127,6 @@ func (m *V2beta1RecurringRun) Validate(formats strfmt.Registry) error { } func (m *V2beta1RecurringRun) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -138,7 +139,6 @@ func (m *V2beta1RecurringRun) validateCreatedAt(formats strfmt.Registry) error { } func (m *V2beta1RecurringRun) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required return nil } @@ -147,6 +147,8 @@ func (m *V2beta1RecurringRun) validateError(formats strfmt.Registry) error { if err := m.Error.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") } return err } @@ -156,23 +158,25 @@ func (m *V2beta1RecurringRun) validateError(formats strfmt.Registry) error { } func (m *V2beta1RecurringRun) validateMode(formats strfmt.Registry) error { - if swag.IsZero(m.Mode) { // not required return nil } - if err := m.Mode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mode") + if m.Mode != nil { + if err := m.Mode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err } - return err } return nil } func (m *V2beta1RecurringRun) validatePipelineVersionReference(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineVersionReference) { // not required return nil } @@ -181,6 +185,8 @@ func (m *V2beta1RecurringRun) validatePipelineVersionReference(formats strfmt.Re if err := m.PipelineVersionReference.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_version_reference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_version_reference") } return err } @@ -190,7 +196,6 @@ func (m *V2beta1RecurringRun) validatePipelineVersionReference(formats strfmt.Re } func (m *V2beta1RecurringRun) validateRuntimeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RuntimeConfig) { // not required return nil } @@ -199,6 +204,8 @@ func (m *V2beta1RecurringRun) validateRuntimeConfig(formats strfmt.Registry) err if err := m.RuntimeConfig.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") } return err } @@ -208,23 +215,25 @@ func (m *V2beta1RecurringRun) validateRuntimeConfig(formats strfmt.Registry) err } func (m *V2beta1RecurringRun) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required return nil } - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err } - return err } return nil } func (m *V2beta1RecurringRun) validateTrigger(formats strfmt.Registry) error { - if swag.IsZero(m.Trigger) { // not required return nil } @@ -233,6 +242,8 @@ func (m *V2beta1RecurringRun) validateTrigger(formats strfmt.Registry) error { if err := m.Trigger.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("trigger") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trigger") } return err } @@ -242,7 +253,6 @@ func (m *V2beta1RecurringRun) validateTrigger(formats strfmt.Registry) error { } func (m *V2beta1RecurringRun) validateUpdatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.UpdatedAt) { // not required return nil } @@ -254,6 +264,179 @@ func (m *V2beta1RecurringRun) validateUpdatedAt(formats strfmt.Registry) error { return nil } +// ContextValidate validate this v2beta1 recurring run based on the context it is used +func (m *V2beta1RecurringRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMode(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNamespace(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePipelineVersionReference(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRuntimeConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTrigger(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1RecurringRun) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *V2beta1RecurringRun) contextValidateMode(ctx context.Context, formats strfmt.Registry) error { + + if m.Mode != nil { + + if swag.IsZero(m.Mode) { // not required + return nil + } + + if err := m.Mode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mode") + } + return err + } + } + + return nil +} + +func (m *V2beta1RecurringRun) contextValidateNamespace(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "namespace", "body", string(m.Namespace)); err != nil { + return err + } + + return nil +} + +func (m *V2beta1RecurringRun) contextValidatePipelineVersionReference(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineVersionReference != nil { + + if swag.IsZero(m.PipelineVersionReference) { // not required + return nil + } + + if err := m.PipelineVersionReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_version_reference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_version_reference") + } + return err + } + } + + return nil +} + +func (m *V2beta1RecurringRun) contextValidateRuntimeConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.RuntimeConfig != nil { + + if swag.IsZero(m.RuntimeConfig) { // not required + return nil + } + + if err := m.RuntimeConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") + } + return err + } + } + + return nil +} + +func (m *V2beta1RecurringRun) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +func (m *V2beta1RecurringRun) contextValidateTrigger(ctx context.Context, formats strfmt.Registry) error { + + if m.Trigger != nil { + + if swag.IsZero(m.Trigger) { // not required + return nil + } + + if err := m.Trigger.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("trigger") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("trigger") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *V2beta1RecurringRun) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_recurring_run_status.go b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_recurring_run_status.go index 5a6ed03d94d..ad278dc6262 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_recurring_run_status.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_recurring_run_status.go @@ -6,18 +6,28 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V2beta1RecurringRunStatus Output. The status of the recurring run. +// // swagger:model v2beta1RecurringRunStatus type V2beta1RecurringRunStatus string +func NewV2beta1RecurringRunStatus(value V2beta1RecurringRunStatus) *V2beta1RecurringRunStatus { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V2beta1RecurringRunStatus. +func (m V2beta1RecurringRunStatus) Pointer() *V2beta1RecurringRunStatus { + return &m +} + const ( // V2beta1RecurringRunStatusSTATUSUNSPECIFIED captures enum value "STATUS_UNSPECIFIED" @@ -44,7 +54,7 @@ func init() { } func (m V2beta1RecurringRunStatus) validateV2beta1RecurringRunStatusEnum(path, location string, value V2beta1RecurringRunStatus) error { - if err := validate.Enum(path, location, value, v2beta1RecurringRunStatusEnum); err != nil { + if err := validate.EnumCase(path, location, value, v2beta1RecurringRunStatusEnum, true); err != nil { return err } return nil @@ -64,3 +74,8 @@ func (m V2beta1RecurringRunStatus) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v2beta1 recurring run status based on context it is used +func (m V2beta1RecurringRunStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_runtime_config.go b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_runtime_config.go index 79f4b25883f..86ae035c698 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_runtime_config.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_runtime_config.go @@ -6,12 +6,14 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1RuntimeConfig The runtime config. +// // swagger:model v2beta1RuntimeConfig type V2beta1RuntimeConfig struct { @@ -31,6 +33,11 @@ func (m *V2beta1RuntimeConfig) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v2beta1 runtime config based on context it is used +func (m *V2beta1RuntimeConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1RuntimeConfig) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_trigger.go b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_trigger.go index d738fe08810..e553ea38787 100644 --- a/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_trigger.go +++ b/backend/api/v2beta1/go_http_client/recurring_run_model/v2beta1_trigger.go @@ -6,13 +6,15 @@ package recurring_run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1Trigger Trigger defines what starts a pipeline run. +// // swagger:model v2beta1Trigger type V2beta1Trigger struct { @@ -42,7 +44,6 @@ func (m *V2beta1Trigger) Validate(formats strfmt.Registry) error { } func (m *V2beta1Trigger) validateCronSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.CronSchedule) { // not required return nil } @@ -51,6 +52,8 @@ func (m *V2beta1Trigger) validateCronSchedule(formats strfmt.Registry) error { if err := m.CronSchedule.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("cron_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cron_schedule") } return err } @@ -60,7 +63,6 @@ func (m *V2beta1Trigger) validateCronSchedule(formats strfmt.Registry) error { } func (m *V2beta1Trigger) validatePeriodicSchedule(formats strfmt.Registry) error { - if swag.IsZero(m.PeriodicSchedule) { // not required return nil } @@ -69,6 +71,68 @@ func (m *V2beta1Trigger) validatePeriodicSchedule(formats strfmt.Registry) error if err := m.PeriodicSchedule.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("periodic_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("periodic_schedule") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 trigger based on the context it is used +func (m *V2beta1Trigger) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCronSchedule(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePeriodicSchedule(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1Trigger) contextValidateCronSchedule(ctx context.Context, formats strfmt.Registry) error { + + if m.CronSchedule != nil { + + if swag.IsZero(m.CronSchedule) { // not required + return nil + } + + if err := m.CronSchedule.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cron_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cron_schedule") + } + return err + } + } + + return nil +} + +func (m *V2beta1Trigger) contextValidatePeriodicSchedule(ctx context.Context, formats strfmt.Registry) error { + + if m.PeriodicSchedule != nil { + + if swag.IsZero(m.PeriodicSchedule) { // not required + return nil + } + + if err := m.PeriodicSchedule.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("periodic_schedule") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("periodic_schedule") } return err } diff --git a/backend/api/v2beta1/go_http_client/run_client/run_client.go b/backend/api/v2beta1/go_http_client/run_client/run_client.go index 07aff5762d2..fbcf27a2a1f 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_client.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_client.go @@ -8,8 +8,7 @@ package run_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_client/run_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Run { cli := new(Run) cli.Transport = transport - cli.RunService = run_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Run is a client for run type Run struct { - RunService *run_service.Client + RunService run_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Run struct { // SetTransport changes the transport on the client and all its subresources func (c *Run) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.RunService.SetTransport(transport) - } diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_archive_run_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_archive_run_parameters.go index 7862fd62a43..6de30787179 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_archive_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_archive_run_parameters.go @@ -13,57 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceArchiveRunParams creates a new RunServiceArchiveRunParams object -// with the default values initialized. +// NewRunServiceArchiveRunParams creates a new RunServiceArchiveRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceArchiveRunParams() *RunServiceArchiveRunParams { - var () return &RunServiceArchiveRunParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceArchiveRunParamsWithTimeout creates a new RunServiceArchiveRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceArchiveRunParamsWithTimeout(timeout time.Duration) *RunServiceArchiveRunParams { - var () return &RunServiceArchiveRunParams{ - timeout: timeout, } } // NewRunServiceArchiveRunParamsWithContext creates a new RunServiceArchiveRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceArchiveRunParamsWithContext(ctx context.Context) *RunServiceArchiveRunParams { - var () return &RunServiceArchiveRunParams{ - Context: ctx, } } // NewRunServiceArchiveRunParamsWithHTTPClient creates a new RunServiceArchiveRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceArchiveRunParamsWithHTTPClient(client *http.Client) *RunServiceArchiveRunParams { - var () return &RunServiceArchiveRunParams{ HTTPClient: client, } } -/*RunServiceArchiveRunParams contains all the parameters to send to the API endpoint -for the run service archive run operation typically these are written to a http.Request +/* +RunServiceArchiveRunParams contains all the parameters to send to the API endpoint + + for the run service archive run operation. + + Typically these are written to a http.Request. */ type RunServiceArchiveRunParams struct { - /*RunID - The ID of the run to be archived. + /* ExperimentID. + The ID of the parent experiment. + */ + ExperimentID *string + + /* RunID. + + The ID of the run to be archived. */ RunID string @@ -72,6 +78,21 @@ type RunServiceArchiveRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service archive run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceArchiveRunParams) WithDefaults() *RunServiceArchiveRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service archive run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceArchiveRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service archive run params func (o *RunServiceArchiveRunParams) WithTimeout(timeout time.Duration) *RunServiceArchiveRunParams { o.SetTimeout(timeout) @@ -105,6 +126,17 @@ func (o *RunServiceArchiveRunParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithExperimentID adds the experimentID to the run service archive run params +func (o *RunServiceArchiveRunParams) WithExperimentID(experimentID *string) *RunServiceArchiveRunParams { + o.SetExperimentID(experimentID) + return o +} + +// SetExperimentID adds the experimentId to the run service archive run params +func (o *RunServiceArchiveRunParams) SetExperimentID(experimentID *string) { + o.ExperimentID = experimentID +} + // WithRunID adds the runID to the run service archive run params func (o *RunServiceArchiveRunParams) WithRunID(runID string) *RunServiceArchiveRunParams { o.SetRunID(runID) @@ -124,6 +156,23 @@ func (o *RunServiceArchiveRunParams) WriteToRequest(r runtime.ClientRequest, reg } var res []error + if o.ExperimentID != nil { + + // query param experiment_id + var qrExperimentID string + + if o.ExperimentID != nil { + qrExperimentID = *o.ExperimentID + } + qExperimentID := qrExperimentID + if qExperimentID != "" { + + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { + return err + } + } + } + // path param run_id if err := r.SetPathParam("run_id", o.RunID); err != nil { return err diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_archive_run_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_archive_run_responses.go index 632449506a2..595c093940d 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_archive_run_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_archive_run_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceArchiveRunReader is a Reader for the RunServiceArchiveRun structure. @@ -24,14 +24,12 @@ type RunServiceArchiveRunReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceArchiveRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceArchiveRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceArchiveRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceArchiveRunOK() *RunServiceArchiveRunOK { return &RunServiceArchiveRunOK{} } -/*RunServiceArchiveRunOK handles this case with default header values. +/* +RunServiceArchiveRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceArchiveRunOK struct { Payload interface{} } +// IsSuccess returns true when this run service archive run o k response has a 2xx status code +func (o *RunServiceArchiveRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service archive run o k response has a 3xx status code +func (o *RunServiceArchiveRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service archive run o k response has a 4xx status code +func (o *RunServiceArchiveRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service archive run o k response has a 5xx status code +func (o *RunServiceArchiveRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service archive run o k response a status code equal to that given +func (o *RunServiceArchiveRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service archive run o k response +func (o *RunServiceArchiveRunOK) Code() int { + return 200 +} + func (o *RunServiceArchiveRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:archive][%d] runServiceArchiveRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:archive][%d] runServiceArchiveRunOK %s", 200, payload) +} + +func (o *RunServiceArchiveRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:archive][%d] runServiceArchiveRunOK %s", 200, payload) +} + +func (o *RunServiceArchiveRunOK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceArchiveRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceArchiveRunDefault(code int) *RunServiceArchiveRunDefault { } } -/*RunServiceArchiveRunDefault handles this case with default header values. +/* +RunServiceArchiveRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceArchiveRunDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service archive run default response has a 2xx status code +func (o *RunServiceArchiveRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service archive run default response has a 3xx status code +func (o *RunServiceArchiveRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service archive run default response has a 4xx status code +func (o *RunServiceArchiveRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service archive run default response has a 5xx status code +func (o *RunServiceArchiveRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service archive run default response a status code equal to that given +func (o *RunServiceArchiveRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service archive run default response @@ -94,12 +159,22 @@ func (o *RunServiceArchiveRunDefault) Code() int { } func (o *RunServiceArchiveRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:archive][%d] RunService_ArchiveRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:archive][%d] RunService_ArchiveRun default %s", o._statusCode, payload) +} + +func (o *RunServiceArchiveRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:archive][%d] RunService_ArchiveRun default %s", o._statusCode, payload) +} + +func (o *RunServiceArchiveRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceArchiveRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_client.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_client.go index c85ddbfe03d..3aa7c5bdddc 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_client.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_client.go @@ -7,15 +7,40 @@ package run_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new run service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new run service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new run service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for run service API */ @@ -24,16 +49,41 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + RunServiceArchiveRun(params *RunServiceArchiveRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceArchiveRunOK, error) + + RunServiceCreateRun(params *RunServiceCreateRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceCreateRunOK, error) + + RunServiceDeleteRun(params *RunServiceDeleteRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceDeleteRunOK, error) + + RunServiceGetRun(params *RunServiceGetRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceGetRunOK, error) + + RunServiceListRuns(params *RunServiceListRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceListRunsOK, error) + + RunServiceReadArtifact(params *RunServiceReadArtifactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReadArtifactOK, error) + + RunServiceRetryRun(params *RunServiceRetryRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceRetryRunOK, error) + + RunServiceTerminateRun(params *RunServiceTerminateRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceTerminateRunOK, error) + + RunServiceUnarchiveRun(params *RunServiceUnarchiveRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceUnarchiveRunOK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* RunServiceArchiveRun archives a run in an experiment given by run ID and experiment ID */ -func (a *Client) RunServiceArchiveRun(params *RunServiceArchiveRunParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceArchiveRunOK, error) { +func (a *Client) RunServiceArchiveRun(params *RunServiceArchiveRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceArchiveRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceArchiveRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_ArchiveRun", Method: "POST", PathPattern: "/apis/v2beta1/runs/{run_id}:archive", @@ -45,24 +95,33 @@ func (a *Client) RunServiceArchiveRun(params *RunServiceArchiveRunParams, authIn AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceArchiveRunOK), nil - + success, ok := result.(*RunServiceArchiveRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceArchiveRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceCreateRun creates a new run in an experiment specified by experiment ID if experiment ID is not specified the run is created in the default experiment */ -func (a *Client) RunServiceCreateRun(params *RunServiceCreateRunParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceCreateRunOK, error) { +func (a *Client) RunServiceCreateRun(params *RunServiceCreateRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceCreateRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceCreateRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_CreateRun", Method: "POST", PathPattern: "/apis/v2beta1/runs", @@ -74,24 +133,33 @@ func (a *Client) RunServiceCreateRun(params *RunServiceCreateRunParams, authInfo AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceCreateRunOK), nil - + success, ok := result.(*RunServiceCreateRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceCreateRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceDeleteRun deletes a run in an experiment given by run ID and experiment ID */ -func (a *Client) RunServiceDeleteRun(params *RunServiceDeleteRunParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceDeleteRunOK, error) { +func (a *Client) RunServiceDeleteRun(params *RunServiceDeleteRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceDeleteRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceDeleteRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_DeleteRun", Method: "DELETE", PathPattern: "/apis/v2beta1/runs/{run_id}", @@ -103,24 +171,33 @@ func (a *Client) RunServiceDeleteRun(params *RunServiceDeleteRunParams, authInfo AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceDeleteRunOK), nil - + success, ok := result.(*RunServiceDeleteRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceDeleteRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceGetRun finds a specific run by ID */ -func (a *Client) RunServiceGetRun(params *RunServiceGetRunParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceGetRunOK, error) { +func (a *Client) RunServiceGetRun(params *RunServiceGetRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceGetRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceGetRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_GetRun", Method: "GET", PathPattern: "/apis/v2beta1/runs/{run_id}", @@ -132,24 +209,33 @@ func (a *Client) RunServiceGetRun(params *RunServiceGetRunParams, authInfo runti AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceGetRunOK), nil - + success, ok := result.(*RunServiceGetRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceGetRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceListRuns finds all runs in an experiment given by experiment ID if experiment id is not specified finds all runs across all experiments */ -func (a *Client) RunServiceListRuns(params *RunServiceListRunsParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceListRunsOK, error) { +func (a *Client) RunServiceListRuns(params *RunServiceListRunsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceListRunsOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceListRunsParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_ListRuns", Method: "GET", PathPattern: "/apis/v2beta1/runs", @@ -161,24 +247,33 @@ func (a *Client) RunServiceListRuns(params *RunServiceListRunsParams, authInfo r AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceListRunsOK), nil - + success, ok := result.(*RunServiceListRunsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceListRunsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceReadArtifact finds artifact data in a run */ -func (a *Client) RunServiceReadArtifact(params *RunServiceReadArtifactParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceReadArtifactOK, error) { +func (a *Client) RunServiceReadArtifact(params *RunServiceReadArtifactParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceReadArtifactOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceReadArtifactParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_ReadArtifact", Method: "GET", PathPattern: "/apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read", @@ -190,24 +285,33 @@ func (a *Client) RunServiceReadArtifact(params *RunServiceReadArtifactParams, au AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceReadArtifactOK), nil - + success, ok := result.(*RunServiceReadArtifactOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceReadArtifactDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceRetryRun res initiates a failed or terminated run */ -func (a *Client) RunServiceRetryRun(params *RunServiceRetryRunParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceRetryRunOK, error) { +func (a *Client) RunServiceRetryRun(params *RunServiceRetryRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceRetryRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceRetryRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_RetryRun", Method: "POST", PathPattern: "/apis/v2beta1/runs/{run_id}:retry", @@ -219,24 +323,33 @@ func (a *Client) RunServiceRetryRun(params *RunServiceRetryRunParams, authInfo r AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceRetryRunOK), nil - + success, ok := result.(*RunServiceRetryRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceRetryRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceTerminateRun terminates an active run */ -func (a *Client) RunServiceTerminateRun(params *RunServiceTerminateRunParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceTerminateRunOK, error) { +func (a *Client) RunServiceTerminateRun(params *RunServiceTerminateRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceTerminateRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceTerminateRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_TerminateRun", Method: "POST", PathPattern: "/apis/v2beta1/runs/{run_id}:terminate", @@ -248,24 +361,33 @@ func (a *Client) RunServiceTerminateRun(params *RunServiceTerminateRunParams, au AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceTerminateRunOK), nil - + success, ok := result.(*RunServiceTerminateRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceTerminateRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* RunServiceUnarchiveRun restores an archived run in an experiment given by run ID and experiment ID */ -func (a *Client) RunServiceUnarchiveRun(params *RunServiceUnarchiveRunParams, authInfo runtime.ClientAuthInfoWriter) (*RunServiceUnarchiveRunOK, error) { +func (a *Client) RunServiceUnarchiveRun(params *RunServiceUnarchiveRunParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RunServiceUnarchiveRunOK, error) { // TODO: Validate the params before sending if params == nil { params = NewRunServiceUnarchiveRunParams() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "RunService_UnarchiveRun", Method: "POST", PathPattern: "/apis/v2beta1/runs/{run_id}:unarchive", @@ -277,12 +399,22 @@ func (a *Client) RunServiceUnarchiveRun(params *RunServiceUnarchiveRunParams, au AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*RunServiceUnarchiveRunOK), nil - + success, ok := result.(*RunServiceUnarchiveRunOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RunServiceUnarchiveRunDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_create_run_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_create_run_parameters.go index 15191d5c560..4bad2b61f74 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_create_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_create_run_parameters.go @@ -13,72 +13,88 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) -// NewRunServiceCreateRunParams creates a new RunServiceCreateRunParams object -// with the default values initialized. +// NewRunServiceCreateRunParams creates a new RunServiceCreateRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceCreateRunParams() *RunServiceCreateRunParams { - var () return &RunServiceCreateRunParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceCreateRunParamsWithTimeout creates a new RunServiceCreateRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceCreateRunParamsWithTimeout(timeout time.Duration) *RunServiceCreateRunParams { - var () return &RunServiceCreateRunParams{ - timeout: timeout, } } // NewRunServiceCreateRunParamsWithContext creates a new RunServiceCreateRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceCreateRunParamsWithContext(ctx context.Context) *RunServiceCreateRunParams { - var () return &RunServiceCreateRunParams{ - Context: ctx, } } // NewRunServiceCreateRunParamsWithHTTPClient creates a new RunServiceCreateRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceCreateRunParamsWithHTTPClient(client *http.Client) *RunServiceCreateRunParams { - var () return &RunServiceCreateRunParams{ HTTPClient: client, } } -/*RunServiceCreateRunParams contains all the parameters to send to the API endpoint -for the run service create run operation typically these are written to a http.Request +/* +RunServiceCreateRunParams contains all the parameters to send to the API endpoint + + for the run service create run operation. + + Typically these are written to a http.Request. */ type RunServiceCreateRunParams struct { - /*Body - Run to be created. + /* ExperimentID. + The ID of the parent experiment. */ - Body *run_model.V2beta1Run - /*ExperimentID - The ID of the parent experiment. + ExperimentID *string + /* Run. + + Run to be created. */ - ExperimentID *string + Run *run_model.V2beta1Run timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service create run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceCreateRunParams) WithDefaults() *RunServiceCreateRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service create run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceCreateRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service create run params func (o *RunServiceCreateRunParams) WithTimeout(timeout time.Duration) *RunServiceCreateRunParams { o.SetTimeout(timeout) @@ -112,17 +128,6 @@ func (o *RunServiceCreateRunParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the run service create run params -func (o *RunServiceCreateRunParams) WithBody(body *run_model.V2beta1Run) *RunServiceCreateRunParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the run service create run params -func (o *RunServiceCreateRunParams) SetBody(body *run_model.V2beta1Run) { - o.Body = body -} - // WithExperimentID adds the experimentID to the run service create run params func (o *RunServiceCreateRunParams) WithExperimentID(experimentID *string) *RunServiceCreateRunParams { o.SetExperimentID(experimentID) @@ -134,6 +139,17 @@ func (o *RunServiceCreateRunParams) SetExperimentID(experimentID *string) { o.ExperimentID = experimentID } +// WithRun adds the run to the run service create run params +func (o *RunServiceCreateRunParams) WithRun(run *run_model.V2beta1Run) *RunServiceCreateRunParams { + o.SetRun(run) + return o +} + +// SetRun adds the run to the run service create run params +func (o *RunServiceCreateRunParams) SetRun(run *run_model.V2beta1Run) { + o.Run = run +} + // WriteToRequest writes these params to a swagger request func (o *RunServiceCreateRunParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -142,26 +158,26 @@ func (o *RunServiceCreateRunParams) WriteToRequest(r runtime.ClientRequest, reg } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - if o.ExperimentID != nil { // query param experiment_id var qrExperimentID string + if o.ExperimentID != nil { qrExperimentID = *o.ExperimentID } qExperimentID := qrExperimentID if qExperimentID != "" { + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { return err } } - + } + if o.Run != nil { + if err := r.SetBodyParam(o.Run); err != nil { + return err + } } if len(res) > 0 { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_create_run_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_create_run_responses.go index d2f26101150..68976167a50 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_create_run_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_create_run_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceCreateRunReader is a Reader for the RunServiceCreateRun structure. @@ -24,14 +24,12 @@ type RunServiceCreateRunReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceCreateRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceCreateRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceCreateRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceCreateRunOK() *RunServiceCreateRunOK { return &RunServiceCreateRunOK{} } -/*RunServiceCreateRunOK handles this case with default header values. +/* +RunServiceCreateRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceCreateRunOK struct { Payload *run_model.V2beta1Run } +// IsSuccess returns true when this run service create run o k response has a 2xx status code +func (o *RunServiceCreateRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service create run o k response has a 3xx status code +func (o *RunServiceCreateRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service create run o k response has a 4xx status code +func (o *RunServiceCreateRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service create run o k response has a 5xx status code +func (o *RunServiceCreateRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service create run o k response a status code equal to that given +func (o *RunServiceCreateRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service create run o k response +func (o *RunServiceCreateRunOK) Code() int { + return 200 +} + func (o *RunServiceCreateRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs][%d] runServiceCreateRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs][%d] runServiceCreateRunOK %s", 200, payload) +} + +func (o *RunServiceCreateRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs][%d] runServiceCreateRunOK %s", 200, payload) +} + +func (o *RunServiceCreateRunOK) GetPayload() *run_model.V2beta1Run { + return o.Payload } func (o *RunServiceCreateRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceCreateRunDefault(code int) *RunServiceCreateRunDefault { } } -/*RunServiceCreateRunDefault handles this case with default header values. +/* +RunServiceCreateRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceCreateRunDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service create run default response has a 2xx status code +func (o *RunServiceCreateRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service create run default response has a 3xx status code +func (o *RunServiceCreateRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service create run default response has a 4xx status code +func (o *RunServiceCreateRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service create run default response has a 5xx status code +func (o *RunServiceCreateRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service create run default response a status code equal to that given +func (o *RunServiceCreateRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service create run default response @@ -96,12 +161,22 @@ func (o *RunServiceCreateRunDefault) Code() int { } func (o *RunServiceCreateRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs][%d] RunService_CreateRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs][%d] RunService_CreateRun default %s", o._statusCode, payload) +} + +func (o *RunServiceCreateRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs][%d] RunService_CreateRun default %s", o._statusCode, payload) +} + +func (o *RunServiceCreateRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceCreateRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_delete_run_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_delete_run_parameters.go index 888540f2134..d47f8c2ce95 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_delete_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_delete_run_parameters.go @@ -13,62 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceDeleteRunParams creates a new RunServiceDeleteRunParams object -// with the default values initialized. +// NewRunServiceDeleteRunParams creates a new RunServiceDeleteRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceDeleteRunParams() *RunServiceDeleteRunParams { - var () return &RunServiceDeleteRunParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceDeleteRunParamsWithTimeout creates a new RunServiceDeleteRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceDeleteRunParamsWithTimeout(timeout time.Duration) *RunServiceDeleteRunParams { - var () return &RunServiceDeleteRunParams{ - timeout: timeout, } } // NewRunServiceDeleteRunParamsWithContext creates a new RunServiceDeleteRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceDeleteRunParamsWithContext(ctx context.Context) *RunServiceDeleteRunParams { - var () return &RunServiceDeleteRunParams{ - Context: ctx, } } // NewRunServiceDeleteRunParamsWithHTTPClient creates a new RunServiceDeleteRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceDeleteRunParamsWithHTTPClient(client *http.Client) *RunServiceDeleteRunParams { - var () return &RunServiceDeleteRunParams{ HTTPClient: client, } } -/*RunServiceDeleteRunParams contains all the parameters to send to the API endpoint -for the run service delete run operation typically these are written to a http.Request +/* +RunServiceDeleteRunParams contains all the parameters to send to the API endpoint + + for the run service delete run operation. + + Typically these are written to a http.Request. */ type RunServiceDeleteRunParams struct { - /*ExperimentID - The ID of the parent experiment. + /* ExperimentID. + The ID of the parent experiment. */ ExperimentID *string - /*RunID - The ID of the run to be deleted. + /* RunID. + + The ID of the run to be deleted. */ RunID string @@ -77,6 +78,21 @@ type RunServiceDeleteRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service delete run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceDeleteRunParams) WithDefaults() *RunServiceDeleteRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service delete run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceDeleteRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service delete run params func (o *RunServiceDeleteRunParams) WithTimeout(timeout time.Duration) *RunServiceDeleteRunParams { o.SetTimeout(timeout) @@ -144,16 +160,17 @@ func (o *RunServiceDeleteRunParams) WriteToRequest(r runtime.ClientRequest, reg // query param experiment_id var qrExperimentID string + if o.ExperimentID != nil { qrExperimentID = *o.ExperimentID } qExperimentID := qrExperimentID if qExperimentID != "" { + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { return err } } - } // path param run_id diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_delete_run_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_delete_run_responses.go index cc5038ddd3a..228452e5984 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_delete_run_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_delete_run_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceDeleteRunReader is a Reader for the RunServiceDeleteRun structure. @@ -24,14 +24,12 @@ type RunServiceDeleteRunReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceDeleteRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceDeleteRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceDeleteRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceDeleteRunOK() *RunServiceDeleteRunOK { return &RunServiceDeleteRunOK{} } -/*RunServiceDeleteRunOK handles this case with default header values. +/* +RunServiceDeleteRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceDeleteRunOK struct { Payload interface{} } +// IsSuccess returns true when this run service delete run o k response has a 2xx status code +func (o *RunServiceDeleteRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service delete run o k response has a 3xx status code +func (o *RunServiceDeleteRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service delete run o k response has a 4xx status code +func (o *RunServiceDeleteRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service delete run o k response has a 5xx status code +func (o *RunServiceDeleteRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service delete run o k response a status code equal to that given +func (o *RunServiceDeleteRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service delete run o k response +func (o *RunServiceDeleteRunOK) Code() int { + return 200 +} + func (o *RunServiceDeleteRunOK) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/runs/{run_id}][%d] runServiceDeleteRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/runs/{run_id}][%d] runServiceDeleteRunOK %s", 200, payload) +} + +func (o *RunServiceDeleteRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/runs/{run_id}][%d] runServiceDeleteRunOK %s", 200, payload) +} + +func (o *RunServiceDeleteRunOK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceDeleteRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceDeleteRunDefault(code int) *RunServiceDeleteRunDefault { } } -/*RunServiceDeleteRunDefault handles this case with default header values. +/* +RunServiceDeleteRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceDeleteRunDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service delete run default response has a 2xx status code +func (o *RunServiceDeleteRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service delete run default response has a 3xx status code +func (o *RunServiceDeleteRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service delete run default response has a 4xx status code +func (o *RunServiceDeleteRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service delete run default response has a 5xx status code +func (o *RunServiceDeleteRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service delete run default response a status code equal to that given +func (o *RunServiceDeleteRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service delete run default response @@ -94,12 +159,22 @@ func (o *RunServiceDeleteRunDefault) Code() int { } func (o *RunServiceDeleteRunDefault) Error() string { - return fmt.Sprintf("[DELETE /apis/v2beta1/runs/{run_id}][%d] RunService_DeleteRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/runs/{run_id}][%d] RunService_DeleteRun default %s", o._statusCode, payload) +} + +func (o *RunServiceDeleteRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /apis/v2beta1/runs/{run_id}][%d] RunService_DeleteRun default %s", o._statusCode, payload) +} + +func (o *RunServiceDeleteRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceDeleteRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_get_run_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_get_run_parameters.go index 275ab822898..0a8a491eddf 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_get_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_get_run_parameters.go @@ -13,62 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceGetRunParams creates a new RunServiceGetRunParams object -// with the default values initialized. +// NewRunServiceGetRunParams creates a new RunServiceGetRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceGetRunParams() *RunServiceGetRunParams { - var () return &RunServiceGetRunParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceGetRunParamsWithTimeout creates a new RunServiceGetRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceGetRunParamsWithTimeout(timeout time.Duration) *RunServiceGetRunParams { - var () return &RunServiceGetRunParams{ - timeout: timeout, } } // NewRunServiceGetRunParamsWithContext creates a new RunServiceGetRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceGetRunParamsWithContext(ctx context.Context) *RunServiceGetRunParams { - var () return &RunServiceGetRunParams{ - Context: ctx, } } // NewRunServiceGetRunParamsWithHTTPClient creates a new RunServiceGetRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceGetRunParamsWithHTTPClient(client *http.Client) *RunServiceGetRunParams { - var () return &RunServiceGetRunParams{ HTTPClient: client, } } -/*RunServiceGetRunParams contains all the parameters to send to the API endpoint -for the run service get run operation typically these are written to a http.Request +/* +RunServiceGetRunParams contains all the parameters to send to the API endpoint + + for the run service get run operation. + + Typically these are written to a http.Request. */ type RunServiceGetRunParams struct { - /*ExperimentID - The ID of the parent experiment. + /* ExperimentID. + The ID of the parent experiment. */ ExperimentID *string - /*RunID - The ID of the run to be retrieved. + /* RunID. + + The ID of the run to be retrieved. */ RunID string @@ -77,6 +78,21 @@ type RunServiceGetRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service get run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceGetRunParams) WithDefaults() *RunServiceGetRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service get run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceGetRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service get run params func (o *RunServiceGetRunParams) WithTimeout(timeout time.Duration) *RunServiceGetRunParams { o.SetTimeout(timeout) @@ -144,16 +160,17 @@ func (o *RunServiceGetRunParams) WriteToRequest(r runtime.ClientRequest, reg str // query param experiment_id var qrExperimentID string + if o.ExperimentID != nil { qrExperimentID = *o.ExperimentID } qExperimentID := qrExperimentID if qExperimentID != "" { + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { return err } } - } // path param run_id diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_get_run_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_get_run_responses.go index 841e336807d..821591a7a07 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_get_run_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_get_run_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceGetRunReader is a Reader for the RunServiceGetRun structure. @@ -24,14 +24,12 @@ type RunServiceGetRunReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceGetRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceGetRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceGetRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceGetRunOK() *RunServiceGetRunOK { return &RunServiceGetRunOK{} } -/*RunServiceGetRunOK handles this case with default header values. +/* +RunServiceGetRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceGetRunOK struct { Payload *run_model.V2beta1Run } +// IsSuccess returns true when this run service get run o k response has a 2xx status code +func (o *RunServiceGetRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service get run o k response has a 3xx status code +func (o *RunServiceGetRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service get run o k response has a 4xx status code +func (o *RunServiceGetRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service get run o k response has a 5xx status code +func (o *RunServiceGetRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service get run o k response a status code equal to that given +func (o *RunServiceGetRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service get run o k response +func (o *RunServiceGetRunOK) Code() int { + return 200 +} + func (o *RunServiceGetRunOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}][%d] runServiceGetRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}][%d] runServiceGetRunOK %s", 200, payload) +} + +func (o *RunServiceGetRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}][%d] runServiceGetRunOK %s", 200, payload) +} + +func (o *RunServiceGetRunOK) GetPayload() *run_model.V2beta1Run { + return o.Payload } func (o *RunServiceGetRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceGetRunDefault(code int) *RunServiceGetRunDefault { } } -/*RunServiceGetRunDefault handles this case with default header values. +/* +RunServiceGetRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceGetRunDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service get run default response has a 2xx status code +func (o *RunServiceGetRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service get run default response has a 3xx status code +func (o *RunServiceGetRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service get run default response has a 4xx status code +func (o *RunServiceGetRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service get run default response has a 5xx status code +func (o *RunServiceGetRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service get run default response a status code equal to that given +func (o *RunServiceGetRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service get run default response @@ -96,12 +161,22 @@ func (o *RunServiceGetRunDefault) Code() int { } func (o *RunServiceGetRunDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}][%d] RunService_GetRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}][%d] RunService_GetRun default %s", o._statusCode, payload) +} + +func (o *RunServiceGetRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}][%d] RunService_GetRun default %s", o._statusCode, payload) +} + +func (o *RunServiceGetRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceGetRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_list_runs_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_list_runs_parameters.go index 568fd926c09..dc64db86ee5 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_list_runs_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_list_runs_parameters.go @@ -13,89 +13,96 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - - strfmt "github.com/go-openapi/strfmt" ) -// NewRunServiceListRunsParams creates a new RunServiceListRunsParams object -// with the default values initialized. +// NewRunServiceListRunsParams creates a new RunServiceListRunsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceListRunsParams() *RunServiceListRunsParams { - var () return &RunServiceListRunsParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceListRunsParamsWithTimeout creates a new RunServiceListRunsParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceListRunsParamsWithTimeout(timeout time.Duration) *RunServiceListRunsParams { - var () return &RunServiceListRunsParams{ - timeout: timeout, } } // NewRunServiceListRunsParamsWithContext creates a new RunServiceListRunsParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceListRunsParamsWithContext(ctx context.Context) *RunServiceListRunsParams { - var () return &RunServiceListRunsParams{ - Context: ctx, } } // NewRunServiceListRunsParamsWithHTTPClient creates a new RunServiceListRunsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceListRunsParamsWithHTTPClient(client *http.Client) *RunServiceListRunsParams { - var () return &RunServiceListRunsParams{ HTTPClient: client, } } -/*RunServiceListRunsParams contains all the parameters to send to the API endpoint -for the run service list runs operation typically these are written to a http.Request +/* +RunServiceListRunsParams contains all the parameters to send to the API endpoint + + for the run service list runs operation. + + Typically these are written to a http.Request. */ type RunServiceListRunsParams struct { - /*ExperimentID - The ID of the parent experiment. If empty, response includes runs across all experiments. + /* ExperimentID. + The ID of the parent experiment. If empty, response includes runs across all experiments. */ ExperimentID *string - /*Filter - A url-encoded, JSON-serialized Filter protocol buffer (see - [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). + /* Filter. + + A url-encoded, JSON-serialized Filter protocol buffer (see + [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). */ Filter *string - /*Namespace - Optional input field. Filters based on the namespace. + /* Namespace. + + Optional input field. Filters based on the namespace. */ Namespace *string - /*PageSize - The number of runs to be listed per page. If there are more runs than this + + /* PageSize. + + The number of runs to be listed per page. If there are more runs than this number, the response message will contain a nextPageToken field you can use to fetch the next page. + Format: int32 */ PageSize *int32 - /*PageToken - A page token to request the next page of results. The token is acquired + + /* PageToken. + + A page token to request the next page of results. The token is acquired from the nextPageToken field of the response from the previous ListRuns call or can be omitted when fetching the first page. - */ PageToken *string - /*SortBy - Can be format of "field_name", "field_name asc" or "field_name desc" - (Example, "name asc" or "id desc"). Ascending by default. + /* SortBy. + + Can be format of "field_name", "field_name asc" or "field_name desc" + (Example, "name asc" or "id desc"). Ascending by default. */ SortBy *string @@ -104,6 +111,21 @@ type RunServiceListRunsParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service list runs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceListRunsParams) WithDefaults() *RunServiceListRunsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service list runs params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceListRunsParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service list runs params func (o *RunServiceListRunsParams) WithTimeout(timeout time.Duration) *RunServiceListRunsParams { o.SetTimeout(timeout) @@ -215,96 +237,102 @@ func (o *RunServiceListRunsParams) WriteToRequest(r runtime.ClientRequest, reg s // query param experiment_id var qrExperimentID string + if o.ExperimentID != nil { qrExperimentID = *o.ExperimentID } qExperimentID := qrExperimentID if qExperimentID != "" { + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { return err } } - } if o.Filter != nil { // query param filter var qrFilter string + if o.Filter != nil { qrFilter = *o.Filter } qFilter := qrFilter if qFilter != "" { + if err := r.SetQueryParam("filter", qFilter); err != nil { return err } } - } if o.Namespace != nil { // query param namespace var qrNamespace string + if o.Namespace != nil { qrNamespace = *o.Namespace } qNamespace := qrNamespace if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { return err } } - } if o.PageSize != nil { // query param page_size var qrPageSize int32 + if o.PageSize != nil { qrPageSize = *o.PageSize } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } } - } if o.PageToken != nil { // query param page_token var qrPageToken string + if o.PageToken != nil { qrPageToken = *o.PageToken } qPageToken := qrPageToken if qPageToken != "" { + if err := r.SetQueryParam("page_token", qPageToken); err != nil { return err } } - } if o.SortBy != nil { // query param sort_by var qrSortBy string + if o.SortBy != nil { qrSortBy = *o.SortBy } qSortBy := qrSortBy if qSortBy != "" { + if err := r.SetQueryParam("sort_by", qSortBy); err != nil { return err } } - } if len(res) > 0 { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_list_runs_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_list_runs_responses.go index bb021bc140a..f4f4a657d6f 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_list_runs_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_list_runs_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceListRunsReader is a Reader for the RunServiceListRuns structure. @@ -24,14 +24,12 @@ type RunServiceListRunsReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceListRunsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceListRunsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceListRunsDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceListRunsOK() *RunServiceListRunsOK { return &RunServiceListRunsOK{} } -/*RunServiceListRunsOK handles this case with default header values. +/* +RunServiceListRunsOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceListRunsOK struct { Payload *run_model.V2beta1ListRunsResponse } +// IsSuccess returns true when this run service list runs o k response has a 2xx status code +func (o *RunServiceListRunsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service list runs o k response has a 3xx status code +func (o *RunServiceListRunsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service list runs o k response has a 4xx status code +func (o *RunServiceListRunsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service list runs o k response has a 5xx status code +func (o *RunServiceListRunsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service list runs o k response a status code equal to that given +func (o *RunServiceListRunsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service list runs o k response +func (o *RunServiceListRunsOK) Code() int { + return 200 +} + func (o *RunServiceListRunsOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/runs][%d] runServiceListRunsOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs][%d] runServiceListRunsOK %s", 200, payload) +} + +func (o *RunServiceListRunsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs][%d] runServiceListRunsOK %s", 200, payload) +} + +func (o *RunServiceListRunsOK) GetPayload() *run_model.V2beta1ListRunsResponse { + return o.Payload } func (o *RunServiceListRunsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceListRunsDefault(code int) *RunServiceListRunsDefault { } } -/*RunServiceListRunsDefault handles this case with default header values. +/* +RunServiceListRunsDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceListRunsDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service list runs default response has a 2xx status code +func (o *RunServiceListRunsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service list runs default response has a 3xx status code +func (o *RunServiceListRunsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service list runs default response has a 4xx status code +func (o *RunServiceListRunsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service list runs default response has a 5xx status code +func (o *RunServiceListRunsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service list runs default response a status code equal to that given +func (o *RunServiceListRunsDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service list runs default response @@ -96,12 +161,22 @@ func (o *RunServiceListRunsDefault) Code() int { } func (o *RunServiceListRunsDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/runs][%d] RunService_ListRuns default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs][%d] RunService_ListRuns default %s", o._statusCode, payload) +} + +func (o *RunServiceListRunsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs][%d] RunService_ListRuns default %s", o._statusCode, payload) +} + +func (o *RunServiceListRunsDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceListRunsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_read_artifact_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_read_artifact_parameters.go index 004a11ed3ef..fd8c3f85afd 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_read_artifact_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_read_artifact_parameters.go @@ -13,72 +13,75 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceReadArtifactParams creates a new RunServiceReadArtifactParams object -// with the default values initialized. +// NewRunServiceReadArtifactParams creates a new RunServiceReadArtifactParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceReadArtifactParams() *RunServiceReadArtifactParams { - var () return &RunServiceReadArtifactParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceReadArtifactParamsWithTimeout creates a new RunServiceReadArtifactParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceReadArtifactParamsWithTimeout(timeout time.Duration) *RunServiceReadArtifactParams { - var () return &RunServiceReadArtifactParams{ - timeout: timeout, } } // NewRunServiceReadArtifactParamsWithContext creates a new RunServiceReadArtifactParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceReadArtifactParamsWithContext(ctx context.Context) *RunServiceReadArtifactParams { - var () return &RunServiceReadArtifactParams{ - Context: ctx, } } // NewRunServiceReadArtifactParamsWithHTTPClient creates a new RunServiceReadArtifactParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceReadArtifactParamsWithHTTPClient(client *http.Client) *RunServiceReadArtifactParams { - var () return &RunServiceReadArtifactParams{ HTTPClient: client, } } -/*RunServiceReadArtifactParams contains all the parameters to send to the API endpoint -for the run service read artifact operation typically these are written to a http.Request +/* +RunServiceReadArtifactParams contains all the parameters to send to the API endpoint + + for the run service read artifact operation. + + Typically these are written to a http.Request. */ type RunServiceReadArtifactParams struct { - /*ArtifactName - Name of the artifact. + /* ArtifactName. + Name of the artifact. */ ArtifactName string - /*ExperimentID - The ID of the parent experiment. + /* ExperimentID. + + The ID of the parent experiment. */ ExperimentID *string - /*NodeID - ID of the running node. + /* NodeID. + + ID of the running node. */ NodeID string - /*RunID - ID of the run. + /* RunID. + + ID of the run. */ RunID string @@ -87,6 +90,21 @@ type RunServiceReadArtifactParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service read artifact params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReadArtifactParams) WithDefaults() *RunServiceReadArtifactParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service read artifact params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceReadArtifactParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service read artifact params func (o *RunServiceReadArtifactParams) WithTimeout(timeout time.Duration) *RunServiceReadArtifactParams { o.SetTimeout(timeout) @@ -181,16 +199,17 @@ func (o *RunServiceReadArtifactParams) WriteToRequest(r runtime.ClientRequest, r // query param experiment_id var qrExperimentID string + if o.ExperimentID != nil { qrExperimentID = *o.ExperimentID } qExperimentID := qrExperimentID if qExperimentID != "" { + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { return err } } - } // path param node_id diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_read_artifact_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_read_artifact_responses.go index ae1fc5c34df..0e86494ab93 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_read_artifact_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_read_artifact_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceReadArtifactReader is a Reader for the RunServiceReadArtifact structure. @@ -24,14 +24,12 @@ type RunServiceReadArtifactReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceReadArtifactReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceReadArtifactOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceReadArtifactDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceReadArtifactOK() *RunServiceReadArtifactOK { return &RunServiceReadArtifactOK{} } -/*RunServiceReadArtifactOK handles this case with default header values. +/* +RunServiceReadArtifactOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceReadArtifactOK struct { Payload *run_model.V2beta1ReadArtifactResponse } +// IsSuccess returns true when this run service read artifact o k response has a 2xx status code +func (o *RunServiceReadArtifactOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service read artifact o k response has a 3xx status code +func (o *RunServiceReadArtifactOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service read artifact o k response has a 4xx status code +func (o *RunServiceReadArtifactOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service read artifact o k response has a 5xx status code +func (o *RunServiceReadArtifactOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service read artifact o k response a status code equal to that given +func (o *RunServiceReadArtifactOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service read artifact o k response +func (o *RunServiceReadArtifactOK) Code() int { + return 200 +} + func (o *RunServiceReadArtifactOK) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] runServiceReadArtifactOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] runServiceReadArtifactOK %s", 200, payload) +} + +func (o *RunServiceReadArtifactOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] runServiceReadArtifactOK %s", 200, payload) +} + +func (o *RunServiceReadArtifactOK) GetPayload() *run_model.V2beta1ReadArtifactResponse { + return o.Payload } func (o *RunServiceReadArtifactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewRunServiceReadArtifactDefault(code int) *RunServiceReadArtifactDefault { } } -/*RunServiceReadArtifactDefault handles this case with default header values. +/* +RunServiceReadArtifactDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceReadArtifactDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service read artifact default response has a 2xx status code +func (o *RunServiceReadArtifactDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service read artifact default response has a 3xx status code +func (o *RunServiceReadArtifactDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service read artifact default response has a 4xx status code +func (o *RunServiceReadArtifactDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service read artifact default response has a 5xx status code +func (o *RunServiceReadArtifactDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service read artifact default response a status code equal to that given +func (o *RunServiceReadArtifactDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service read artifact default response @@ -96,12 +161,22 @@ func (o *RunServiceReadArtifactDefault) Code() int { } func (o *RunServiceReadArtifactDefault) Error() string { - return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] RunService_ReadArtifact default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] RunService_ReadArtifact default %s", o._statusCode, payload) +} + +func (o *RunServiceReadArtifactDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /apis/v2beta1/runs/{run_id}/nodes/{node_id}/artifacts/{artifact_name}:read][%d] RunService_ReadArtifact default %s", o._statusCode, payload) +} + +func (o *RunServiceReadArtifactDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceReadArtifactDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_retry_run_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_retry_run_parameters.go index 51d0e8634ea..3c69975e4f2 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_retry_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_retry_run_parameters.go @@ -13,57 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceRetryRunParams creates a new RunServiceRetryRunParams object -// with the default values initialized. +// NewRunServiceRetryRunParams creates a new RunServiceRetryRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceRetryRunParams() *RunServiceRetryRunParams { - var () return &RunServiceRetryRunParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceRetryRunParamsWithTimeout creates a new RunServiceRetryRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceRetryRunParamsWithTimeout(timeout time.Duration) *RunServiceRetryRunParams { - var () return &RunServiceRetryRunParams{ - timeout: timeout, } } // NewRunServiceRetryRunParamsWithContext creates a new RunServiceRetryRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceRetryRunParamsWithContext(ctx context.Context) *RunServiceRetryRunParams { - var () return &RunServiceRetryRunParams{ - Context: ctx, } } // NewRunServiceRetryRunParamsWithHTTPClient creates a new RunServiceRetryRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceRetryRunParamsWithHTTPClient(client *http.Client) *RunServiceRetryRunParams { - var () return &RunServiceRetryRunParams{ HTTPClient: client, } } -/*RunServiceRetryRunParams contains all the parameters to send to the API endpoint -for the run service retry run operation typically these are written to a http.Request +/* +RunServiceRetryRunParams contains all the parameters to send to the API endpoint + + for the run service retry run operation. + + Typically these are written to a http.Request. */ type RunServiceRetryRunParams struct { - /*RunID - The ID of the run to be retried. + /* ExperimentID. + The ID of the parent experiment. + */ + ExperimentID *string + + /* RunID. + + The ID of the run to be retried. */ RunID string @@ -72,6 +78,21 @@ type RunServiceRetryRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service retry run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceRetryRunParams) WithDefaults() *RunServiceRetryRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service retry run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceRetryRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service retry run params func (o *RunServiceRetryRunParams) WithTimeout(timeout time.Duration) *RunServiceRetryRunParams { o.SetTimeout(timeout) @@ -105,6 +126,17 @@ func (o *RunServiceRetryRunParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithExperimentID adds the experimentID to the run service retry run params +func (o *RunServiceRetryRunParams) WithExperimentID(experimentID *string) *RunServiceRetryRunParams { + o.SetExperimentID(experimentID) + return o +} + +// SetExperimentID adds the experimentId to the run service retry run params +func (o *RunServiceRetryRunParams) SetExperimentID(experimentID *string) { + o.ExperimentID = experimentID +} + // WithRunID adds the runID to the run service retry run params func (o *RunServiceRetryRunParams) WithRunID(runID string) *RunServiceRetryRunParams { o.SetRunID(runID) @@ -124,6 +156,23 @@ func (o *RunServiceRetryRunParams) WriteToRequest(r runtime.ClientRequest, reg s } var res []error + if o.ExperimentID != nil { + + // query param experiment_id + var qrExperimentID string + + if o.ExperimentID != nil { + qrExperimentID = *o.ExperimentID + } + qExperimentID := qrExperimentID + if qExperimentID != "" { + + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { + return err + } + } + } + // path param run_id if err := r.SetPathParam("run_id", o.RunID); err != nil { return err diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_retry_run_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_retry_run_responses.go index bae568f14fc..16a10e35096 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_retry_run_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_retry_run_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceRetryRunReader is a Reader for the RunServiceRetryRun structure. @@ -24,14 +24,12 @@ type RunServiceRetryRunReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceRetryRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceRetryRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceRetryRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceRetryRunOK() *RunServiceRetryRunOK { return &RunServiceRetryRunOK{} } -/*RunServiceRetryRunOK handles this case with default header values. +/* +RunServiceRetryRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceRetryRunOK struct { Payload interface{} } +// IsSuccess returns true when this run service retry run o k response has a 2xx status code +func (o *RunServiceRetryRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service retry run o k response has a 3xx status code +func (o *RunServiceRetryRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service retry run o k response has a 4xx status code +func (o *RunServiceRetryRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service retry run o k response has a 5xx status code +func (o *RunServiceRetryRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service retry run o k response a status code equal to that given +func (o *RunServiceRetryRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service retry run o k response +func (o *RunServiceRetryRunOK) Code() int { + return 200 +} + func (o *RunServiceRetryRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:retry][%d] runServiceRetryRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:retry][%d] runServiceRetryRunOK %s", 200, payload) +} + +func (o *RunServiceRetryRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:retry][%d] runServiceRetryRunOK %s", 200, payload) +} + +func (o *RunServiceRetryRunOK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceRetryRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceRetryRunDefault(code int) *RunServiceRetryRunDefault { } } -/*RunServiceRetryRunDefault handles this case with default header values. +/* +RunServiceRetryRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceRetryRunDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service retry run default response has a 2xx status code +func (o *RunServiceRetryRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service retry run default response has a 3xx status code +func (o *RunServiceRetryRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service retry run default response has a 4xx status code +func (o *RunServiceRetryRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service retry run default response has a 5xx status code +func (o *RunServiceRetryRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service retry run default response a status code equal to that given +func (o *RunServiceRetryRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service retry run default response @@ -94,12 +159,22 @@ func (o *RunServiceRetryRunDefault) Code() int { } func (o *RunServiceRetryRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:retry][%d] RunService_RetryRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:retry][%d] RunService_RetryRun default %s", o._statusCode, payload) +} + +func (o *RunServiceRetryRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:retry][%d] RunService_RetryRun default %s", o._statusCode, payload) +} + +func (o *RunServiceRetryRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceRetryRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_terminate_run_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_terminate_run_parameters.go index 7f48628f086..b907f7e1f80 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_terminate_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_terminate_run_parameters.go @@ -13,57 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceTerminateRunParams creates a new RunServiceTerminateRunParams object -// with the default values initialized. +// NewRunServiceTerminateRunParams creates a new RunServiceTerminateRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceTerminateRunParams() *RunServiceTerminateRunParams { - var () return &RunServiceTerminateRunParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceTerminateRunParamsWithTimeout creates a new RunServiceTerminateRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceTerminateRunParamsWithTimeout(timeout time.Duration) *RunServiceTerminateRunParams { - var () return &RunServiceTerminateRunParams{ - timeout: timeout, } } // NewRunServiceTerminateRunParamsWithContext creates a new RunServiceTerminateRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceTerminateRunParamsWithContext(ctx context.Context) *RunServiceTerminateRunParams { - var () return &RunServiceTerminateRunParams{ - Context: ctx, } } // NewRunServiceTerminateRunParamsWithHTTPClient creates a new RunServiceTerminateRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceTerminateRunParamsWithHTTPClient(client *http.Client) *RunServiceTerminateRunParams { - var () return &RunServiceTerminateRunParams{ HTTPClient: client, } } -/*RunServiceTerminateRunParams contains all the parameters to send to the API endpoint -for the run service terminate run operation typically these are written to a http.Request +/* +RunServiceTerminateRunParams contains all the parameters to send to the API endpoint + + for the run service terminate run operation. + + Typically these are written to a http.Request. */ type RunServiceTerminateRunParams struct { - /*RunID - The ID of the run to be terminated. + /* ExperimentID. + The ID of the parent experiment. + */ + ExperimentID *string + + /* RunID. + + The ID of the run to be terminated. */ RunID string @@ -72,6 +78,21 @@ type RunServiceTerminateRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service terminate run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceTerminateRunParams) WithDefaults() *RunServiceTerminateRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service terminate run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceTerminateRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service terminate run params func (o *RunServiceTerminateRunParams) WithTimeout(timeout time.Duration) *RunServiceTerminateRunParams { o.SetTimeout(timeout) @@ -105,6 +126,17 @@ func (o *RunServiceTerminateRunParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithExperimentID adds the experimentID to the run service terminate run params +func (o *RunServiceTerminateRunParams) WithExperimentID(experimentID *string) *RunServiceTerminateRunParams { + o.SetExperimentID(experimentID) + return o +} + +// SetExperimentID adds the experimentId to the run service terminate run params +func (o *RunServiceTerminateRunParams) SetExperimentID(experimentID *string) { + o.ExperimentID = experimentID +} + // WithRunID adds the runID to the run service terminate run params func (o *RunServiceTerminateRunParams) WithRunID(runID string) *RunServiceTerminateRunParams { o.SetRunID(runID) @@ -124,6 +156,23 @@ func (o *RunServiceTerminateRunParams) WriteToRequest(r runtime.ClientRequest, r } var res []error + if o.ExperimentID != nil { + + // query param experiment_id + var qrExperimentID string + + if o.ExperimentID != nil { + qrExperimentID = *o.ExperimentID + } + qExperimentID := qrExperimentID + if qExperimentID != "" { + + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { + return err + } + } + } + // path param run_id if err := r.SetPathParam("run_id", o.RunID); err != nil { return err diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_terminate_run_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_terminate_run_responses.go index b5aae3ba469..c8e16134a2c 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_terminate_run_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_terminate_run_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceTerminateRunReader is a Reader for the RunServiceTerminateRun structure. @@ -24,14 +24,12 @@ type RunServiceTerminateRunReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceTerminateRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceTerminateRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceTerminateRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceTerminateRunOK() *RunServiceTerminateRunOK { return &RunServiceTerminateRunOK{} } -/*RunServiceTerminateRunOK handles this case with default header values. +/* +RunServiceTerminateRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceTerminateRunOK struct { Payload interface{} } +// IsSuccess returns true when this run service terminate run o k response has a 2xx status code +func (o *RunServiceTerminateRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service terminate run o k response has a 3xx status code +func (o *RunServiceTerminateRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service terminate run o k response has a 4xx status code +func (o *RunServiceTerminateRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service terminate run o k response has a 5xx status code +func (o *RunServiceTerminateRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service terminate run o k response a status code equal to that given +func (o *RunServiceTerminateRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service terminate run o k response +func (o *RunServiceTerminateRunOK) Code() int { + return 200 +} + func (o *RunServiceTerminateRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:terminate][%d] runServiceTerminateRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:terminate][%d] runServiceTerminateRunOK %s", 200, payload) +} + +func (o *RunServiceTerminateRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:terminate][%d] runServiceTerminateRunOK %s", 200, payload) +} + +func (o *RunServiceTerminateRunOK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceTerminateRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceTerminateRunDefault(code int) *RunServiceTerminateRunDefault { } } -/*RunServiceTerminateRunDefault handles this case with default header values. +/* +RunServiceTerminateRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceTerminateRunDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service terminate run default response has a 2xx status code +func (o *RunServiceTerminateRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service terminate run default response has a 3xx status code +func (o *RunServiceTerminateRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service terminate run default response has a 4xx status code +func (o *RunServiceTerminateRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service terminate run default response has a 5xx status code +func (o *RunServiceTerminateRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service terminate run default response a status code equal to that given +func (o *RunServiceTerminateRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service terminate run default response @@ -94,12 +159,22 @@ func (o *RunServiceTerminateRunDefault) Code() int { } func (o *RunServiceTerminateRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:terminate][%d] RunService_TerminateRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:terminate][%d] RunService_TerminateRun default %s", o._statusCode, payload) +} + +func (o *RunServiceTerminateRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:terminate][%d] RunService_TerminateRun default %s", o._statusCode, payload) +} + +func (o *RunServiceTerminateRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceTerminateRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_unarchive_run_parameters.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_unarchive_run_parameters.go index 0aa314d4577..1d6c455d201 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_unarchive_run_parameters.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_unarchive_run_parameters.go @@ -13,57 +13,63 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" ) -// NewRunServiceUnarchiveRunParams creates a new RunServiceUnarchiveRunParams object -// with the default values initialized. +// NewRunServiceUnarchiveRunParams creates a new RunServiceUnarchiveRunParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewRunServiceUnarchiveRunParams() *RunServiceUnarchiveRunParams { - var () return &RunServiceUnarchiveRunParams{ - timeout: cr.DefaultTimeout, } } // NewRunServiceUnarchiveRunParamsWithTimeout creates a new RunServiceUnarchiveRunParams object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewRunServiceUnarchiveRunParamsWithTimeout(timeout time.Duration) *RunServiceUnarchiveRunParams { - var () return &RunServiceUnarchiveRunParams{ - timeout: timeout, } } // NewRunServiceUnarchiveRunParamsWithContext creates a new RunServiceUnarchiveRunParams object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewRunServiceUnarchiveRunParamsWithContext(ctx context.Context) *RunServiceUnarchiveRunParams { - var () return &RunServiceUnarchiveRunParams{ - Context: ctx, } } // NewRunServiceUnarchiveRunParamsWithHTTPClient creates a new RunServiceUnarchiveRunParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewRunServiceUnarchiveRunParamsWithHTTPClient(client *http.Client) *RunServiceUnarchiveRunParams { - var () return &RunServiceUnarchiveRunParams{ HTTPClient: client, } } -/*RunServiceUnarchiveRunParams contains all the parameters to send to the API endpoint -for the run service unarchive run operation typically these are written to a http.Request +/* +RunServiceUnarchiveRunParams contains all the parameters to send to the API endpoint + + for the run service unarchive run operation. + + Typically these are written to a http.Request. */ type RunServiceUnarchiveRunParams struct { - /*RunID - The ID of the run to be restored. + /* ExperimentID. + The ID of the parent experiment. + */ + ExperimentID *string + + /* RunID. + + The ID of the run to be restored. */ RunID string @@ -72,6 +78,21 @@ type RunServiceUnarchiveRunParams struct { HTTPClient *http.Client } +// WithDefaults hydrates default values in the run service unarchive run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceUnarchiveRunParams) WithDefaults() *RunServiceUnarchiveRunParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the run service unarchive run params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RunServiceUnarchiveRunParams) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the run service unarchive run params func (o *RunServiceUnarchiveRunParams) WithTimeout(timeout time.Duration) *RunServiceUnarchiveRunParams { o.SetTimeout(timeout) @@ -105,6 +126,17 @@ func (o *RunServiceUnarchiveRunParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithExperimentID adds the experimentID to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) WithExperimentID(experimentID *string) *RunServiceUnarchiveRunParams { + o.SetExperimentID(experimentID) + return o +} + +// SetExperimentID adds the experimentId to the run service unarchive run params +func (o *RunServiceUnarchiveRunParams) SetExperimentID(experimentID *string) { + o.ExperimentID = experimentID +} + // WithRunID adds the runID to the run service unarchive run params func (o *RunServiceUnarchiveRunParams) WithRunID(runID string) *RunServiceUnarchiveRunParams { o.SetRunID(runID) @@ -124,6 +156,23 @@ func (o *RunServiceUnarchiveRunParams) WriteToRequest(r runtime.ClientRequest, r } var res []error + if o.ExperimentID != nil { + + // query param experiment_id + var qrExperimentID string + + if o.ExperimentID != nil { + qrExperimentID = *o.ExperimentID + } + qExperimentID := qrExperimentID + if qExperimentID != "" { + + if err := r.SetQueryParam("experiment_id", qExperimentID); err != nil { + return err + } + } + } + // path param run_id if err := r.SetPathParam("run_id", o.RunID); err != nil { return err diff --git a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_unarchive_run_responses.go b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_unarchive_run_responses.go index 7460f10542a..15d80623ebe 100644 --- a/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_unarchive_run_responses.go +++ b/backend/api/v2beta1/go_http_client/run_client/run_service/run_service_unarchive_run_responses.go @@ -6,14 +6,14 @@ package run_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - run_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/run_model" ) // RunServiceUnarchiveRunReader is a Reader for the RunServiceUnarchiveRun structure. @@ -24,14 +24,12 @@ type RunServiceUnarchiveRunReader struct { // ReadResponse reads a server response into the received o. func (o *RunServiceUnarchiveRunReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewRunServiceUnarchiveRunOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewRunServiceUnarchiveRunDefault(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewRunServiceUnarchiveRunOK() *RunServiceUnarchiveRunOK { return &RunServiceUnarchiveRunOK{} } -/*RunServiceUnarchiveRunOK handles this case with default header values. +/* +RunServiceUnarchiveRunOK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type RunServiceUnarchiveRunOK struct { Payload interface{} } +// IsSuccess returns true when this run service unarchive run o k response has a 2xx status code +func (o *RunServiceUnarchiveRunOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this run service unarchive run o k response has a 3xx status code +func (o *RunServiceUnarchiveRunOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this run service unarchive run o k response has a 4xx status code +func (o *RunServiceUnarchiveRunOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this run service unarchive run o k response has a 5xx status code +func (o *RunServiceUnarchiveRunOK) IsServerError() bool { + return false +} + +// IsCode returns true when this run service unarchive run o k response a status code equal to that given +func (o *RunServiceUnarchiveRunOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the run service unarchive run o k response +func (o *RunServiceUnarchiveRunOK) Code() int { + return 200 +} + func (o *RunServiceUnarchiveRunOK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:unarchive][%d] runServiceUnarchiveRunOK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:unarchive][%d] runServiceUnarchiveRunOK %s", 200, payload) +} + +func (o *RunServiceUnarchiveRunOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:unarchive][%d] runServiceUnarchiveRunOK %s", 200, payload) +} + +func (o *RunServiceUnarchiveRunOK) GetPayload() interface{} { + return o.Payload } func (o *RunServiceUnarchiveRunOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -78,14 +117,40 @@ func NewRunServiceUnarchiveRunDefault(code int) *RunServiceUnarchiveRunDefault { } } -/*RunServiceUnarchiveRunDefault handles this case with default header values. +/* +RunServiceUnarchiveRunDefault describes a response with status code -1, with default header values. An unexpected error response. */ type RunServiceUnarchiveRunDefault struct { _statusCode int - Payload *run_model.RuntimeError + Payload *run_model.GooglerpcStatus +} + +// IsSuccess returns true when this run service unarchive run default response has a 2xx status code +func (o *RunServiceUnarchiveRunDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this run service unarchive run default response has a 3xx status code +func (o *RunServiceUnarchiveRunDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this run service unarchive run default response has a 4xx status code +func (o *RunServiceUnarchiveRunDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this run service unarchive run default response has a 5xx status code +func (o *RunServiceUnarchiveRunDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this run service unarchive run default response a status code equal to that given +func (o *RunServiceUnarchiveRunDefault) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the run service unarchive run default response @@ -94,12 +159,22 @@ func (o *RunServiceUnarchiveRunDefault) Code() int { } func (o *RunServiceUnarchiveRunDefault) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:unarchive][%d] RunService_UnarchiveRun default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:unarchive][%d] RunService_UnarchiveRun default %s", o._statusCode, payload) +} + +func (o *RunServiceUnarchiveRunDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/runs/{run_id}:unarchive][%d] RunService_UnarchiveRun default %s", o._statusCode, payload) +} + +func (o *RunServiceUnarchiveRunDefault) GetPayload() *run_model.GooglerpcStatus { + return o.Payload } func (o *RunServiceUnarchiveRunDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(run_model.RuntimeError) + o.Payload = new(run_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/run_model/googlerpc_status.go b/backend/api/v2beta1/go_http_client/run_model/googlerpc_status.go index caf7102255e..90b50d42007 100644 --- a/backend/api/v2beta1/go_http_client/run_model/googlerpc_status.go +++ b/backend/api/v2beta1/go_http_client/run_model/googlerpc_status.go @@ -6,11 +6,11 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -21,6 +21,7 @@ import ( // // You can find out more about this error model and how to work with it in the // [API Design Guide](https://cloud.google.com/apis/design/errors). +// // swagger:model googlerpcStatus type GooglerpcStatus struct { @@ -52,7 +53,6 @@ func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { } func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(m.Details) { // not required return nil } @@ -66,6 +66,47 @@ func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { if err := m.Details[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/run_model/pipeline_task_detail_child_task.go b/backend/api/v2beta1/go_http_client/run_model/pipeline_task_detail_child_task.go index b58e50cc41f..52c8eda15d7 100644 --- a/backend/api/v2beta1/go_http_client/run_model/pipeline_task_detail_child_task.go +++ b/backend/api/v2beta1/go_http_client/run_model/pipeline_task_detail_child_task.go @@ -6,13 +6,15 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // PipelineTaskDetailChildTask A dependent task that requires this one to succeed. // Represented by either task_id or pod_name. +// // swagger:model PipelineTaskDetailChildTask type PipelineTaskDetailChildTask struct { @@ -29,6 +31,11 @@ func (m *PipelineTaskDetailChildTask) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this pipeline task detail child task based on context it is used +func (m *PipelineTaskDetailChildTask) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *PipelineTaskDetailChildTask) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/run_model/protobuf_any.go b/backend/api/v2beta1/go_http_client/run_model/protobuf_any.go index 9227b6f36df..2b44a6e53c0 100644 --- a/backend/api/v2beta1/go_http_client/run_model/protobuf_any.go +++ b/backend/api/v2beta1/go_http_client/run_model/protobuf_any.go @@ -6,9 +6,10 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v2beta1/go_http_client/run_model/protobuf_null_value.go b/backend/api/v2beta1/go_http_client/run_model/protobuf_null_value.go index 852386abfff..22ebd8311f5 100644 --- a/backend/api/v2beta1/go_http_client/run_model/protobuf_null_value.go +++ b/backend/api/v2beta1/go_http_client/run_model/protobuf_null_value.go @@ -6,23 +6,33 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // ProtobufNullValue `NullValue` is a singleton enumeration to represent the null value for the // `Value` type union. // -// The JSON representation for `NullValue` is JSON `null`. +// The JSON representation for `NullValue` is JSON `null`. +// +// - NULL_VALUE: Null value. // -// - NULL_VALUE: Null value. // swagger:model protobufNullValue type ProtobufNullValue string +func NewProtobufNullValue(value ProtobufNullValue) *ProtobufNullValue { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ProtobufNullValue. +func (m ProtobufNullValue) Pointer() *ProtobufNullValue { + return &m +} + const ( // ProtobufNullValueNULLVALUE captures enum value "NULL_VALUE" @@ -43,7 +53,7 @@ func init() { } func (m ProtobufNullValue) validateProtobufNullValueEnum(path, location string, value ProtobufNullValue) error { - if err := validate.Enum(path, location, value, protobufNullValueEnum); err != nil { + if err := validate.EnumCase(path, location, value, protobufNullValueEnum, true); err != nil { return err } return nil @@ -63,3 +73,8 @@ func (m ProtobufNullValue) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this protobuf null value based on context it is used +func (m ProtobufNullValue) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/go_http_client/run_model/runtime_error.go b/backend/api/v2beta1/go_http_client/run_model/runtime_error.go deleted file mode 100644 index 1556f42d328..00000000000 --- a/backend/api/v2beta1/go_http_client/run_model/runtime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package run_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// RuntimeError runtime error -// swagger:model runtimeError -type RuntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this runtime error -func (m *RuntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeError) UnmarshalBinary(b []byte) error { - var res RuntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_artifact_list.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_artifact_list.go index 020ecd78ceb..3d833ad3e22 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_artifact_list.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_artifact_list.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1ArtifactList A list of artifact metadata. +// // swagger:model v2beta1ArtifactList type V2beta1ArtifactList struct { @@ -24,6 +26,11 @@ func (m *V2beta1ArtifactList) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v2beta1 artifact list based on context it is used +func (m *V2beta1ArtifactList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1ArtifactList) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_list_runs_response.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_list_runs_response.go index 08a906c9a80..568425f0da0 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_list_runs_response.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_list_runs_response.go @@ -6,15 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1ListRunsResponse v2beta1 list runs response +// // swagger:model v2beta1ListRunsResponse type V2beta1ListRunsResponse struct { @@ -43,7 +44,6 @@ func (m *V2beta1ListRunsResponse) Validate(formats strfmt.Registry) error { } func (m *V2beta1ListRunsResponse) validateRuns(formats strfmt.Registry) error { - if swag.IsZero(m.Runs) { // not required return nil } @@ -57,6 +57,47 @@ func (m *V2beta1ListRunsResponse) validateRuns(formats strfmt.Registry) error { if err := m.Runs[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v2beta1 list runs response based on the context it is used +func (m *V2beta1ListRunsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRuns(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1ListRunsResponse) contextValidateRuns(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Runs); i++ { + + if m.Runs[i] != nil { + + if swag.IsZero(m.Runs[i]) { // not required + return nil + } + + if err := m.Runs[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runs" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runs" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_task_detail.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_task_detail.go index 2ff67595630..4cfde980764 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_task_detail.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_task_detail.go @@ -6,16 +6,17 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1PipelineTaskDetail Runtime information of a task execution. +// // swagger:model v2beta1PipelineTaskDetail type V2beta1PipelineTaskDetail struct { @@ -66,7 +67,7 @@ type V2beta1PipelineTaskDetail struct { StartTime strfmt.DateTime `json:"start_time,omitempty"` // Runtime state of a task. - State V2beta1RuntimeState `json:"state,omitempty"` + State *V2beta1RuntimeState `json:"state,omitempty"` // A sequence of task statuses. This field keeps a record // of state transitions. @@ -127,7 +128,6 @@ func (m *V2beta1PipelineTaskDetail) Validate(formats strfmt.Registry) error { } func (m *V2beta1PipelineTaskDetail) validateChildTasks(formats strfmt.Registry) error { - if swag.IsZero(m.ChildTasks) { // not required return nil } @@ -141,6 +141,8 @@ func (m *V2beta1PipelineTaskDetail) validateChildTasks(formats strfmt.Registry) if err := m.ChildTasks[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("child_tasks" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("child_tasks" + "." + strconv.Itoa(i)) } return err } @@ -152,7 +154,6 @@ func (m *V2beta1PipelineTaskDetail) validateChildTasks(formats strfmt.Registry) } func (m *V2beta1PipelineTaskDetail) validateCreateTime(formats strfmt.Registry) error { - if swag.IsZero(m.CreateTime) { // not required return nil } @@ -165,7 +166,6 @@ func (m *V2beta1PipelineTaskDetail) validateCreateTime(formats strfmt.Registry) } func (m *V2beta1PipelineTaskDetail) validateEndTime(formats strfmt.Registry) error { - if swag.IsZero(m.EndTime) { // not required return nil } @@ -178,7 +178,6 @@ func (m *V2beta1PipelineTaskDetail) validateEndTime(formats strfmt.Registry) err } func (m *V2beta1PipelineTaskDetail) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required return nil } @@ -187,6 +186,8 @@ func (m *V2beta1PipelineTaskDetail) validateError(formats strfmt.Registry) error if err := m.Error.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") } return err } @@ -196,7 +197,6 @@ func (m *V2beta1PipelineTaskDetail) validateError(formats strfmt.Registry) error } func (m *V2beta1PipelineTaskDetail) validateExecutorDetail(formats strfmt.Registry) error { - if swag.IsZero(m.ExecutorDetail) { // not required return nil } @@ -205,6 +205,8 @@ func (m *V2beta1PipelineTaskDetail) validateExecutorDetail(formats strfmt.Regist if err := m.ExecutorDetail.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("executor_detail") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("executor_detail") } return err } @@ -214,7 +216,6 @@ func (m *V2beta1PipelineTaskDetail) validateExecutorDetail(formats strfmt.Regist } func (m *V2beta1PipelineTaskDetail) validateInputs(formats strfmt.Registry) error { - if swag.IsZero(m.Inputs) { // not required return nil } @@ -226,6 +227,11 @@ func (m *V2beta1PipelineTaskDetail) validateInputs(formats strfmt.Registry) erro } if val, ok := m.Inputs[k]; ok { if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inputs" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("inputs" + "." + k) + } return err } } @@ -236,7 +242,6 @@ func (m *V2beta1PipelineTaskDetail) validateInputs(formats strfmt.Registry) erro } func (m *V2beta1PipelineTaskDetail) validateOutputs(formats strfmt.Registry) error { - if swag.IsZero(m.Outputs) { // not required return nil } @@ -248,6 +253,11 @@ func (m *V2beta1PipelineTaskDetail) validateOutputs(formats strfmt.Registry) err } if val, ok := m.Outputs[k]; ok { if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("outputs" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("outputs" + "." + k) + } return err } } @@ -258,7 +268,6 @@ func (m *V2beta1PipelineTaskDetail) validateOutputs(formats strfmt.Registry) err } func (m *V2beta1PipelineTaskDetail) validateStartTime(formats strfmt.Registry) error { - if swag.IsZero(m.StartTime) { // not required return nil } @@ -271,23 +280,25 @@ func (m *V2beta1PipelineTaskDetail) validateStartTime(formats strfmt.Registry) e } func (m *V2beta1PipelineTaskDetail) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required return nil } - if err := m.State.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("state") + if m.State != nil { + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state") + } + return err } - return err } return nil } func (m *V2beta1PipelineTaskDetail) validateStateHistory(formats strfmt.Registry) error { - if swag.IsZero(m.StateHistory) { // not required return nil } @@ -301,6 +312,189 @@ func (m *V2beta1PipelineTaskDetail) validateStateHistory(formats strfmt.Registry if err := m.StateHistory[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("state_history" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state_history" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v2beta1 pipeline task detail based on the context it is used +func (m *V2beta1PipelineTaskDetail) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateChildTasks(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateExecutorDetail(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInputs(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOutputs(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateState(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStateHistory(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1PipelineTaskDetail) contextValidateChildTasks(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ChildTasks); i++ { + + if m.ChildTasks[i] != nil { + + if swag.IsZero(m.ChildTasks[i]) { // not required + return nil + } + + if err := m.ChildTasks[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("child_tasks" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("child_tasks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V2beta1PipelineTaskDetail) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *V2beta1PipelineTaskDetail) contextValidateExecutorDetail(ctx context.Context, formats strfmt.Registry) error { + + if m.ExecutorDetail != nil { + + if swag.IsZero(m.ExecutorDetail) { // not required + return nil + } + + if err := m.ExecutorDetail.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("executor_detail") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("executor_detail") + } + return err + } + } + + return nil +} + +func (m *V2beta1PipelineTaskDetail) contextValidateInputs(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Inputs { + + if val, ok := m.Inputs[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V2beta1PipelineTaskDetail) contextValidateOutputs(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Outputs { + + if val, ok := m.Outputs[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V2beta1PipelineTaskDetail) contextValidateState(ctx context.Context, formats strfmt.Registry) error { + + if m.State != nil { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := m.State.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state") + } + return err + } + } + + return nil +} + +func (m *V2beta1PipelineTaskDetail) contextValidateStateHistory(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.StateHistory); i++ { + + if m.StateHistory[i] != nil { + + if swag.IsZero(m.StateHistory[i]) { // not required + return nil + } + + if err := m.StateHistory[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state_history" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state_history" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_task_executor_detail.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_task_executor_detail.go index 87be2283f94..b2e2e18a78e 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_task_executor_detail.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_task_executor_detail.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1PipelineTaskExecutorDetail Runtime information of a pipeline task executor. +// // swagger:model v2beta1PipelineTaskExecutorDetail type V2beta1PipelineTaskExecutorDetail struct { @@ -41,6 +43,11 @@ func (m *V2beta1PipelineTaskExecutorDetail) Validate(formats strfmt.Registry) er return nil } +// ContextValidate validates this v2beta1 pipeline task executor detail based on context it is used +func (m *V2beta1PipelineTaskExecutorDetail) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1PipelineTaskExecutorDetail) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_version_reference.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_version_reference.go index 48f17f81926..1f1bed26e57 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_version_reference.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_pipeline_version_reference.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1PipelineVersionReference Reference to an existing pipeline version. +// // swagger:model v2beta1PipelineVersionReference type V2beta1PipelineVersionReference struct { @@ -27,6 +29,11 @@ func (m *V2beta1PipelineVersionReference) Validate(formats strfmt.Registry) erro return nil } +// ContextValidate validates this v2beta1 pipeline version reference based on context it is used +func (m *V2beta1PipelineVersionReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1PipelineVersionReference) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_read_artifact_response.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_read_artifact_response.go index 0db413344a8..02c354521c9 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_read_artifact_response.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_read_artifact_response.go @@ -6,13 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1ReadArtifactResponse v2beta1 read artifact response +// // swagger:model v2beta1ReadArtifactResponse type V2beta1ReadArtifactResponse struct { @@ -23,26 +24,11 @@ type V2beta1ReadArtifactResponse struct { // Validate validates this v2beta1 read artifact response func (m *V2beta1ReadArtifactResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateData(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } return nil } -func (m *V2beta1ReadArtifactResponse) validateData(formats strfmt.Registry) error { - - if swag.IsZero(m.Data) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - +// ContextValidate validates this v2beta1 read artifact response based on context it is used +func (m *V2beta1ReadArtifactResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_run.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_run.go index d232fdd05ca..eb83d3e8492 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_run.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_run.go @@ -6,16 +6,17 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1Run v2beta1 run +// // swagger:model v2beta1Run type V2beta1Run struct { @@ -74,14 +75,14 @@ type V2beta1Run struct { ServiceAccount string `json:"service_account,omitempty"` // Output. Runtime state of a run. - State V2beta1RuntimeState `json:"state,omitempty"` + State *V2beta1RuntimeState `json:"state,omitempty"` // Output. A sequence of run statuses. This field keeps a record // of state transitions. StateHistory []*V2beta1RuntimeStatus `json:"state_history"` // Output. Specifies whether this run is in archived or available mode. - StorageState V2beta1RunStorageState `json:"storage_state,omitempty"` + StorageState *V2beta1RunStorageState `json:"storage_state,omitempty"` } // Validate validates this v2beta1 run @@ -135,7 +136,6 @@ func (m *V2beta1Run) Validate(formats strfmt.Registry) error { } func (m *V2beta1Run) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -148,7 +148,6 @@ func (m *V2beta1Run) validateCreatedAt(formats strfmt.Registry) error { } func (m *V2beta1Run) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required return nil } @@ -157,6 +156,8 @@ func (m *V2beta1Run) validateError(formats strfmt.Registry) error { if err := m.Error.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") } return err } @@ -166,7 +167,6 @@ func (m *V2beta1Run) validateError(formats strfmt.Registry) error { } func (m *V2beta1Run) validateFinishedAt(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedAt) { // not required return nil } @@ -179,7 +179,6 @@ func (m *V2beta1Run) validateFinishedAt(formats strfmt.Registry) error { } func (m *V2beta1Run) validatePipelineVersionReference(formats strfmt.Registry) error { - if swag.IsZero(m.PipelineVersionReference) { // not required return nil } @@ -188,6 +187,8 @@ func (m *V2beta1Run) validatePipelineVersionReference(formats strfmt.Registry) e if err := m.PipelineVersionReference.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("pipeline_version_reference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_version_reference") } return err } @@ -197,7 +198,6 @@ func (m *V2beta1Run) validatePipelineVersionReference(formats strfmt.Registry) e } func (m *V2beta1Run) validateRunDetails(formats strfmt.Registry) error { - if swag.IsZero(m.RunDetails) { // not required return nil } @@ -206,6 +206,8 @@ func (m *V2beta1Run) validateRunDetails(formats strfmt.Registry) error { if err := m.RunDetails.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("run_details") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("run_details") } return err } @@ -215,7 +217,6 @@ func (m *V2beta1Run) validateRunDetails(formats strfmt.Registry) error { } func (m *V2beta1Run) validateRuntimeConfig(formats strfmt.Registry) error { - if swag.IsZero(m.RuntimeConfig) { // not required return nil } @@ -224,6 +225,8 @@ func (m *V2beta1Run) validateRuntimeConfig(formats strfmt.Registry) error { if err := m.RuntimeConfig.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") } return err } @@ -233,7 +236,6 @@ func (m *V2beta1Run) validateRuntimeConfig(formats strfmt.Registry) error { } func (m *V2beta1Run) validateScheduledAt(formats strfmt.Registry) error { - if swag.IsZero(m.ScheduledAt) { // not required return nil } @@ -246,23 +248,25 @@ func (m *V2beta1Run) validateScheduledAt(formats strfmt.Registry) error { } func (m *V2beta1Run) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required return nil } - if err := m.State.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("state") + if m.State != nil { + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state") + } + return err } - return err } return nil } func (m *V2beta1Run) validateStateHistory(formats strfmt.Registry) error { - if swag.IsZero(m.StateHistory) { // not required return nil } @@ -276,6 +280,8 @@ func (m *V2beta1Run) validateStateHistory(formats strfmt.Registry) error { if err := m.StateHistory[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("state_history" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state_history" + "." + strconv.Itoa(i)) } return err } @@ -287,16 +293,208 @@ func (m *V2beta1Run) validateStateHistory(formats strfmt.Registry) error { } func (m *V2beta1Run) validateStorageState(formats strfmt.Registry) error { - if swag.IsZero(m.StorageState) { // not required return nil } - if err := m.StorageState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("storage_state") + if m.StorageState != nil { + if err := m.StorageState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 run based on the context it is used +func (m *V2beta1Run) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePipelineVersionReference(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRunDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRuntimeConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateState(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStateHistory(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStorageState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1Run) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *V2beta1Run) contextValidatePipelineVersionReference(ctx context.Context, formats strfmt.Registry) error { + + if m.PipelineVersionReference != nil { + + if swag.IsZero(m.PipelineVersionReference) { // not required + return nil + } + + if err := m.PipelineVersionReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pipeline_version_reference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("pipeline_version_reference") + } + return err + } + } + + return nil +} + +func (m *V2beta1Run) contextValidateRunDetails(ctx context.Context, formats strfmt.Registry) error { + + if m.RunDetails != nil { + + if swag.IsZero(m.RunDetails) { // not required + return nil + } + + if err := m.RunDetails.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("run_details") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("run_details") + } + return err + } + } + + return nil +} + +func (m *V2beta1Run) contextValidateRuntimeConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.RuntimeConfig != nil { + + if swag.IsZero(m.RuntimeConfig) { // not required + return nil + } + + if err := m.RuntimeConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runtime_config") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("runtime_config") + } + return err + } + } + + return nil +} + +func (m *V2beta1Run) contextValidateState(ctx context.Context, formats strfmt.Registry) error { + + if m.State != nil { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := m.State.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state") + } + return err + } + } + + return nil +} + +func (m *V2beta1Run) contextValidateStateHistory(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.StateHistory); i++ { + + if m.StateHistory[i] != nil { + + if swag.IsZero(m.StateHistory[i]) { // not required + return nil + } + + if err := m.StateHistory[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state_history" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state_history" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V2beta1Run) contextValidateStorageState(ctx context.Context, formats strfmt.Registry) error { + + if m.StorageState != nil { + + if swag.IsZero(m.StorageState) { // not required + return nil + } + + if err := m.StorageState.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage_state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storage_state") + } + return err } - return err } return nil diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_run_details.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_run_details.go index 5b412e0ad9b..e3dae50a3b6 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_run_details.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_run_details.go @@ -6,15 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "strconv" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1RunDetails Runtime details of a run. +// // swagger:model v2beta1RunDetails type V2beta1RunDetails struct { @@ -43,7 +44,6 @@ func (m *V2beta1RunDetails) Validate(formats strfmt.Registry) error { } func (m *V2beta1RunDetails) validateTaskDetails(formats strfmt.Registry) error { - if swag.IsZero(m.TaskDetails) { // not required return nil } @@ -57,6 +57,47 @@ func (m *V2beta1RunDetails) validateTaskDetails(formats strfmt.Registry) error { if err := m.TaskDetails[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("task_details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("task_details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v2beta1 run details based on the context it is used +func (m *V2beta1RunDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTaskDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1RunDetails) contextValidateTaskDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TaskDetails); i++ { + + if m.TaskDetails[i] != nil { + + if swag.IsZero(m.TaskDetails[i]) { // not required + return nil + } + + if err := m.TaskDetails[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("task_details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("task_details" + "." + strconv.Itoa(i)) } return err } diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_run_storage_state.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_run_storage_state.go index e4ac7f08699..51531364ec7 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_run_storage_state.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_run_storage_state.go @@ -6,22 +6,32 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V2beta1RunStorageState Describes whether an entity is available or archived. // -// - STORAGE_STATE_UNSPECIFIED: Default state. This state in not used -// - AVAILABLE: Entity is available. -// - ARCHIVED: Entity is archived. +// - STORAGE_STATE_UNSPECIFIED: Default state. This state in not used +// - AVAILABLE: Entity is available. +// - ARCHIVED: Entity is archived. +// // swagger:model v2beta1RunStorageState type V2beta1RunStorageState string +func NewV2beta1RunStorageState(value V2beta1RunStorageState) *V2beta1RunStorageState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V2beta1RunStorageState. +func (m V2beta1RunStorageState) Pointer() *V2beta1RunStorageState { + return &m +} + const ( // V2beta1RunStorageStateSTORAGESTATEUNSPECIFIED captures enum value "STORAGE_STATE_UNSPECIFIED" @@ -48,7 +58,7 @@ func init() { } func (m V2beta1RunStorageState) validateV2beta1RunStorageStateEnum(path, location string, value V2beta1RunStorageState) error { - if err := validate.Enum(path, location, value, v2beta1RunStorageStateEnum); err != nil { + if err := validate.EnumCase(path, location, value, v2beta1RunStorageStateEnum, true); err != nil { return err } return nil @@ -68,3 +78,8 @@ func (m V2beta1RunStorageState) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v2beta1 run storage state based on context it is used +func (m V2beta1RunStorageState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_config.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_config.go index 8057b900fbc..d6fc19463fe 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_config.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_config.go @@ -6,12 +6,14 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1RuntimeConfig The runtime config. +// // swagger:model v2beta1RuntimeConfig type V2beta1RuntimeConfig struct { @@ -31,6 +33,11 @@ func (m *V2beta1RuntimeConfig) Validate(formats strfmt.Registry) error { return nil } +// ContextValidate validates this v2beta1 runtime config based on context it is used +func (m *V2beta1RuntimeConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + // MarshalBinary interface implementation func (m *V2beta1RuntimeConfig) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_state.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_state.go index 015365d1539..eff4858c0fb 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_state.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_state.go @@ -6,29 +6,40 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V2beta1RuntimeState Describes the runtime state of an entity. // -// - RUNTIME_STATE_UNSPECIFIED: Default value. This value is not used. -// - PENDING: Service is preparing to execute an entity. -// - RUNNING: Entity execution is in progress. -// - SUCCEEDED: Entity completed successfully. -// - SKIPPED: Entity has been skipped. For example, due to caching. -// - FAILED: Entity execution has failed. -// - CANCELING: Entity is being canceled. From this state, an entity may only +// - RUNTIME_STATE_UNSPECIFIED: Default value. This value is not used. +// - PENDING: Service is preparing to execute an entity. +// - RUNNING: Entity execution is in progress. +// - SUCCEEDED: Entity completed successfully. +// - SKIPPED: Entity has been skipped. For example, due to caching. +// - FAILED: Entity execution has failed. +// - CANCELING: Entity is being canceled. From this state, an entity may only +// // change its state to SUCCEEDED, FAILED or CANCELED. -// - CANCELED: Entity has been canceled. -// - PAUSED: Entity has been paused. It can be resumed. +// - CANCELED: Entity has been canceled. +// - PAUSED: Entity has been paused. It can be resumed. +// // swagger:model v2beta1RuntimeState type V2beta1RuntimeState string +func NewV2beta1RuntimeState(value V2beta1RuntimeState) *V2beta1RuntimeState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V2beta1RuntimeState. +func (m V2beta1RuntimeState) Pointer() *V2beta1RuntimeState { + return &m +} + const ( // V2beta1RuntimeStateRUNTIMESTATEUNSPECIFIED captures enum value "RUNTIME_STATE_UNSPECIFIED" @@ -73,7 +84,7 @@ func init() { } func (m V2beta1RuntimeState) validateV2beta1RuntimeStateEnum(path, location string, value V2beta1RuntimeState) error { - if err := validate.Enum(path, location, value, v2beta1RuntimeStateEnum); err != nil { + if err := validate.EnumCase(path, location, value, v2beta1RuntimeStateEnum, true); err != nil { return err } return nil @@ -93,3 +104,8 @@ func (m V2beta1RuntimeState) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v2beta1 runtime state based on context it is used +func (m V2beta1RuntimeState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_status.go b/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_status.go index 3e1b067f195..db613cebadf 100644 --- a/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_status.go +++ b/backend/api/v2beta1/go_http_client/run_model/v2beta1_runtime_status.go @@ -6,14 +6,16 @@ package run_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // V2beta1RuntimeStatus Timestamped representation of a runtime state with an optional error. +// // swagger:model v2beta1RuntimeStatus type V2beta1RuntimeStatus struct { @@ -25,7 +27,7 @@ type V2beta1RuntimeStatus struct { Error *GooglerpcStatus `json:"error,omitempty"` // The state of a runtime instance. - State V2beta1RuntimeState `json:"state,omitempty"` + State *V2beta1RuntimeState `json:"state,omitempty"` // Update time of this state. // Format: date-time @@ -55,7 +57,6 @@ func (m *V2beta1RuntimeStatus) Validate(formats strfmt.Registry) error { } func (m *V2beta1RuntimeStatus) validateError(formats strfmt.Registry) error { - if swag.IsZero(m.Error) { // not required return nil } @@ -64,6 +65,8 @@ func (m *V2beta1RuntimeStatus) validateError(formats strfmt.Registry) error { if err := m.Error.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") } return err } @@ -73,23 +76,25 @@ func (m *V2beta1RuntimeStatus) validateError(formats strfmt.Registry) error { } func (m *V2beta1RuntimeStatus) validateState(formats strfmt.Registry) error { - if swag.IsZero(m.State) { // not required return nil } - if err := m.State.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("state") + if m.State != nil { + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state") + } + return err } - return err } return nil } func (m *V2beta1RuntimeStatus) validateUpdateTime(formats strfmt.Registry) error { - if swag.IsZero(m.UpdateTime) { // not required return nil } @@ -101,6 +106,66 @@ func (m *V2beta1RuntimeStatus) validateUpdateTime(formats strfmt.Registry) error return nil } +// ContextValidate validate this v2beta1 runtime status based on the context it is used +func (m *V2beta1RuntimeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateError(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1RuntimeStatus) contextValidateError(ctx context.Context, formats strfmt.Registry) error { + + if m.Error != nil { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if err := m.Error.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *V2beta1RuntimeStatus) contextValidateState(ctx context.Context, formats strfmt.Registry) error { + + if m.State != nil { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := m.State.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *V2beta1RuntimeStatus) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/backend/api/v2beta1/go_http_client/visualization_client/visualization_client.go b/backend/api/v2beta1/go_http_client/visualization_client/visualization_client.go index cb722eda14f..1b4642c8039 100644 --- a/backend/api/v2beta1/go_http_client/visualization_client/visualization_client.go +++ b/backend/api/v2beta1/go_http_client/visualization_client/visualization_client.go @@ -8,8 +8,7 @@ package visualization_client import ( "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" + "github.com/go-openapi/strfmt" "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/visualization_client/visualization_service" ) @@ -56,9 +55,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Visualizat cli := new(Visualization) cli.Transport = transport - cli.VisualizationService = visualization_service.New(transport, formats) - return cli } @@ -103,7 +100,7 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // Visualization is a client for visualization type Visualization struct { - VisualizationService *visualization_service.Client + VisualizationService visualization_service.ClientService Transport runtime.ClientTransport } @@ -111,7 +108,5 @@ type Visualization struct { // SetTransport changes the transport on the client and all its subresources func (c *Visualization) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.VisualizationService.SetTransport(transport) - } diff --git a/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_client.go b/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_client.go index 9c81b3ab5ce..187935fdaf2 100644 --- a/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_client.go +++ b/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_client.go @@ -7,15 +7,40 @@ package visualization_service import ( "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" ) // New creates a new visualization service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } +// New creates a new visualization service API client with basic auth credentials. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - user: user for basic authentication header. +// - password: password for basic authentication header. +func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BasicAuth(user, password) + return &Client{transport: transport, formats: strfmt.Default} +} + +// New creates a new visualization service API client with a bearer token for authentication. +// It takes the following parameters: +// - host: http host (github.com). +// - basePath: any base path for the API client ("/v1", "/v3"). +// - scheme: http scheme ("http", "https"). +// - bearerToken: bearer token for Bearer authentication header. +func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService { + transport := httptransport.New(host, basePath, []string{scheme}) + transport.DefaultAuthentication = httptransport.BearerToken(bearerToken) + return &Client{transport: transport, formats: strfmt.Default} +} + /* Client for visualization service API */ @@ -24,16 +49,25 @@ type Client struct { formats strfmt.Registry } +// ClientOption may be used to customize the behavior of Client methods. +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + VisualizationServiceCreateVisualizationV1(params *VisualizationServiceCreateVisualizationV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VisualizationServiceCreateVisualizationV1OK, error) + + SetTransport(transport runtime.ClientTransport) +} + /* VisualizationServiceCreateVisualizationV1 visualization service create visualization v1 API */ -func (a *Client) VisualizationServiceCreateVisualizationV1(params *VisualizationServiceCreateVisualizationV1Params, authInfo runtime.ClientAuthInfoWriter) (*VisualizationServiceCreateVisualizationV1OK, error) { +func (a *Client) VisualizationServiceCreateVisualizationV1(params *VisualizationServiceCreateVisualizationV1Params, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VisualizationServiceCreateVisualizationV1OK, error) { // TODO: Validate the params before sending if params == nil { params = NewVisualizationServiceCreateVisualizationV1Params() } - - result, err := a.transport.Submit(&runtime.ClientOperation{ + op := &runtime.ClientOperation{ ID: "VisualizationService_CreateVisualizationV1", Method: "POST", PathPattern: "/apis/v2beta1/visualizations/{namespace}", @@ -45,12 +79,22 @@ func (a *Client) VisualizationServiceCreateVisualizationV1(params *Visualization AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, - }) + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) if err != nil { return nil, err } - return result.(*VisualizationServiceCreateVisualizationV1OK), nil - + success, ok := result.(*VisualizationServiceCreateVisualizationV1OK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*VisualizationServiceCreateVisualizationV1Default) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } // SetTransport changes the transport on the client diff --git a/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_parameters.go b/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_parameters.go index fe9fb8a7586..70b865bc3ee 100644 --- a/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_parameters.go +++ b/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_parameters.go @@ -13,66 +13,82 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - visualization_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/visualization_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/visualization_model" ) -// NewVisualizationServiceCreateVisualizationV1Params creates a new VisualizationServiceCreateVisualizationV1Params object -// with the default values initialized. +// NewVisualizationServiceCreateVisualizationV1Params creates a new VisualizationServiceCreateVisualizationV1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. func NewVisualizationServiceCreateVisualizationV1Params() *VisualizationServiceCreateVisualizationV1Params { - var () return &VisualizationServiceCreateVisualizationV1Params{ - timeout: cr.DefaultTimeout, } } // NewVisualizationServiceCreateVisualizationV1ParamsWithTimeout creates a new VisualizationServiceCreateVisualizationV1Params object -// with the default values initialized, and the ability to set a timeout on a request +// with the ability to set a timeout on a request. func NewVisualizationServiceCreateVisualizationV1ParamsWithTimeout(timeout time.Duration) *VisualizationServiceCreateVisualizationV1Params { - var () return &VisualizationServiceCreateVisualizationV1Params{ - timeout: timeout, } } // NewVisualizationServiceCreateVisualizationV1ParamsWithContext creates a new VisualizationServiceCreateVisualizationV1Params object -// with the default values initialized, and the ability to set a context for a request +// with the ability to set a context for a request. func NewVisualizationServiceCreateVisualizationV1ParamsWithContext(ctx context.Context) *VisualizationServiceCreateVisualizationV1Params { - var () return &VisualizationServiceCreateVisualizationV1Params{ - Context: ctx, } } // NewVisualizationServiceCreateVisualizationV1ParamsWithHTTPClient creates a new VisualizationServiceCreateVisualizationV1Params object -// with the default values initialized, and the ability to set a custom HTTPClient for a request +// with the ability to set a custom HTTPClient for a request. func NewVisualizationServiceCreateVisualizationV1ParamsWithHTTPClient(client *http.Client) *VisualizationServiceCreateVisualizationV1Params { - var () return &VisualizationServiceCreateVisualizationV1Params{ HTTPClient: client, } } -/*VisualizationServiceCreateVisualizationV1Params contains all the parameters to send to the API endpoint -for the visualization service create visualization v1 operation typically these are written to a http.Request +/* +VisualizationServiceCreateVisualizationV1Params contains all the parameters to send to the API endpoint + + for the visualization service create visualization v1 operation. + + Typically these are written to a http.Request. */ type VisualizationServiceCreateVisualizationV1Params struct { - /*Body*/ - Body *visualization_model.V2beta1Visualization - /*Namespace*/ + // Namespace. Namespace string + // Visualization. + Visualization *visualization_model.V2beta1Visualization + timeout time.Duration Context context.Context HTTPClient *http.Client } +// WithDefaults hydrates default values in the visualization service create visualization v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *VisualizationServiceCreateVisualizationV1Params) WithDefaults() *VisualizationServiceCreateVisualizationV1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the visualization service create visualization v1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *VisualizationServiceCreateVisualizationV1Params) SetDefaults() { + // no default values defined for this parameter +} + // WithTimeout adds the timeout to the visualization service create visualization v1 params func (o *VisualizationServiceCreateVisualizationV1Params) WithTimeout(timeout time.Duration) *VisualizationServiceCreateVisualizationV1Params { o.SetTimeout(timeout) @@ -106,17 +122,6 @@ func (o *VisualizationServiceCreateVisualizationV1Params) SetHTTPClient(client * o.HTTPClient = client } -// WithBody adds the body to the visualization service create visualization v1 params -func (o *VisualizationServiceCreateVisualizationV1Params) WithBody(body *visualization_model.V2beta1Visualization) *VisualizationServiceCreateVisualizationV1Params { - o.SetBody(body) - return o -} - -// SetBody adds the body to the visualization service create visualization v1 params -func (o *VisualizationServiceCreateVisualizationV1Params) SetBody(body *visualization_model.V2beta1Visualization) { - o.Body = body -} - // WithNamespace adds the namespace to the visualization service create visualization v1 params func (o *VisualizationServiceCreateVisualizationV1Params) WithNamespace(namespace string) *VisualizationServiceCreateVisualizationV1Params { o.SetNamespace(namespace) @@ -128,6 +133,17 @@ func (o *VisualizationServiceCreateVisualizationV1Params) SetNamespace(namespace o.Namespace = namespace } +// WithVisualization adds the visualization to the visualization service create visualization v1 params +func (o *VisualizationServiceCreateVisualizationV1Params) WithVisualization(visualization *visualization_model.V2beta1Visualization) *VisualizationServiceCreateVisualizationV1Params { + o.SetVisualization(visualization) + return o +} + +// SetVisualization adds the visualization to the visualization service create visualization v1 params +func (o *VisualizationServiceCreateVisualizationV1Params) SetVisualization(visualization *visualization_model.V2beta1Visualization) { + o.Visualization = visualization +} + // WriteToRequest writes these params to a swagger request func (o *VisualizationServiceCreateVisualizationV1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -136,16 +152,15 @@ func (o *VisualizationServiceCreateVisualizationV1Params) WriteToRequest(r runti } var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - // path param namespace if err := r.SetPathParam("namespace", o.Namespace); err != nil { return err } + if o.Visualization != nil { + if err := r.SetBodyParam(o.Visualization); err != nil { + return err + } + } if len(res) > 0 { return errors.CompositeValidationError(res...) diff --git a/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_responses.go b/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_responses.go index dd8907ff380..9839afe90f1 100644 --- a/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_responses.go +++ b/backend/api/v2beta1/go_http_client/visualization_client/visualization_service/visualization_service_create_visualization_v1_responses.go @@ -6,14 +6,14 @@ package visualization_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "encoding/json" "fmt" "io" "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" - strfmt "github.com/go-openapi/strfmt" - - visualization_model "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/visualization_model" + "github.com/kubeflow/pipelines/backend/api/v2beta1/go_http_client/visualization_model" ) // VisualizationServiceCreateVisualizationV1Reader is a Reader for the VisualizationServiceCreateVisualizationV1 structure. @@ -24,14 +24,12 @@ type VisualizationServiceCreateVisualizationV1Reader struct { // ReadResponse reads a server response into the received o. func (o *VisualizationServiceCreateVisualizationV1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { - case 200: result := NewVisualizationServiceCreateVisualizationV1OK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil - default: result := NewVisualizationServiceCreateVisualizationV1Default(response.Code()) if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -49,7 +47,8 @@ func NewVisualizationServiceCreateVisualizationV1OK() *VisualizationServiceCreat return &VisualizationServiceCreateVisualizationV1OK{} } -/*VisualizationServiceCreateVisualizationV1OK handles this case with default header values. +/* +VisualizationServiceCreateVisualizationV1OK describes a response with status code 200, with default header values. A successful response. */ @@ -57,8 +56,48 @@ type VisualizationServiceCreateVisualizationV1OK struct { Payload *visualization_model.V2beta1Visualization } +// IsSuccess returns true when this visualization service create visualization v1 o k response has a 2xx status code +func (o *VisualizationServiceCreateVisualizationV1OK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this visualization service create visualization v1 o k response has a 3xx status code +func (o *VisualizationServiceCreateVisualizationV1OK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this visualization service create visualization v1 o k response has a 4xx status code +func (o *VisualizationServiceCreateVisualizationV1OK) IsClientError() bool { + return false +} + +// IsServerError returns true when this visualization service create visualization v1 o k response has a 5xx status code +func (o *VisualizationServiceCreateVisualizationV1OK) IsServerError() bool { + return false +} + +// IsCode returns true when this visualization service create visualization v1 o k response a status code equal to that given +func (o *VisualizationServiceCreateVisualizationV1OK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the visualization service create visualization v1 o k response +func (o *VisualizationServiceCreateVisualizationV1OK) Code() int { + return 200 +} + func (o *VisualizationServiceCreateVisualizationV1OK) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/visualizations/{namespace}][%d] visualizationServiceCreateVisualizationV1OK %+v", 200, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/visualizations/{namespace}][%d] visualizationServiceCreateVisualizationV1OK %s", 200, payload) +} + +func (o *VisualizationServiceCreateVisualizationV1OK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/visualizations/{namespace}][%d] visualizationServiceCreateVisualizationV1OK %s", 200, payload) +} + +func (o *VisualizationServiceCreateVisualizationV1OK) GetPayload() *visualization_model.V2beta1Visualization { + return o.Payload } func (o *VisualizationServiceCreateVisualizationV1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { @@ -80,14 +119,40 @@ func NewVisualizationServiceCreateVisualizationV1Default(code int) *Visualizatio } } -/*VisualizationServiceCreateVisualizationV1Default handles this case with default header values. +/* +VisualizationServiceCreateVisualizationV1Default describes a response with status code -1, with default header values. An unexpected error response. */ type VisualizationServiceCreateVisualizationV1Default struct { _statusCode int - Payload *visualization_model.RuntimeError + Payload *visualization_model.GooglerpcStatus +} + +// IsSuccess returns true when this visualization service create visualization v1 default response has a 2xx status code +func (o *VisualizationServiceCreateVisualizationV1Default) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this visualization service create visualization v1 default response has a 3xx status code +func (o *VisualizationServiceCreateVisualizationV1Default) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this visualization service create visualization v1 default response has a 4xx status code +func (o *VisualizationServiceCreateVisualizationV1Default) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this visualization service create visualization v1 default response has a 5xx status code +func (o *VisualizationServiceCreateVisualizationV1Default) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this visualization service create visualization v1 default response a status code equal to that given +func (o *VisualizationServiceCreateVisualizationV1Default) IsCode(code int) bool { + return o._statusCode == code } // Code gets the status code for the visualization service create visualization v1 default response @@ -96,12 +161,22 @@ func (o *VisualizationServiceCreateVisualizationV1Default) Code() int { } func (o *VisualizationServiceCreateVisualizationV1Default) Error() string { - return fmt.Sprintf("[POST /apis/v2beta1/visualizations/{namespace}][%d] VisualizationService_CreateVisualizationV1 default %+v", o._statusCode, o.Payload) + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/visualizations/{namespace}][%d] VisualizationService_CreateVisualizationV1 default %s", o._statusCode, payload) +} + +func (o *VisualizationServiceCreateVisualizationV1Default) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /apis/v2beta1/visualizations/{namespace}][%d] VisualizationService_CreateVisualizationV1 default %s", o._statusCode, payload) +} + +func (o *VisualizationServiceCreateVisualizationV1Default) GetPayload() *visualization_model.GooglerpcStatus { + return o.Payload } func (o *VisualizationServiceCreateVisualizationV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(visualization_model.RuntimeError) + o.Payload = new(visualization_model.GooglerpcStatus) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/backend/api/v2beta1/go_http_client/visualization_model/googlerpc_status.go b/backend/api/v2beta1/go_http_client/visualization_model/googlerpc_status.go new file mode 100644 index 00000000000..2d2a620e2ec --- /dev/null +++ b/backend/api/v2beta1/go_http_client/visualization_model/googlerpc_status.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package visualization_model + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by [gRPC](https://github.com/grpc). Each `Status` message contains +// three pieces of data: error code, error message, and error details. +// +// You can find out more about this error model and how to work with it in the +// [API Design Guide](https://cloud.google.com/apis/design/errors). +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + Code int32 `json:"code,omitempty"` + + // A list of messages that carry the error details. There is a common set of + // message types for APIs to use. + Details []*ProtobufAny `json:"details"` + + // A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + + if swag.IsZero(m.Details[i]) { // not required + return nil + } + + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/backend/api/v2beta1/go_http_client/visualization_model/protobuf_any.go b/backend/api/v2beta1/go_http_client/visualization_model/protobuf_any.go index 79170185217..bd86be1550d 100644 --- a/backend/api/v2beta1/go_http_client/visualization_model/protobuf_any.go +++ b/backend/api/v2beta1/go_http_client/visualization_model/protobuf_any.go @@ -6,9 +6,10 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" + "encoding/json" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -20,45 +21,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -66,34 +71,34 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // -// // JSON -// +// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// // swagger:model protobufAny type ProtobufAny struct { @@ -120,39 +125,151 @@ type ProtobufAny struct { // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - TypeURL string `json:"type_url,omitempty"` + AtType string `json:"@type,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` + // protobuf any + ProtobufAny map[string]interface{} `json:"-"` } -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - var res []error +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *ProtobufAny) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ProtobufAny + + rcv.AtType = stage1.AtType + *m = rcv - if err := m.validateValue(formats); err != nil { - res = append(res, err) + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.ProtobufAny = result } + return nil } -func (m *ProtobufAny) validateValue(formats strfmt.Registry) error { +// MarshalJSON marshals this object with additional properties into a JSON object +func (m ProtobufAny) MarshalJSON() ([]byte, error) { + var stage1 struct { - if swag.IsZero(m.Value) { // not required - return nil + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` } - // Format "byte" (base64 string) is already validated when unmarshalled + stage1.AtType = m.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.ProtobufAny) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.ProtobufAny) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } diff --git a/backend/api/v2beta1/go_http_client/visualization_model/runtime_error.go b/backend/api/v2beta1/go_http_client/visualization_model/runtime_error.go deleted file mode 100644 index d3023542372..00000000000 --- a/backend/api/v2beta1/go_http_client/visualization_model/runtime_error.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package visualization_model - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// RuntimeError runtime error -// swagger:model runtimeError -type RuntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this runtime error -func (m *RuntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeError) validateDetails(formats strfmt.Registry) error { - - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeError) UnmarshalBinary(b []byte) error { - var res RuntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/backend/api/v2beta1/go_http_client/visualization_model/v2beta1_visualization.go b/backend/api/v2beta1/go_http_client/visualization_model/v2beta1_visualization.go index effbc893b93..1a14dfd7bc2 100644 --- a/backend/api/v2beta1/go_http_client/visualization_model/v2beta1_visualization.go +++ b/backend/api/v2beta1/go_http_client/visualization_model/v2beta1_visualization.go @@ -6,13 +6,15 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( - strfmt "github.com/go-openapi/strfmt" + "context" "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // V2beta1Visualization v2beta1 visualization +// // swagger:model v2beta1Visualization type V2beta1Visualization struct { @@ -36,7 +38,7 @@ type V2beta1Visualization struct { Source string `json:"source,omitempty"` // type - Type V2beta1VisualizationType `json:"type,omitempty"` + Type *V2beta1VisualizationType `json:"type,omitempty"` } // Validate validates this v2beta1 visualization @@ -54,16 +56,54 @@ func (m *V2beta1Visualization) Validate(formats strfmt.Registry) error { } func (m *V2beta1Visualization) validateType(formats strfmt.Registry) error { - if swag.IsZero(m.Type) { // not required return nil } - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v2beta1 visualization based on the context it is used +func (m *V2beta1Visualization) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V2beta1Visualization) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err } - return err } return nil diff --git a/backend/api/v2beta1/go_http_client/visualization_model/v2beta1_visualization_type.go b/backend/api/v2beta1/go_http_client/visualization_model/v2beta1_visualization_type.go index a2bc71e3854..b8a2782097e 100644 --- a/backend/api/v2beta1/go_http_client/visualization_model/v2beta1_visualization_type.go +++ b/backend/api/v2beta1/go_http_client/visualization_model/v2beta1_visualization_type.go @@ -6,20 +6,30 @@ package visualization_model // Editing this file might prove futile when you re-run the swagger generate command import ( + "context" "encoding/json" - strfmt "github.com/go-openapi/strfmt" - "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" "github.com/go-openapi/validate" ) // V2beta1VisualizationType Type of visualization to be generated. // This is required when creating the pipeline through CreateVisualization // API. +// // swagger:model v2beta1VisualizationType type V2beta1VisualizationType string +func NewV2beta1VisualizationType(value V2beta1VisualizationType) *V2beta1VisualizationType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V2beta1VisualizationType. +func (m V2beta1VisualizationType) Pointer() *V2beta1VisualizationType { + return &m +} + const ( // V2beta1VisualizationTypeROCCURVE captures enum value "ROC_CURVE" @@ -52,7 +62,7 @@ func init() { } func (m V2beta1VisualizationType) validateV2beta1VisualizationTypeEnum(path, location string, value V2beta1VisualizationType) error { - if err := validate.Enum(path, location, value, v2beta1VisualizationTypeEnum); err != nil { + if err := validate.EnumCase(path, location, value, v2beta1VisualizationTypeEnum, true); err != nil { return err } return nil @@ -72,3 +82,8 @@ func (m V2beta1VisualizationType) Validate(formats strfmt.Registry) error { } return nil } + +// ContextValidate validates this v2beta1 visualization type based on context it is used +func (m V2beta1VisualizationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/backend/api/v2beta1/healthz.proto b/backend/api/v2beta1/healthz.proto index 0ba677a54fb..ae4c6738e02 100644 --- a/backend/api/v2beta1/healthz.proto +++ b/backend/api/v2beta1/healthz.proto @@ -19,10 +19,9 @@ package kubeflow.pipelines.backend.api.v2beta1; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -import "protoc-gen-swagger/options/annotations.proto"; -import "google/rpc/status.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; @@ -72,7 +71,7 @@ message GetHealthzResponse { // TODO(gkcalat): rename or deprecate v1beta1 HealthzService // // Returns if KFP in multi-user mode - bool multi_user = 3; + bool multi_user = 3 [json_name = "multi_user"]; // Returns the pipeline storage type (database or kubernetes) - string pipeline_store = 4; + string pipeline_store = 4 [json_name = "pipeline_store"]; } diff --git a/backend/api/v2beta1/pipeline.proto b/backend/api/v2beta1/pipeline.proto index a180ed81eb6..fd9c4696015 100644 --- a/backend/api/v2beta1/pipeline.proto +++ b/backend/api/v2beta1/pipeline.proto @@ -22,9 +22,9 @@ import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; @@ -140,10 +140,10 @@ service PipelineService { message Pipeline { // Output. Unique pipeline ID. Generated by API server. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // Required if name is not provided. Pipeline display name provided by user. - string display_name = 2; + string display_name = 2 [json_name = "display_name"]; // Required if display_name is not provided. Pipeline name provided by user. string name = 7; @@ -152,7 +152,7 @@ message Pipeline { string description = 3; // Output. Creation time of the pipeline. - google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp created_at = 4 [json_name = "created_at"]; // Input. A namespace this pipeline belongs to. // Causes error if user is not authorized to access the specified namespace. @@ -168,14 +168,14 @@ message Pipeline { message PipelineVersion { // Required input field. Unique ID of the parent pipeline. // This is ignored in CreatePipelineAndVersion API. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // Output. Unique pipeline version ID. Generated by API server. - string pipeline_version_id = 2; + string pipeline_version_id = 2 [json_name = "pipeline_version_id"]; // Required if name is not provided. Pipeline version display name provided by user. // This is ignored in CreatePipelineAndVersion API. - string display_name = 3; + string display_name = 3 [json_name = "display_name"]; // Required if display_name is not provided. Pipeline version name provided by user. // This is ignored in CreatePipelineAndVersion API. @@ -186,22 +186,22 @@ message PipelineVersion { string description = 4; // Output. Creation time of the pipeline version. - google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp created_at = 5 [json_name = "created_at"]; // Input. Required. The URL to the source of the pipeline version. // This is required when creating the pipeine version through // CreatePipelineVersion or CreatePipelineAndVersion API. - Url package_url = 6; + Url package_url = 6 [json_name = "package_url"]; // Input. Optional. The URL to the code source of the pipeline version. // The code is usually the Python definition of the pipeline and potentially // related the component definitions. This allows users to trace back to how // the pipeline YAML was created. - string code_source_url = 9; + string code_source_url = 9 [json_name = "code_source_url"]; // Output. The pipeline spec for the pipeline version. - google.protobuf.Struct pipeline_spec = 7; - + google.protobuf.Struct pipeline_spec = 7 [json_name = "pipeline_spec"]; + // In case any error happens retrieving a pipeline version field, only // pipeline ID, pipeline version ID, and the error message are returned. // Client has the flexibility of choosing how to handle the error. @@ -211,7 +211,7 @@ message PipelineVersion { message Url { // URL of the pipeline version definition. - string pipeline_url = 1; + string pipeline_url = 1 [json_name = "pipeline_url"]; } message CreatePipelineRequest { @@ -221,7 +221,7 @@ message CreatePipelineRequest { message GetPipelineRequest { // Required input. The ID of the pipeline to be retrieved. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; } message ListPipelinesRequest { @@ -229,16 +229,16 @@ message ListPipelinesRequest { string namespace = 1; // A page token to request the results page. - string page_token = 2; + string page_token = 2 [json_name = "page_token"]; // The number of pipelines to be listed per page. If there are more pipelines // than this number, the response message will contain a valid value in the // nextPageToken field. - int32 page_size = 3; + int32 page_size = 3 [json_name = "page_size"]; // Sorting order in form of "field_name", "field_name asc" or "field_name desc". // Ascending by default. - string sort_by = 4; + string sort_by = 4 [json_name = "sort_by"]; // A url-encoded, JSON-serialized filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). @@ -250,11 +250,11 @@ message ListPipelinesResponse { repeated Pipeline pipelines = 1; // The total number of pipelines for the given query. - int32 total_size = 2; + int32 total_size = 2 [json_name = "total_size"]; // The token to list the next page of pipelines. // This token can be used on the next ListPipelinesRequest. - string next_page_token = 3; + string next_page_token = 3 [json_name = "next_page_token"]; } message GetPipelineByNameRequest { @@ -269,7 +269,7 @@ message GetPipelineByNameRequest { message DeletePipelineRequest { // Required input. ID of the pipeline to be deleted. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // Optional. If true, the pipeline and all its versions will be deleted. // If false (default), only the pipeline will be deleted if it has no versions. @@ -282,7 +282,7 @@ message CreatePipelineAndVersionRequest { // Required input. Pipeline version (child) to be created. // Pipeline spec will be downloaded from pipeline_version.package_url. - PipelineVersion pipeline_version = 2; + PipelineVersion pipeline_version = 2 [json_name = "pipeline_version"]; } message CreatePipelineVersionRequest { @@ -290,32 +290,32 @@ message CreatePipelineVersionRequest { string pipeline_id = 1; // Required input. Pipeline version ID to be created. - PipelineVersion pipeline_version = 2; + PipelineVersion pipeline_version = 2 [json_name = "pipeline_version"]; } message GetPipelineVersionRequest { // Required input. ID of the parent pipeline. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // Required input. ID of the pipeline version to be retrieved. - string pipeline_version_id = 2; + string pipeline_version_id = 2 [json_name = "pipeline_version_id"]; } message ListPipelineVersionsRequest { // Required input. ID of the parent pipeline. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // A page token to request the results page. - string page_token = 2; + string page_token = 2 [json_name = "page_token"]; // The number of pipeline versions to be listed per page. If there are more pipeline // versions than this number, the response message will contain a valid value in the // nextPageToken field. - int32 page_size = 3; + int32 page_size = 3 [json_name = "page_size"]; // Sorting order in form of "field_name", "field_name asc" or "field_name desc". // Ascending by default. - string sort_by = 4; + string sort_by = 4 [json_name = "sort_by"]; // A url-encoded, JSON-serialized filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). @@ -324,19 +324,19 @@ message ListPipelineVersionsRequest { message ListPipelineVersionsResponse { // Returned pipeline versions. - repeated PipelineVersion pipeline_versions = 1; + repeated PipelineVersion pipeline_versions = 1 [json_name = "pipeline_versions"]; // The token to list the next page of pipeline versions. - string next_page_token = 2; + string next_page_token = 2 [json_name = "next_page_token"]; // The total number of pipeline versions for the given query. - int32 total_size = 3; + int32 total_size = 3 [json_name = "total_size"]; } message DeletePipelineVersionRequest { // Required input. ID of the parent pipeline. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // Required input. The ID of the pipeline version to be deleted. - string pipeline_version_id = 2; + string pipeline_version_id = 2 [json_name = "pipeline_version_id"]; } \ No newline at end of file diff --git a/backend/api/v2beta1/recurring_run.proto b/backend/api/v2beta1/recurring_run.proto index 66b810901a2..8df5574e575 100644 --- a/backend/api/v2beta1/recurring_run.proto +++ b/backend/api/v2beta1/recurring_run.proto @@ -25,9 +25,9 @@ import "google/protobuf/timestamp.proto"; import "google/protobuf/empty.proto"; import "google/rpc/status.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https }; @@ -80,10 +80,10 @@ service RecurringRunService { message RecurringRun { // Output. Unique run ID generated by API server. - string recurring_run_id = 1; + string recurring_run_id = 1 [json_name = "recurring_run_id"]; // Required input field. Recurring run name provided by user. Not unique. - string display_name = 2; + string display_name = 2 [json_name = "display_name"]; // Optional input field. Describes the purpose of the recurring run. string description = 3; @@ -92,22 +92,22 @@ message RecurringRun { // recurring run. Can be either a pipeline id, pipeline version id, or a pipeline spec. oneof pipeline_source { // This field is Deprecated. The pipeline version id is under pipeline_version_reference for v2. - string pipeline_version_id = 4 [deprecated=true]; + string pipeline_version_id = 4 [deprecated=true, json_name = "pipeline_version_id"]; // The pipeline spec. - google.protobuf.Struct pipeline_spec = 5; + google.protobuf.Struct pipeline_spec = 5 [json_name = "pipeline_spec"]; // Reference to a pipeline version containing pipeline_id and pipeline_version_id. - PipelineVersionReference pipeline_version_reference = 18; + PipelineVersionReference pipeline_version_reference = 18 [json_name = "pipeline_version_reference"]; } // Runtime config of the pipeline. - RuntimeConfig runtime_config = 6; + RuntimeConfig runtime_config = 6 [json_name = "runtime_config"]; // Optional input field. Specifies which Kubernetes service account this recurring run uses. - string service_account = 7; + string service_account = 7 [json_name = "service_account"]; // Required input field. // Specifies how many runs can be executed concurrently. Range [1-10]. - int64 max_concurrency = 8; + int64 max_concurrency = 8 [json_name = "max_concurrency"]; // Required input field. // Specifies how a run is triggered. Support cron mode or periodic mode. @@ -125,10 +125,10 @@ message RecurringRun { Mode mode = 10; // Output. The time this recurring run was created. - google.protobuf.Timestamp created_at = 11; + google.protobuf.Timestamp created_at = 11 [json_name = "created_at"]; // Output. The last time this recurring run was updated. - google.protobuf.Timestamp updated_at = 12; + google.protobuf.Timestamp updated_at = 12 [json_name = "updated_at"]; // Output. The status of the recurring run. enum Status { @@ -146,14 +146,14 @@ message RecurringRun { // Optional input field. Whether the recurring run should catch up if behind schedule. // If true, the recurring run will only schedule the latest interval if behind schedule. // If false, the recurring run will catch up on each past interval. - bool no_catchup = 15; + bool no_catchup = 15 [json_name = "no_catchup"]; // TODO (gkclat): consider removing this field if it can be obtained from the parent experiment. // Output only. Namespace this recurring run belongs to. Derived from the parent experiment. - string namespace = 16; + string namespace = 16 [json_name = "namespace"]; // ID of the parent experiment this recurring run belongs to. - string experiment_id = 17; + string experiment_id = 17 [json_name = "experiment_id"]; } message CreateRecurringRunRequest { @@ -163,33 +163,33 @@ message CreateRecurringRunRequest { message GetRecurringRunRequest { // The ID of the recurring run to be retrieved. - string recurring_run_id = 1; + string recurring_run_id = 1 [json_name = "recurring_run_id"]; } message ListRecurringRunsRequest { // A page token to request the next page of results. The token is acquired // from the nextPageToken field of the response from the previous // ListRecurringRuns call or can be omitted when fetching the first page. - string page_token = 1; + string page_token = 1 [json_name = "page_token"]; // The number of recurring runs to be listed per page. If there are more recurring runs // than this number, the response message will contain a nextPageToken field you can use // to fetch the next page. - int32 page_size = 2; + int32 page_size = 2 [json_name = "page_size"]; // Can be formatted as "field_name", "field_name asc" or "field_name desc". // Ascending by default. - string sort_by = 3; + string sort_by = 3 [json_name = "sort_by"]; // Optional input. The namespace the recurring runs belong to. - string namespace = 4; + string namespace = 4 [json_name = "namespace"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). string filter = 5; // The ID of the experiment to be retrieved. If empty, list recurring runs across all experiments. - string experiment_id = 6; + string experiment_id = 6 [json_name = "experiment_id"]; } message ListRecurringRunsResponse { @@ -197,34 +197,34 @@ message ListRecurringRunsResponse { repeated RecurringRun recurringRuns = 1; // The total number of recurring runs for the given query. - int32 total_size = 2; + int32 total_size = 2 [json_name = "total_size"]; // The token to list the next page of recurring runs. - string next_page_token = 3; + string next_page_token = 3 [json_name = "next_page_token"]; } message EnableRecurringRunRequest { // The ID of the recurring runs to be enabled. - string recurring_run_id = 1; + string recurring_run_id = 1 [json_name = "recurring_run_id"]; } message DisableRecurringRunRequest { // The ID of the recurring runs to be disabled. - string recurring_run_id = 1; + string recurring_run_id = 1 [json_name = "recurring_run_id"]; } message DeleteRecurringRunRequest { // The ID of the recurring run to be deleted. - string recurring_run_id = 1; + string recurring_run_id = 1 [json_name = "recurring_run_id"]; } // CronSchedule allow scheduling the recurring run with unix-like cron. message CronSchedule { // The start time of the cron job. - google.protobuf.Timestamp start_time = 1; + google.protobuf.Timestamp start_time = 1 [json_name = "start_time"]; // The end time of the cron job. - google.protobuf.Timestamp end_time = 2; + google.protobuf.Timestamp end_time = 2 [json_name = "end_time"]; // The cron string. For details how to compose a cron, visit // ttps://en.wikipedia.org/wiki/Cron @@ -234,19 +234,19 @@ message CronSchedule { // PeriodicSchedule allow scheduling the recurring run periodically with certain interval. message PeriodicSchedule { // The start time of the periodic recurring run. - google.protobuf.Timestamp start_time = 1; + google.protobuf.Timestamp start_time = 1 [json_name = "start_time"]; // The end time of the periodic recurring run. - google.protobuf.Timestamp end_time = 2; + google.protobuf.Timestamp end_time = 2 [json_name = "end_time"]; // The time interval between the starting time of consecutive recurring runs. - int64 interval_second = 3; + int64 interval_second = 3 [json_name = "interval_second"]; } // Trigger defines what starts a pipeline run. message Trigger { oneof trigger { - CronSchedule cron_schedule = 1; - PeriodicSchedule periodic_schedule = 2; + CronSchedule cron_schedule = 1 [json_name = "cron_schedule"]; + PeriodicSchedule periodic_schedule = 2 [json_name = "periodic_schedule"]; } } diff --git a/backend/api/v2beta1/run.proto b/backend/api/v2beta1/run.proto index 5c48ab19317..326dbeda724 100644 --- a/backend/api/v2beta1/run.proto +++ b/backend/api/v2beta1/run.proto @@ -22,10 +22,10 @@ import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/struct.proto"; import "google/rpc/status.proto"; -import "protoc-gen-swagger/options/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; import "backend/api/v2beta1/runtime_config.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; @@ -61,7 +61,7 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { }; service RunService { - // Creates a new run in an experiment specified by experiment ID. + // Creates a new run in an experiment specified by experiment ID. // If experiment ID is not specified, the run is created in the default experiment. rpc CreateRun(CreateRunRequest) returns (Run) { option (google.api.http) = { @@ -77,7 +77,7 @@ service RunService { }; } - // Finds all runs in an experiment given by experiment ID. + // Finds all runs in an experiment given by experiment ID. // If experiment id is not specified, finds all runs across all experiments. rpc ListRuns(ListRunsRequest) returns (ListRunsResponse) { option (google.api.http) = { @@ -132,15 +132,15 @@ service RunService { message Run { // Input. ID of the parent experiment. // The default experiment ID will be used if this is not specified. - string experiment_id = 1; - + string experiment_id = 1 [json_name = "experiment_id"]; + // Output. Unique run ID. Generated by API server. - string run_id = 2; - + string run_id = 2 [json_name = "run_id"]; + // Required input. Name provided by user, // or auto generated if run is created by a recurring run. - string display_name = 3; - + string display_name = 3 [json_name = "display_name"]; + // Describes whether an entity is available or archived. enum StorageState { // Default state. This state in not used @@ -154,67 +154,67 @@ message Run { } // Output. Specifies whether this run is in archived or available mode. - StorageState storage_state = 4; - + StorageState storage_state = 4 [json_name = "storage_state"]; + // Optional input. Short description of the run. string description = 5; - - // Required input. Specifies the source of the pipeline spec for this + + // Required input. Specifies the source of the pipeline spec for this // run. Can be either a pipeline version id, or a pipeline spec. oneof pipeline_source { // This field is Deprecated. The pipeline version id is under pipeline_version_reference for v2. - string pipeline_version_id = 6 [deprecated = true]; + string pipeline_version_id = 6 [deprecated = true, json_name = "pipeline_version_id"] ; // Pipeline spec. - google.protobuf.Struct pipeline_spec = 7; + google.protobuf.Struct pipeline_spec = 7 [json_name = "pipeline_spec"]; // Reference to a pipeline containing pipeline_id and optionally the pipeline_version_id. - PipelineVersionReference pipeline_version_reference = 18; + PipelineVersionReference pipeline_version_reference = 18 [json_name = "pipeline_version_reference"]; } - - // Required input. Runtime config of the run. - RuntimeConfig runtime_config = 8; - + + // Required input. Runtime config of the run. + RuntimeConfig runtime_config = 8 [json_name = "runtime_config"]; + // Optional input. Specifies which kubernetes service account is used. - string service_account = 9; - + string service_account = 9 [json_name = "service_account"]; + // Output. Creation time of the run. - google.protobuf.Timestamp created_at = 10; - + google.protobuf.Timestamp created_at = 10 [json_name = "created_at"]; + // Output. When this run is scheduled to start. This could be different from // created_at. For example, if a run is from a backfilling job that was supposed // to run 2 month ago, the created_at will be 2 month behind scheduled_at. - google.protobuf.Timestamp scheduled_at = 11; - + google.protobuf.Timestamp scheduled_at = 11 [json_name = "scheduled_at"]; + // Output. Completion of the run. - google.protobuf.Timestamp finished_at = 12; + google.protobuf.Timestamp finished_at = 12 [json_name = "finished_at"]; // Output. Runtime state of a run. RuntimeState state = 13; - + // In case any error happens retrieving a run field, only run ID // and the error message is returned. Client has the flexibility of choosing // how to handle the error. This is especially useful during listing call. google.rpc.Status error = 14; - + // Output. Runtime details of a run. - RunDetails run_details = 15; + RunDetails run_details = 15 [json_name = "run_details"]; // ID of the recurring run that triggered this run. - string recurring_run_id = 16; + string recurring_run_id = 16 [json_name = "recurring_run_id"]; - // Output. A sequence of run statuses. This field keeps a record + // Output. A sequence of run statuses. This field keeps a record // of state transitions. - repeated RuntimeStatus state_history = 17; + repeated RuntimeStatus state_history = 17 [json_name = "state_history"]; } // Reference to an existing pipeline version. message PipelineVersionReference { // Input. Required. Unique ID of the parent pipeline. - string pipeline_id = 1; + string pipeline_id = 1 [json_name = "pipeline_id"]; // Input. Optional. Unique ID of an existing pipeline version. If unset, the latest pipeline version is used. - string pipeline_version_id = 2; + string pipeline_version_id = 2 [json_name = "pipeline_version_id"]; } // Describes the runtime state of an entity. @@ -251,7 +251,7 @@ enum RuntimeState { // Timestamped representation of a runtime state with an optional error. message RuntimeStatus { // Update time of this state. - google.protobuf.Timestamp update_time = 1; + google.protobuf.Timestamp update_time = 1 [json_name = "update_time"]; // The state of a runtime instance. RuntimeState state = 2; @@ -259,7 +259,7 @@ message RuntimeStatus { // The error that occurred during the state. May be set when the state is // any of the non-final states (PENDING/RUNNING/CANCELING) or FAILED state. // If the state is FAILED, the error here is final and not going to be - // retried. If the state is a non-final state, the error indicates that a + // retried. If the state is a non-final state, the error indicates that a // system-error being retried. google.rpc.Status error = 3; } @@ -267,44 +267,44 @@ message RuntimeStatus { // Runtime details of a run. message RunDetails { // Pipeline context ID of a run. - int64 pipeline_context_id = 1; + int64 pipeline_context_id = 1 [json_name = "pipeline_context_id"]; // Pipeline run context ID of a run. - int64 pipeline_run_context_id = 2; + int64 pipeline_run_context_id = 2 [json_name = "pipeline_run_context_id"]; // Runtime details of the tasks that belong to the run. - repeated PipelineTaskDetail task_details = 3; + repeated PipelineTaskDetail task_details = 3 [json_name = "task_details"]; } // Runtime information of a task execution. message PipelineTaskDetail { // ID of the parent run. - string run_id = 1; + string run_id = 1 [json_name = "run_id"]; // System-generated ID of a task. - string task_id = 2; + string task_id = 2 [json_name = "task_id"]; // User specified name of a task that is defined in // [Pipeline.spec][]. - string display_name = 3; + string display_name = 3 [json_name = "display_name"]; // Creation time of a task. - google.protobuf.Timestamp create_time = 4; + google.protobuf.Timestamp create_time = 4 [json_name = "create_time"]; // Starting time of a task. - google.protobuf.Timestamp start_time = 5; + google.protobuf.Timestamp start_time = 5 [json_name = "start_time"]; // Completion time of a task. - google.protobuf.Timestamp end_time = 6; + google.protobuf.Timestamp end_time = 6 [json_name = "end_time"]; // Execution information of a task. - PipelineTaskExecutorDetail executor_detail = 7; + PipelineTaskExecutorDetail executor_detail = 7 [json_name = "executor_detail"]; // Runtime state of a task. RuntimeState state = 8; // Execution id of the corresponding entry in ML metadata store. - int64 execution_id = 9; + int64 execution_id = 9 [json_name = "execution_id"]; // The error that occurred during task execution. // Only populated when the task is in FAILED or CANCELED state. @@ -318,65 +318,65 @@ message PipelineTaskDetail { // ID of the parent task if the task is within a component scope. // Empty if the task is at the root level. - string parent_task_id = 13; + string parent_task_id = 13 [json_name = "parent_task_id"]; - // A sequence of task statuses. This field keeps a record + // A sequence of task statuses. This field keeps a record // of state transitions. - repeated RuntimeStatus state_history = 14; + repeated RuntimeStatus state_history = 14 [json_name = "state_history"]; // Name of the corresponding pod assigned by the orchestration engine. // Also known as node_id. - string pod_name = 15; - + string pod_name = 15 [json_name = "pod_name"]; + // A dependent task that requires this one to succeed. // Represented by either task_id or pod_name. message ChildTask { oneof child_task { // System-generated ID of a task. - string task_id = 1; - + string task_id = 1 [json_name = "task_id"]; + // Name of the corresponding pod assigned by the orchestration engine. // Also known as node_id. - string pod_name = 2; + string pod_name = 2 [json_name = "pod_name"]; } } // Sequence of dependen tasks. - repeated ChildTask child_tasks = 16; + repeated ChildTask child_tasks = 16 [json_name = "child_tasks"]; } // Runtime information of a pipeline task executor. message PipelineTaskExecutorDetail { // The name of the job for the main container execution. - string main_job = 1; + string main_job = 1 [json_name = "main_job"]; // The name of the job for the pre-caching-check container // execution. This job will be available if the // Run.pipeline_spec specifies the `pre_caching_check` hook in // the lifecycle events. - string pre_caching_check_job = 2; + string pre_caching_check_job = 2 [json_name = "pre_caching_check_job"]; // The names of the previously failed job for the main container // executions. The list includes the all attempts in chronological order. - repeated string failed_main_jobs = 3; + repeated string failed_main_jobs = 3 [json_name = "failed_main_jobs"]; // The names of the previously failed job for the // pre-caching-check container executions. This job will be available if the // Run.pipeline_spec specifies the `pre_caching_check` hook in // the lifecycle events. // The list includes the all attempts in chronological order. - repeated string failed_pre_caching_check_jobs = 4; + repeated string failed_pre_caching_check_jobs = 4 [json_name = "failed_pre_caching_check_jobs"]; } // A list of artifact metadata. message ArtifactList { // A list of artifact metadata ids. - repeated int64 artifact_ids = 1; + repeated int64 artifact_ids = 1 [json_name = "artifact_ids"]; } message CreateRunRequest { // The ID of the parent experiment. - string experiment_id = 1 [deprecated = true]; + string experiment_id = 1 [deprecated = true, json_name = "experiment_id"]; // Run to be created. Run run = 2; @@ -384,10 +384,10 @@ message CreateRunRequest { message GetRunRequest { // The ID of the parent experiment. - string experiment_id = 1 [deprecated = true]; + string experiment_id = 1 [deprecated = true, json_name = "experiment_id"]; // The ID of the run to be retrieved. - string run_id = 2; + string run_id = 2 [json_name = "run_id"]; } message ListRunsRequest { @@ -395,21 +395,21 @@ message ListRunsRequest { string namespace = 1; // The ID of the parent experiment. If empty, response includes runs across all experiments. - string experiment_id = 2; + string experiment_id = 2 [json_name = "experiment_id"]; // A page token to request the next page of results. The token is acquired // from the nextPageToken field of the response from the previous // ListRuns call or can be omitted when fetching the first page. - string page_token = 3; + string page_token = 3 [json_name = "page_token"]; // The number of runs to be listed per page. If there are more runs than this // number, the response message will contain a nextPageToken field you can use // to fetch the next page. - int32 page_size = 4; + int32 page_size = 4 [json_name = "page_size"]; // Can be format of "field_name", "field_name asc" or "field_name desc" // (Example, "name asc" or "id desc"). Ascending by default. - string sort_by = 5; + string sort_by = 5 [json_name = "sort_by"]; // A url-encoded, JSON-serialized Filter protocol buffer (see // [filter.proto](https://github.com/kubeflow/pipelines/blob/master/backend/api/filter.proto)). @@ -418,10 +418,10 @@ message ListRunsRequest { message TerminateRunRequest { // The ID of the parent experiment. - string experiment_id = 1 [deprecated = true]; + string experiment_id = 1 [deprecated = true, json_name = "experiment_id"]; // The ID of the run to be terminated. - string run_id = 2; + string run_id = 2 [json_name = "run_id"]; } message ListRunsResponse { @@ -429,48 +429,48 @@ message ListRunsResponse { repeated Run runs = 1; // The total number of runs for the given query. - int32 total_size = 2; + int32 total_size = 2 [json_name = "total_size"]; // The token to list the next page of runs. - string next_page_token = 3; + string next_page_token = 3 [json_name = "next_page_token"]; } message ArchiveRunRequest { // The ID of the parent experiment. - string experiment_id = 1 [deprecated = true]; + string experiment_id = 1 [deprecated = true, json_name = "experiment_id"]; // The ID of the run to be archived. - string run_id = 2; + string run_id = 2 [json_name = "run_id"]; } message UnarchiveRunRequest { // The ID of the parent experiment. - string experiment_id = 1 [deprecated = true]; + string experiment_id = 1 [deprecated = true, json_name = "experiment_id"]; // The ID of the run to be restored. - string run_id = 2; + string run_id = 2 [json_name = "run_id"]; } message DeleteRunRequest { // The ID of the parent experiment. - string experiment_id = 1 [deprecated = true]; + string experiment_id = 1 [deprecated = true, json_name = "experiment_id"]; // The ID of the run to be deleted. - string run_id = 2; + string run_id = 2 [json_name = "run_id"]; } message ReadArtifactRequest { // The ID of the parent experiment. - string experiment_id = 1 [deprecated = true]; + string experiment_id = 1 [deprecated = true, json_name = "experiment_id"]; // ID of the run. - string run_id = 2; + string run_id = 2 [json_name = "run_id"]; // ID of the running node. - string node_id = 3; + string node_id = 3 [json_name = "node_id"]; // Name of the artifact. - string artifact_name = 4; + string artifact_name = 4 [json_name = "artifact_name"]; } message ReadArtifactResponse { @@ -480,8 +480,8 @@ message ReadArtifactResponse { message RetryRunRequest { // The ID of the parent experiment. - string experiment_id = 1 [deprecated = true]; + string experiment_id = 1 [deprecated = true, json_name = "experiment_id"]; // The ID of the run to be retried. - string run_id = 2; + string run_id = 2 [json_name = "run_id"]; } \ No newline at end of file diff --git a/backend/api/v2beta1/runtime_config.proto b/backend/api/v2beta1/runtime_config.proto index c93d36dd4cb..26befe550f7 100644 --- a/backend/api/v2beta1/runtime_config.proto +++ b/backend/api/v2beta1/runtime_config.proto @@ -29,5 +29,5 @@ message RuntimeConfig { // output directory of the pipeline. It is used by the system to // generate the paths of output artifacts. // Ref:(https://www.kubeflow.org/docs/components/pipelines/pipeline-root/) - string pipeline_root = 2; + string pipeline_root = 2 [json_name = "pipeline_root"]; } diff --git a/backend/api/v2beta1/swagger/auth.swagger.json b/backend/api/v2beta1/swagger/auth.swagger.json index cba77e8d2c2..b322e488022 100644 --- a/backend/api/v2beta1/swagger/auth.swagger.json +++ b/backend/api/v2beta1/swagger/auth.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/auth.proto", "version": "version not set" }, + "tags": [ + { + "name": "AuthService" + } + ], "schemes": [ "http", "https" @@ -22,25 +27,28 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { "name": "namespace", + "description": "Namespace the resource belongs to.", "in": "query", "required": false, "type": "string" }, { "name": "resources", + "description": "Resource type asking for authorization.", "in": "query", "required": false, "type": "string", @@ -52,6 +60,7 @@ }, { "name": "verb", + "description": "Verb on the resource asking for authorization.", "in": "query", "required": false, "type": "string", @@ -91,41 +100,39 @@ "default": "UNASSIGNED_VERB", "description": "Type of verbs that act on the resources." }, - "protobufAny": { + "googlerpcStatus": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." }, "message": { - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." }, "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" - } + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." } - } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } }, "securityDefinitions": { diff --git a/backend/api/v2beta1/swagger/experiment.swagger.json b/backend/api/v2beta1/swagger/experiment.swagger.json index ef416c70e84..8c390bb97b4 100644 --- a/backend/api/v2beta1/swagger/experiment.swagger.json +++ b/backend/api/v2beta1/swagger/experiment.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/experiment.proto", "version": "version not set" }, + "tags": [ + { + "name": "ExperimentService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -88,13 +93,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "experiment", "description": "The experiment to be created.", "in": "body", "required": true, @@ -122,7 +127,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -146,13 +151,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -178,13 +184,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -210,13 +217,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -236,41 +244,39 @@ } }, "definitions": { - "protobufAny": { + "googlerpcStatus": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." }, "message": { - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." }, "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" - } + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." } - } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v2beta1Experiment": { "type": "object", @@ -323,6 +329,7 @@ "experiments": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1Experiment" }, "description": "A list of experiments returned." diff --git a/backend/api/v2beta1/swagger/filter.swagger.json b/backend/api/v2beta1/swagger/filter.swagger.json index 3c80e5530c5..67b7b8764c0 100644 --- a/backend/api/v2beta1/swagger/filter.swagger.json +++ b/backend/api/v2beta1/swagger/filter.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/filter.proto", "version": "version not set" }, + "tags": [ + { + "name": "DummyFilterService" + } + ], "consumes": [ "application/json" ], @@ -50,41 +55,39 @@ }, "description": "List of strings." }, - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." }, "message": { - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." }, "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" - } + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } - } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v2beta1Filter": { "type": "object", @@ -92,6 +95,7 @@ "predicates": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1Predicate" }, "description": "All predicates are AND-ed when this filter is applied." diff --git a/backend/api/v2beta1/swagger/healthz.swagger.json b/backend/api/v2beta1/swagger/healthz.swagger.json index 077b1670005..2775f836549 100644 --- a/backend/api/v2beta1/swagger/healthz.swagger.json +++ b/backend/api/v2beta1/swagger/healthz.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/healthz.proto", "version": "version not set" }, + "tags": [ + { + "name": "HealthzService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -40,41 +45,39 @@ } }, "definitions": { - "protobufAny": { + "googlerpcStatus": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." }, "message": { - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." }, "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" - } + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." } - } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v2beta1GetHealthzResponse": { "type": "object", diff --git a/backend/api/v2beta1/swagger/kfp_api_single_file.swagger.json b/backend/api/v2beta1/swagger/kfp_api_single_file.swagger.json index 56e883e7905..4ce50ed0cf6 100644 --- a/backend/api/v2beta1/swagger/kfp_api_single_file.swagger.json +++ b/backend/api/v2beta1/swagger/kfp_api_single_file.swagger.json @@ -14,6 +14,11 @@ "url": "https://raw.githubusercontent.com/kubeflow/pipelines/master/LICENSE" } }, + "tags": [ + { + "name": "VisualizationService" + } + ], "schemes": [ "http", "https" @@ -32,25 +37,28 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { "name": "namespace", + "description": "Namespace the resource belongs to.", "in": "query", "required": false, "type": "string" }, { "name": "resources", + "description": "Resource type asking for authorization.", "in": "query", "required": false, "type": "string", @@ -62,6 +70,7 @@ }, { "name": "verb", + "description": "Verb on the resource asking for authorization.", "in": "query", "required": false, "type": "string", @@ -93,7 +102,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -152,13 +161,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "experiment", "description": "The experiment to be created.", "in": "body", "required": true, @@ -186,7 +195,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -210,13 +219,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -242,13 +252,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -274,13 +285,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -312,7 +324,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -335,7 +347,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -394,13 +406,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "pipeline", "description": "Required input. Pipeline that needs to be created.", "in": "body", "required": true, @@ -428,7 +440,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -461,7 +473,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -500,7 +512,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -524,13 +536,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -569,7 +582,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -628,7 +641,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -641,7 +654,7 @@ "type": "string" }, { - "name": "body", + "name": "pipeline_version", "description": "Required input. Pipeline version ID to be created.", "in": "body", "required": true, @@ -669,7 +682,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -700,13 +713,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -867,7 +881,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -933,13 +947,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "recurring_run", "description": "The recurring run to be created.", "in": "body", "required": true, @@ -967,7 +981,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -991,13 +1005,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1023,13 +1038,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1055,13 +1071,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1086,19 +1103,20 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "scheduled_workflow", "description": "ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string.", "in": "body", "required": true, @@ -1119,19 +1137,20 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "workflow", "description": "Workflow is a workflow custom resource marshalled into a json string.", "in": "body", "required": true, @@ -1147,7 +1166,7 @@ }, "/apis/v2beta1/runs": { "get": { - "summary": "Finds all runs in an experiment given by experiment ID. \nIf experiment id is not specified, finds all runs across all experiments.", + "summary": "Finds all runs in an experiment given by experiment ID.\nIf experiment id is not specified, finds all runs across all experiments.", "operationId": "RunService_ListRuns", "responses": { "200": { @@ -1159,7 +1178,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1213,7 +1232,7 @@ ] }, "post": { - "summary": "Creates a new run in an experiment specified by experiment ID. \nIf experiment ID is not specified, the run is created in the default experiment.", + "summary": "Creates a new run in an experiment specified by experiment ID.\nIf experiment ID is not specified, the run is created in the default experiment.", "operationId": "RunService_CreateRun", "responses": { "200": { @@ -1225,13 +1244,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "run", "description": "Run to be created.", "in": "body", "required": true, @@ -1266,7 +1285,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1297,13 +1316,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1342,7 +1362,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1389,13 +1409,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1406,6 +1427,13 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "experiment_id", + "description": "The ID of the parent experiment.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -1421,13 +1449,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1438,6 +1467,13 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "experiment_id", + "description": "The ID of the parent experiment.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -1453,13 +1489,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1470,6 +1507,13 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "experiment_id", + "description": "The ID of the parent experiment.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -1485,13 +1529,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1502,6 +1547,13 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "experiment_id", + "description": "The ID of the parent experiment.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -1522,7 +1574,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -1534,7 +1586,7 @@ "type": "string" }, { - "name": "body", + "name": "visualization", "in": "body", "required": true, "schema": { @@ -1569,41 +1621,48 @@ "default": "UNASSIGNED_VERB", "description": "Type of verbs that act on the resources." }, - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." }, "message": { - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." }, "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" - } + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." } - } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "type_url": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "value": { + "type": "string", + "format": "byte", + "description": "Must be a valid serialized protocol buffer of the above specified type." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := &pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": ,\n \"lastName\": \n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v2beta1Experiment": { "type": "object", @@ -1656,6 +1715,7 @@ "experiments": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1Experiment" }, "description": "A list of experiments returned." @@ -1715,6 +1775,7 @@ "predicates": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1Predicate" }, "description": "All predicates are AND-ed when this filter is applied." @@ -1796,35 +1857,13 @@ } } }, - "googlerpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." - }, - "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - }, - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - } - }, - "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." - }, "protobufNullValue": { "type": "string", "enum": [ "NULL_VALUE" ], "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." }, "v2beta1CreatePipelineAndVersionRequest": { "type": "object", @@ -1845,6 +1884,7 @@ "pipeline_versions": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1PipelineVersion" }, "description": "Returned pipeline versions." @@ -1866,6 +1906,7 @@ "pipelines": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1Pipeline" }, "description": "Returned pipelines." @@ -2006,6 +2047,7 @@ "recurringRuns": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1RecurringRun" }, "description": "A list of recurring runs returned." @@ -2150,9 +2192,7 @@ "properties": { "parameters": { "type": "object", - "additionalProperties": { - "type": "object" - }, + "additionalProperties": {}, "description": "The runtime parameters of the Pipeline. The parameters will be\nused to replace the placeholders at runtime." }, "pipeline_root": { @@ -2208,6 +2248,7 @@ "runs": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1Run" }, "description": "List of retrieved runs." @@ -2291,9 +2332,10 @@ "state_history": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1RuntimeStatus" }, - "description": "A sequence of task statuses. This field keeps a record \nof state transitions." + "description": "A sequence of task statuses. This field keeps a record\nof state transitions." }, "pod_name": { "type": "string", @@ -2302,6 +2344,7 @@ "child_tasks": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/PipelineTaskDetailChildTask" }, "description": "Sequence of dependen tasks." @@ -2424,9 +2467,10 @@ "state_history": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1RuntimeStatus" }, - "description": "Output. A sequence of run statuses. This field keeps a record \nof state transitions." + "description": "Output. A sequence of run statuses. This field keeps a record\nof state transitions." } } }, @@ -2446,6 +2490,7 @@ "task_details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1PipelineTaskDetail" }, "description": "Runtime details of the tasks that belong to the run." @@ -2493,7 +2538,7 @@ }, "error": { "$ref": "#/definitions/googlerpcStatus", - "description": "The error that occurred during the state. May be set when the state is\nany of the non-final states (PENDING/RUNNING/CANCELING) or FAILED state.\nIf the state is FAILED, the error here is final and not going to be\nretried. If the state is a non-final state, the error indicates that a \nsystem-error being retried." + "description": "The error that occurred during the state. May be set when the state is\nany of the non-final states (PENDING/RUNNING/CANCELING) or FAILED state.\nIf the state is FAILED, the error here is final and not going to be\nretried. If the state is a non-final state, the error indicates that a\nsystem-error being retried." } }, "description": "Timestamped representation of a runtime state with an optional error." diff --git a/backend/api/v2beta1/swagger/pipeline.swagger.json b/backend/api/v2beta1/swagger/pipeline.swagger.json index 2608a22d29a..188aefaf169 100644 --- a/backend/api/v2beta1/swagger/pipeline.swagger.json +++ b/backend/api/v2beta1/swagger/pipeline.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/pipeline.proto", "version": "version not set" }, + "tags": [ + { + "name": "PipelineService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -88,13 +93,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "pipeline", "description": "Required input. Pipeline that needs to be created.", "in": "body", "required": true, @@ -122,7 +127,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -155,7 +160,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -194,7 +199,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -218,13 +223,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -263,7 +269,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -322,7 +328,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -335,7 +341,7 @@ "type": "string" }, { - "name": "body", + "name": "pipeline_version", "description": "Required input. Pipeline version ID to be created.", "in": "body", "required": true, @@ -363,7 +369,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -394,13 +400,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -442,6 +449,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" }, "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." @@ -452,17 +460,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "protobufNullValue": { "type": "string", @@ -470,28 +474,7 @@ "NULL_VALUE" ], "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." }, "v2beta1CreatePipelineAndVersionRequest": { "type": "object", @@ -512,6 +495,7 @@ "pipeline_versions": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1PipelineVersion" }, "description": "Returned pipeline versions." @@ -533,6 +517,7 @@ "pipelines": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1Pipeline" }, "description": "Returned pipelines." diff --git a/backend/api/v2beta1/swagger/recurring_run.swagger.json b/backend/api/v2beta1/swagger/recurring_run.swagger.json index fd3698c1fed..d916be4d100 100644 --- a/backend/api/v2beta1/swagger/recurring_run.swagger.json +++ b/backend/api/v2beta1/swagger/recurring_run.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/recurring_run.proto", "version": "version not set" }, + "tags": [ + { + "name": "RecurringRunService" + } + ], "schemes": [ "http", "https" @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -95,13 +100,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "recurring_run", "description": "The recurring run to be created.", "in": "body", "required": true, @@ -129,7 +134,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -153,13 +158,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -185,13 +191,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -217,13 +224,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -268,6 +276,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" }, "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." @@ -278,17 +287,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { + "@type": { "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "protobufNullValue": { "type": "string", @@ -296,28 +301,7 @@ "NULL_VALUE" ], "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." }, "v2beta1CronSchedule": { "type": "object", @@ -345,6 +329,7 @@ "recurringRuns": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1RecurringRun" }, "description": "A list of recurring runs returned." @@ -489,9 +474,7 @@ "properties": { "parameters": { "type": "object", - "additionalProperties": { - "type": "object" - }, + "additionalProperties": {}, "description": "The runtime parameters of the Pipeline. The parameters will be\nused to replace the placeholders at runtime." }, "pipeline_root": { diff --git a/backend/api/v2beta1/swagger/report.swagger.json b/backend/api/v2beta1/swagger/report.swagger.json index 32d9d80c359..fae5c6c3ff9 100644 --- a/backend/api/v2beta1/swagger/report.swagger.json +++ b/backend/api/v2beta1/swagger/report.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/report.proto", "version": "version not set" }, + "tags": [ + { + "name": "ReportService" + } + ], "consumes": [ "application/json" ], @@ -18,19 +23,20 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "scheduled_workflow", "description": "ScheduledWorkflow a ScheduledWorkflow resource marshalled into a json string.", "in": "body", "required": true, @@ -51,19 +57,20 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "workflow", "description": "Workflow is a workflow custom resource marshalled into a json string.", "in": "body", "required": true, @@ -79,41 +86,39 @@ } }, "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." }, "message": { - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." }, "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" - } + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." } - } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v2beta1/swagger/run.swagger.json b/backend/api/v2beta1/swagger/run.swagger.json index 1233dea265b..e760b89f924 100644 --- a/backend/api/v2beta1/swagger/run.swagger.json +++ b/backend/api/v2beta1/swagger/run.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/run.proto", "version": "version not set" }, + "tags": [ + { + "name": "RunService" + } + ], "schemes": [ "http", "https" @@ -17,7 +22,7 @@ "paths": { "/apis/v2beta1/runs": { "get": { - "summary": "Finds all runs in an experiment given by experiment ID. \nIf experiment id is not specified, finds all runs across all experiments.", + "summary": "Finds all runs in an experiment given by experiment ID.\nIf experiment id is not specified, finds all runs across all experiments.", "operationId": "RunService_ListRuns", "responses": { "200": { @@ -29,7 +34,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -83,7 +88,7 @@ ] }, "post": { - "summary": "Creates a new run in an experiment specified by experiment ID. \nIf experiment ID is not specified, the run is created in the default experiment.", + "summary": "Creates a new run in an experiment specified by experiment ID.\nIf experiment ID is not specified, the run is created in the default experiment.", "operationId": "RunService_CreateRun", "responses": { "200": { @@ -95,13 +100,13 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, "parameters": [ { - "name": "body", + "name": "run", "description": "Run to be created.", "in": "body", "required": true, @@ -136,7 +141,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -167,13 +172,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -212,7 +218,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -259,13 +265,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -276,6 +283,13 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "experiment_id", + "description": "The ID of the parent experiment.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -291,13 +305,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -308,6 +323,13 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "experiment_id", + "description": "The ID of the parent experiment.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -323,13 +345,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -340,6 +363,13 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "experiment_id", + "description": "The ID of the parent experiment.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -355,13 +385,14 @@ "200": { "description": "A successful response.", "schema": { + "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -372,6 +403,13 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "experiment_id", + "description": "The ID of the parent experiment.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -410,6 +448,7 @@ "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" }, "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." @@ -420,17 +459,13 @@ "protobufAny": { "type": "object", "properties": { - "type_url": { + "@type": { "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "protobufNullValue": { "type": "string", @@ -438,28 +473,7 @@ "NULL_VALUE" ], "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." }, "v2beta1ArtifactList": { "type": "object", @@ -481,6 +495,7 @@ "runs": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1Run" }, "description": "List of retrieved runs." @@ -564,9 +579,10 @@ "state_history": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1RuntimeStatus" }, - "description": "A sequence of task statuses. This field keeps a record \nof state transitions." + "description": "A sequence of task statuses. This field keeps a record\nof state transitions." }, "pod_name": { "type": "string", @@ -575,6 +591,7 @@ "child_tasks": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/PipelineTaskDetailChildTask" }, "description": "Sequence of dependen tasks." @@ -711,9 +728,10 @@ "state_history": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1RuntimeStatus" }, - "description": "Output. A sequence of run statuses. This field keeps a record \nof state transitions." + "description": "Output. A sequence of run statuses. This field keeps a record\nof state transitions." } } }, @@ -733,6 +751,7 @@ "task_details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/v2beta1PipelineTaskDetail" }, "description": "Runtime details of the tasks that belong to the run." @@ -755,9 +774,7 @@ "properties": { "parameters": { "type": "object", - "additionalProperties": { - "type": "object" - }, + "additionalProperties": {}, "description": "The runtime parameters of the Pipeline. The parameters will be\nused to replace the placeholders at runtime." }, "pipeline_root": { @@ -797,7 +814,7 @@ }, "error": { "$ref": "#/definitions/googlerpcStatus", - "description": "The error that occurred during the state. May be set when the state is\nany of the non-final states (PENDING/RUNNING/CANCELING) or FAILED state.\nIf the state is FAILED, the error here is final and not going to be\nretried. If the state is a non-final state, the error indicates that a \nsystem-error being retried." + "description": "The error that occurred during the state. May be set when the state is\nany of the non-final states (PENDING/RUNNING/CANCELING) or FAILED state.\nIf the state is FAILED, the error here is final and not going to be\nretried. If the state is a non-final state, the error indicates that a\nsystem-error being retried." } }, "description": "Timestamped representation of a runtime state with an optional error." diff --git a/backend/api/v2beta1/swagger/runtime_config.swagger.json b/backend/api/v2beta1/swagger/runtime_config.swagger.json index 7a932f3754d..1da8a3633f4 100644 --- a/backend/api/v2beta1/swagger/runtime_config.swagger.json +++ b/backend/api/v2beta1/swagger/runtime_config.swagger.json @@ -12,41 +12,39 @@ ], "paths": {}, "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { + "googlerpcStatus": { "type": "object", "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." }, "message": { - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." }, "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" - } + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." } - } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" } } } diff --git a/backend/api/v2beta1/swagger/visualization.swagger.json b/backend/api/v2beta1/swagger/visualization.swagger.json index 3123da36938..601abb69024 100644 --- a/backend/api/v2beta1/swagger/visualization.swagger.json +++ b/backend/api/v2beta1/swagger/visualization.swagger.json @@ -4,6 +4,11 @@ "title": "backend/api/v2beta1/visualization.proto", "version": "version not set" }, + "tags": [ + { + "name": "VisualizationService" + } + ], "schemes": [ "http", "https" @@ -28,7 +33,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/runtimeError" + "$ref": "#/definitions/googlerpcStatus" } } }, @@ -40,7 +45,7 @@ "type": "string" }, { - "name": "body", + "name": "visualization", "in": "body", "required": true, "schema": { @@ -55,41 +60,39 @@ } }, "definitions": { - "protobufAny": { + "googlerpcStatus": { "type": "object", "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, "code": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]." }, "message": { - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client." }, "details": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/protobufAny" - } + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." } - } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "v2beta1Visualization": { "type": "object", diff --git a/backend/api/v2beta1/visualization.proto b/backend/api/v2beta1/visualization.proto index 5b6746e8f16..5a991fea257 100644 --- a/backend/api/v2beta1/visualization.proto +++ b/backend/api/v2beta1/visualization.proto @@ -18,10 +18,9 @@ option go_package = "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client package kubeflow.pipelines.backend.api.v2beta1; import "google/api/annotations.proto"; -import "protoc-gen-swagger/options/annotations.proto"; -import "google/rpc/status.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { schemes: [1, 2], // http + https responses: { key: "default"; diff --git a/backend/src/apiserver/filter/filter.go b/backend/src/apiserver/filter/filter.go index 630ae073044..0b7f67f1800 100644 --- a/backend/src/apiserver/filter/filter.go +++ b/backend/src/apiserver/filter/filter.go @@ -22,7 +22,6 @@ import ( "strings" "github.com/Masterminds/squirrel" - "github.com/golang/protobuf/ptypes" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" "github.com/kubeflow/pipelines/backend/src/common/util" @@ -518,11 +517,7 @@ func toValue(v interface{}) (interface{}, error) { case *apiv2beta1.Predicate_StringValue: return v.StringValue, nil case *apiv2beta1.Predicate_TimestampValue: - ts, err := ptypes.Timestamp(v.TimestampValue) - if err != nil { - return nil, util.NewInvalidInputError("invalid timestamp: %v", err) - } - return ts.Unix(), nil + return v.TimestampValue.AsTime().Unix(), nil case *apiv2beta1.Predicate_IntValues_: return v.IntValues.GetValues(), nil case *apiv2beta1.Predicate_StringValues_: @@ -537,11 +532,7 @@ func toValue(v interface{}) (interface{}, error) { case *apiv1beta1.Predicate_StringValue: return v.StringValue, nil case *apiv1beta1.Predicate_TimestampValue: - ts, err := ptypes.Timestamp(v.TimestampValue) - if err != nil { - return nil, util.NewInvalidInputError("invalid timestamp: %v", err) - } - return ts.Unix(), nil + return v.TimestampValue.AsTime().Unix(), nil case *apiv1beta1.Predicate_IntValues: return v.IntValues.GetValues(), nil case *apiv1beta1.Predicate_StringValues: diff --git a/backend/src/apiserver/filter/filter_test.go b/backend/src/apiserver/filter/filter_test.go index 105472cac99..6854e306bf8 100644 --- a/backend/src/apiserver/filter/filter_test.go +++ b/backend/src/apiserver/filter/filter_test.go @@ -18,8 +18,9 @@ import ( "encoding/json" "testing" + "google.golang.org/protobuf/encoding/prototext" + "github.com/Masterminds/squirrel" - "github.com/golang/protobuf/proto" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" @@ -90,7 +91,7 @@ func TestValidNewFiltersV1(t *testing.T) { for _, test := range tests { filterProto := &apiv1beta1.Filter{} - if err := proto.UnmarshalText(test.protoStr, filterProto); err != nil { + if err := prototext.Unmarshal([]byte(test.protoStr), filterProto); err != nil { t.Errorf("Failed to unmarshal Filter text proto\n%q\nError: %v", test.protoStr, err) continue } @@ -163,7 +164,7 @@ func TestValidNewFilters(t *testing.T) { for _, test := range tests { filterProto := &apiv2beta1.Filter{} - if err := proto.UnmarshalText(test.protoStr, filterProto); err != nil { + if err := prototext.Unmarshal([]byte(test.protoStr), filterProto); err != nil { t.Errorf("Failed to unmarshal Filter text proto\n%q\nError: %v", test.protoStr, err) continue } @@ -208,7 +209,7 @@ func TestValidNewFiltersWithKeyMapV1(t *testing.T) { for _, test := range tests { filterProto := &apiv1beta1.Filter{} - if err := proto.UnmarshalText(test.protoStr, filterProto); err != nil { + if err := prototext.Unmarshal([]byte(test.protoStr), filterProto); err != nil { t.Errorf("Failed to unmarshal Filter text proto\n%q\nError: %v", test.protoStr, err) continue } @@ -260,7 +261,7 @@ func TestValidNewFiltersWithKeyMap(t *testing.T) { for _, test := range tests { filterProto := &apiv2beta1.Filter{} - if err := proto.UnmarshalText(test.protoStr, filterProto); err != nil { + if err := prototext.Unmarshal([]byte(test.protoStr), filterProto); err != nil { t.Errorf("Failed to unmarshal Filter text proto\n%q\nError: %v", test.protoStr, err) continue } @@ -336,16 +337,11 @@ func TestInvalidFiltersV1(t *testing.T) { { `predicates { key: "total" op: IN }`, }, - // Bad timestamp - { - `predicates { key: "total" op: LESS_THAN - timestamp_value { seconds: -100000000000 }}`, - }, } for _, test := range tests { filterProto := &apiv1beta1.Filter{} - if err := proto.UnmarshalText(test.protoStr, filterProto); err != nil { + if err := prototext.Unmarshal([]byte(test.protoStr), filterProto); err != nil { t.Errorf("Failed to unmarshal Filter text proto\n%q\nError: %v", test.protoStr, err) continue } @@ -414,16 +410,11 @@ func TestInvalidFilters(t *testing.T) { { `predicates { key: "total" operation: IN }`, }, - // Bad timestamp - { - `predicates { key: "total" operation: LESS_THAN - timestamp_value { seconds: -100000000000 }}`, - }, } for _, test := range tests { filterProto := &apiv2beta1.Filter{} - if err := proto.UnmarshalText(test.protoStr, filterProto); err != nil { + if err := prototext.Unmarshal([]byte(test.protoStr), filterProto); err != nil { t.Errorf("Failed to unmarshal Filter text proto\n%q\nError: %v", test.protoStr, err) continue } @@ -505,7 +496,7 @@ func TestAddToSelectV1(t *testing.T) { for _, test := range tests { filterProto := &apiv1beta1.Filter{} - if err := proto.UnmarshalText(test.protoStr, filterProto); err != nil { + if err := prototext.Unmarshal([]byte(test.protoStr), filterProto); err != nil { t.Errorf("Failed to unmarshal Filter text proto\n%q\nError: %v", test.protoStr, err) continue } @@ -594,7 +585,7 @@ func TestAddToSelect(t *testing.T) { for _, test := range tests { filterProto := &apiv2beta1.Filter{} - if err := proto.UnmarshalText(test.protoStr, filterProto); err != nil { + if err := prototext.Unmarshal([]byte(test.protoStr), filterProto); err != nil { t.Errorf("Failed to unmarshal Filter text proto\n%q\nError: %v", test.protoStr, err) continue } diff --git a/backend/src/apiserver/main.go b/backend/src/apiserver/main.go index e9b07a3664a..4767bf5e9f2 100644 --- a/backend/src/apiserver/main.go +++ b/backend/src/apiserver/main.go @@ -30,7 +30,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/golang/glog" "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" cm "github.com/kubeflow/pipelines/backend/src/apiserver/client_manager" @@ -222,23 +222,27 @@ func startRpcServer(resourceManager *resource.ResourceManager) { } s := grpc.NewServer(grpc.UnaryInterceptor(apiServerInterceptor), grpc.MaxRecvMsgSize(math.MaxInt32)) - sharedExperimentServer := server.NewExperimentServer(resourceManager, &server.ExperimentServerOptions{CollectMetrics: *collectMetricsFlag}) - sharedPipelineServer := server.NewPipelineServer( - resourceManager, - &server.PipelineServerOptions{ - CollectMetrics: *collectMetricsFlag, - }, - ) - sharedJobServer := server.NewJobServer(resourceManager, &server.JobServerOptions{CollectMetrics: *collectMetricsFlag}) - sharedRunServer := server.NewRunServer(resourceManager, &server.RunServerOptions{CollectMetrics: *collectMetricsFlag}) - sharedReportServer := server.NewReportServer(resourceManager) - - apiv1beta1.RegisterExperimentServiceServer(s, sharedExperimentServer) - apiv1beta1.RegisterPipelineServiceServer(s, sharedPipelineServer) - apiv1beta1.RegisterJobServiceServer(s, sharedJobServer) - apiv1beta1.RegisterRunServiceServer(s, sharedRunServer) + ExperimentServerV1 := server.NewExperimentServerV1(resourceManager, &server.ExperimentServerOptions{CollectMetrics: *collectMetricsFlag}) + ExperimentServer := server.NewExperimentServer(resourceManager, &server.ExperimentServerOptions{CollectMetrics: *collectMetricsFlag}) + + PipelineServerV1 := server.NewPipelineServerV1(resourceManager, &server.PipelineServerOptions{CollectMetrics: *collectMetricsFlag}) + PipelineServer := server.NewPipelineServer(resourceManager, &server.PipelineServerOptions{CollectMetrics: *collectMetricsFlag}) + + RunServerV1 := server.NewRunServerV1(resourceManager, &server.RunServerOptions{CollectMetrics: *collectMetricsFlag}) + RunServer := server.NewRunServer(resourceManager, &server.RunServerOptions{CollectMetrics: *collectMetricsFlag}) + + JobServerV1 := server.NewJobServerV1(resourceManager, &server.JobServerOptions{CollectMetrics: *collectMetricsFlag}) + JobServer := server.NewJobServer(resourceManager, &server.JobServerOptions{CollectMetrics: *collectMetricsFlag}) + + ReportServerV1 := server.NewReportServerV1(resourceManager) + ReportServer := server.NewReportServer(resourceManager) + + apiv1beta1.RegisterExperimentServiceServer(s, ExperimentServerV1) + apiv1beta1.RegisterPipelineServiceServer(s, PipelineServerV1) + apiv1beta1.RegisterJobServiceServer(s, JobServerV1) + apiv1beta1.RegisterRunServiceServer(s, RunServerV1) apiv1beta1.RegisterTaskServiceServer(s, server.NewTaskServer(resourceManager)) - apiv1beta1.RegisterReportServiceServer(s, sharedReportServer) + apiv1beta1.RegisterReportServiceServer(s, ReportServerV1) apiv1beta1.RegisterVisualizationServiceServer( s, @@ -249,11 +253,11 @@ func startRpcServer(resourceManager *resource.ResourceManager) { )) apiv1beta1.RegisterAuthServiceServer(s, server.NewAuthServer(resourceManager)) - apiv2beta1.RegisterExperimentServiceServer(s, sharedExperimentServer) - apiv2beta1.RegisterPipelineServiceServer(s, sharedPipelineServer) - apiv2beta1.RegisterRecurringRunServiceServer(s, sharedJobServer) - apiv2beta1.RegisterRunServiceServer(s, sharedRunServer) - apiv2beta1.RegisterReportServiceServer(s, sharedReportServer) + apiv2beta1.RegisterExperimentServiceServer(s, ExperimentServer) + apiv2beta1.RegisterPipelineServiceServer(s, PipelineServer) + apiv2beta1.RegisterRecurringRunServiceServer(s, JobServer) + apiv2beta1.RegisterRunServiceServer(s, RunServer) + apiv2beta1.RegisterReportServiceServer(s, ReportServer) // Register reflection service on gRPC server. reflection.Register(s) diff --git a/backend/src/apiserver/server/api_converter.go b/backend/src/apiserver/server/api_converter.go index 9607bfe0ba7..3447a387bd6 100644 --- a/backend/src/apiserver/server/api_converter.go +++ b/backend/src/apiserver/server/api_converter.go @@ -19,8 +19,8 @@ import ( "fmt" "sort" "strconv" + "time" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" @@ -90,7 +90,7 @@ func toApiExperimentV1(experiment *model.Experiment) *apiv1beta1.Experiment { Id: experiment.UUID, Name: experiment.Name, Description: experiment.Description, - CreatedAt: ×tamp.Timestamp{Seconds: experiment.CreatedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(experiment.CreatedAtInSec, 0)), ResourceReferences: resourceReferences, StorageState: storageState, } @@ -116,8 +116,8 @@ func toApiExperiment(experiment *model.Experiment) *apiv2beta1.Experiment { ExperimentId: experiment.UUID, DisplayName: experiment.Name, Description: experiment.Description, - CreatedAt: ×tamp.Timestamp{Seconds: experiment.CreatedAtInSec}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: experiment.LastRunCreatedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(experiment.CreatedAtInSec, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(experiment.LastRunCreatedAtInSec, 0)), Namespace: experiment.Namespace, StorageState: storageState, } @@ -221,7 +221,7 @@ func toApiPipelineV1(pipeline *model.Pipeline, pipelineVersion *model.PipelineVe } apiPipeline := &apiv1beta1.Pipeline{ Id: pipeline.UUID, - CreatedAt: ×tamp.Timestamp{Seconds: pipeline.CreatedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(pipeline.CreatedAtInSec, 0)), Name: pipeline.Name, Description: pipeline.Description, Parameters: params, @@ -294,7 +294,7 @@ func toApiPipeline(pipeline *model.Pipeline) *apiv2beta1.Pipeline { Name: pipeline.Name, DisplayName: pipeline.DisplayName, Description: pipeline.Description, - CreatedAt: ×tamp.Timestamp{Seconds: pipeline.CreatedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(pipeline.CreatedAtInSec, 0)), Namespace: pipeline.Namespace, } } @@ -384,7 +384,7 @@ func toApiPipelineVersionV1(pv *model.PipelineVersion) *apiv1beta1.PipelineVersi } apiPipelineVersion.Id = pv.UUID apiPipelineVersion.Name = pv.Name - apiPipelineVersion.CreatedAt = ×tamp.Timestamp{Seconds: pv.CreatedAtInSec} + apiPipelineVersion.CreatedAt = timestamppb.New(time.Unix(pv.CreatedAtInSec, 0)) if p := toApiParametersV1(pv.Parameters); p == nil { return nil } else if len(p) > 0 { @@ -455,7 +455,7 @@ func toApiPipelineVersion(pv *model.PipelineVersion) *apiv2beta1.PipelineVersion Name: pv.Name, DisplayName: pv.DisplayName, Description: pv.Description, - CreatedAt: ×tamp.Timestamp{Seconds: pv.CreatedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(pv.CreatedAtInSec, 0)), } // Infer pipeline url @@ -772,14 +772,10 @@ func toApiTriggerV1(trigger *model.Trigger) *apiv1beta1.Trigger { var cronSchedule apiv1beta1.CronSchedule cronSchedule.Cron = *trigger.Cron if trigger.CronScheduleStartTimeInSec != nil { - cronSchedule.StartTime = ×tamp.Timestamp{ - Seconds: *trigger.CronScheduleStartTimeInSec, - } - } + cronSchedule.StartTime = timestamppb.New(time.Unix(*trigger.CronScheduleStartTimeInSec, 0)) + } // timestamppb.New(time.Unix(trigger.CronScheduleStartTimeInSec, 0)) if trigger.CronScheduleEndTimeInSec != nil { - cronSchedule.EndTime = ×tamp.Timestamp{ - Seconds: *trigger.CronScheduleEndTimeInSec, - } + cronSchedule.EndTime = timestamppb.New(time.Unix(*trigger.CronScheduleEndTimeInSec, 0)) } return &apiv1beta1.Trigger{Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &cronSchedule}} } @@ -787,14 +783,10 @@ func toApiTriggerV1(trigger *model.Trigger) *apiv1beta1.Trigger { var periodicSchedule apiv1beta1.PeriodicSchedule periodicSchedule.IntervalSecond = *trigger.IntervalSecond if trigger.PeriodicScheduleStartTimeInSec != nil { - periodicSchedule.StartTime = ×tamp.Timestamp{ - Seconds: *trigger.PeriodicScheduleStartTimeInSec, - } + periodicSchedule.StartTime = timestamppb.New(time.Unix(*trigger.PeriodicScheduleStartTimeInSec, 0)) } if trigger.PeriodicScheduleEndTimeInSec != nil { - periodicSchedule.EndTime = ×tamp.Timestamp{ - Seconds: *trigger.PeriodicScheduleEndTimeInSec, - } + periodicSchedule.EndTime = timestamppb.New(time.Unix(*trigger.PeriodicScheduleEndTimeInSec, 0)) } return &apiv1beta1.Trigger{Trigger: &apiv1beta1.Trigger_PeriodicSchedule{PeriodicSchedule: &periodicSchedule}} } @@ -815,14 +807,10 @@ func toApiTrigger(trigger *model.Trigger) *apiv2beta1.Trigger { var cronSchedule apiv2beta1.CronSchedule cronSchedule.Cron = *trigger.Cron if trigger.CronScheduleStartTimeInSec != nil { - cronSchedule.StartTime = ×tamp.Timestamp{ - Seconds: *trigger.CronScheduleStartTimeInSec, - } + cronSchedule.StartTime = timestamppb.New(time.Unix(*trigger.CronScheduleStartTimeInSec, 0)) } if trigger.CronScheduleEndTimeInSec != nil { - cronSchedule.EndTime = ×tamp.Timestamp{ - Seconds: *trigger.CronScheduleEndTimeInSec, - } + cronSchedule.EndTime = timestamppb.New(time.Unix(*trigger.CronScheduleEndTimeInSec, 0)) } return &apiv2beta1.Trigger{Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &cronSchedule}} } @@ -830,14 +818,10 @@ func toApiTrigger(trigger *model.Trigger) *apiv2beta1.Trigger { var periodicSchedule apiv2beta1.PeriodicSchedule periodicSchedule.IntervalSecond = *trigger.IntervalSecond if trigger.PeriodicScheduleStartTimeInSec != nil { - periodicSchedule.StartTime = ×tamp.Timestamp{ - Seconds: *trigger.PeriodicScheduleStartTimeInSec, - } + periodicSchedule.StartTime = timestamppb.New(time.Unix(*trigger.PeriodicScheduleStartTimeInSec, 0)) } if trigger.PeriodicScheduleEndTimeInSec != nil { - periodicSchedule.EndTime = ×tamp.Timestamp{ - Seconds: *trigger.PeriodicScheduleEndTimeInSec, - } + periodicSchedule.EndTime = timestamppb.New(time.Unix(*trigger.PeriodicScheduleEndTimeInSec, 0)) } return &apiv2beta1.Trigger{Trigger: &apiv2beta1.Trigger_PeriodicSchedule{PeriodicSchedule: &periodicSchedule}} } @@ -1446,15 +1430,15 @@ func toApiRunV1(r *model.Run) *apiv1beta1.Run { specManifest := r.PipelineSpec.PipelineSpecManifest wfManifest := r.PipelineSpec.WorkflowSpecManifest return &apiv1beta1.Run{ - CreatedAt: ×tamp.Timestamp{Seconds: r.RunDetails.CreatedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(r.RunDetails.CreatedAtInSec, 0)), Id: r.UUID, Metrics: metrics, Name: r.DisplayName, ServiceAccount: r.ServiceAccount, StorageState: apiv1beta1.Run_StorageState(apiv1beta1.Run_StorageState_value[string(r.StorageState.ToV1())]), Description: r.Description, - ScheduledAt: ×tamp.Timestamp{Seconds: r.RunDetails.ScheduledAtInSec}, - FinishedAt: ×tamp.Timestamp{Seconds: r.RunDetails.FinishedAtInSec}, + ScheduledAt: timestamppb.New(time.Unix(r.RunDetails.ScheduledAtInSec, 0)), + FinishedAt: timestamppb.New(time.Unix(r.RunDetails.FinishedAtInSec, 0)), Status: string(r.RunDetails.State.ToV1()), PipelineSpec: &apiv1beta1.PipelineSpec{ PipelineId: r.PipelineSpec.PipelineId, @@ -1507,9 +1491,9 @@ func toApiRun(r *model.Run) *apiv2beta1.Run { StorageState: toApiRunStorageState(&r.StorageState), State: toApiRuntimeState(&r.RunDetails.State), StateHistory: toApiRuntimeStatuses(r.RunDetails.StateHistory), - CreatedAt: ×tamp.Timestamp{Seconds: r.RunDetails.CreatedAtInSec}, - ScheduledAt: ×tamp.Timestamp{Seconds: r.RunDetails.ScheduledAtInSec}, - FinishedAt: ×tamp.Timestamp{Seconds: r.RunDetails.FinishedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(r.RunDetails.CreatedAtInSec, 0)), + ScheduledAt: timestamppb.New(time.Unix(r.RunDetails.ScheduledAtInSec, 0)), + FinishedAt: timestamppb.New(time.Unix(r.RunDetails.FinishedAtInSec, 0)), RunDetails: apiRd, } err := util.NewInvalidInputError("Failed to parse the pipeline source") @@ -1741,8 +1725,8 @@ func toApiTaskV1(task *model.Task) *apiv1beta1.Task { PipelineName: task.PipelineName, RunId: task.RunId, MlmdExecutionID: task.MLMDExecutionID, - CreatedAt: ×tamp.Timestamp{Seconds: task.CreatedTimestamp}, - FinishedAt: ×tamp.Timestamp{Seconds: task.FinishedTimestamp}, + CreatedAt: timestamppb.New(time.Unix(task.CreatedTimestamp, 0)), + FinishedAt: timestamppb.New(time.Unix(task.FinishedTimestamp, 0)), Fingerprint: task.Fingerprint, } } @@ -1787,9 +1771,9 @@ func toApiPipelineTaskDetail(t *model.Task) *apiv2beta1.PipelineTaskDetail { RunId: t.RunId, TaskId: t.UUID, DisplayName: t.Name, - CreateTime: ×tamp.Timestamp{Seconds: t.CreatedTimestamp}, - StartTime: ×tamp.Timestamp{Seconds: t.StartedTimestamp}, - EndTime: ×tamp.Timestamp{Seconds: t.FinishedTimestamp}, + CreateTime: timestamppb.New(time.Unix(t.CreatedTimestamp, 0)), + StartTime: timestamppb.New(time.Unix(t.StartedTimestamp, 0)), + EndTime: timestamppb.New(time.Unix(t.FinishedTimestamp, 0)), State: apiv2beta1.RuntimeState(apiv2beta1.RuntimeState_value[t.State.ToString()]), ExecutionId: execId, Inputs: inputArtifacts, @@ -2171,9 +2155,9 @@ func toApiJobV1(j *model.Job) *apiv1beta1.Job { ServiceAccount: j.ServiceAccount, Description: j.Description, Enabled: j.Enabled, - CreatedAt: ×tamp.Timestamp{Seconds: j.CreatedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(j.CreatedAtInSec, 0)), Status: toApiJobStatus(j.Conditions), - UpdatedAt: ×tamp.Timestamp{Seconds: j.UpdatedAtInSec}, + UpdatedAt: timestamppb.New(time.Unix(j.UpdatedAtInSec, 0)), MaxConcurrency: j.MaxConcurrency, NoCatchup: j.NoCatchup, Trigger: trigger, @@ -2214,8 +2198,8 @@ func toApiRecurringRun(j *model.Job) *apiv2beta1.RecurringRun { ServiceAccount: j.ServiceAccount, Description: j.Description, Status: toApiRecurringRunStatus(j.Conditions), - CreatedAt: ×tamp.Timestamp{Seconds: j.CreatedAtInSec}, - UpdatedAt: ×tamp.Timestamp{Seconds: j.UpdatedAtInSec}, + CreatedAt: timestamppb.New(time.Unix(j.CreatedAtInSec, 0)), + UpdatedAt: timestamppb.New(time.Unix(j.UpdatedAtInSec, 0)), MaxConcurrency: j.MaxConcurrency, NoCatchup: j.NoCatchup, Trigger: toApiTrigger(&j.Trigger), diff --git a/backend/src/apiserver/server/api_converter_test.go b/backend/src/apiserver/server/api_converter_test.go index 312f4ceebac..0f9c7e004c6 100644 --- a/backend/src/apiserver/server/api_converter_test.go +++ b/backend/src/apiserver/server/api_converter_test.go @@ -17,9 +17,9 @@ package server import ( "strings" "testing" + "time" "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/google/go-cmp/cmp" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" @@ -489,7 +489,7 @@ func TestToModelJob(t *testing.T) { NoCatchup: true, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -530,7 +530,7 @@ func TestToModelJob(t *testing.T) { NoCatchup: true, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -800,11 +800,11 @@ func TestToApiPipelineV1(t *testing.T) { apiPipeline := toApiPipelineV1(modelPipeline, modelVersion) expectedApiPipeline := &apiv1beta1.Pipeline{ Id: "pipeline1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), Url: &apiv1beta1.Url{PipelineUrl: "http://repo/22222"}, DefaultVersion: &apiv1beta1.PipelineVersion{ Id: "pipelineversion1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), Description: "desc1", CodeSourceUrl: "http://repo/22222", PackageUrl: &apiv1beta1.Url{PipelineUrl: "http://repo/22222"}, @@ -872,11 +872,11 @@ func TestToApiPipelinesV1(t *testing.T) { expectedPipelines := []*apiv1beta1.Pipeline{ { Id: "pipeline1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), Url: &apiv1beta1.Url{PipelineUrl: "http://repo/22222"}, DefaultVersion: &apiv1beta1.PipelineVersion{ Id: "pipelineversion1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), Description: "desc1", CodeSourceUrl: "http://repo/22222", PackageUrl: &apiv1beta1.Url{PipelineUrl: "http://repo/22222"}, @@ -1172,9 +1172,9 @@ func TestToApiRunDetailV1_RuntimeParams(t *testing.T) { Id: "run123", Name: "displayName123", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - ScheduledAt: ×tamp.Timestamp{Seconds: 1}, - FinishedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + ScheduledAt: timestamppb.New(time.Unix(1, 0)), + FinishedAt: timestamppb.New(time.Unix(1, 0)), Status: "Running", PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: "manifest", @@ -1235,9 +1235,9 @@ func TestToApiRunDetailV1_V1Params(t *testing.T) { Id: "run123", Name: "displayName123", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - ScheduledAt: ×tamp.Timestamp{Seconds: 1}, - FinishedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + ScheduledAt: timestamppb.New(time.Unix(1, 0)), + FinishedAt: timestamppb.New(time.Unix(1, 0)), Status: "Running", PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: "manifest", @@ -1326,9 +1326,9 @@ func TestToApiRunsV1(t *testing.T) { Id: "run1", Name: "displayName1", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - ScheduledAt: ×tamp.Timestamp{Seconds: 1}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + ScheduledAt: timestamppb.New(time.Unix(1, 0)), + FinishedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, Status: "Running", PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: "manifest", @@ -1349,9 +1349,9 @@ func TestToApiRunsV1(t *testing.T) { Id: "run2", Name: "displayName2", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: ×tamppb.Timestamp{Seconds: 0, Nanos: 0}, Status: "Succeeded", ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -1390,8 +1390,8 @@ func TestToApiTask(t *testing.T) { PipelineName: "pipeline/my-pipeline", RunId: NonDefaultFakeUUID, MlmdExecutionID: "1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - FinishedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + FinishedAt: timestamppb.New(time.Unix(2, 0)), Fingerprint: "123", } @@ -1428,8 +1428,8 @@ func TestToApiTasks(t *testing.T) { PipelineName: "namespace/ns1/pipeline/my-pipeline-1", RunId: "123e4567-e89b-12d3-a456-426655440001", MlmdExecutionID: "1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - FinishedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + FinishedAt: timestamppb.New(time.Unix(2, 0)), Fingerprint: "123", }, { @@ -1438,8 +1438,8 @@ func TestToApiTasks(t *testing.T) { PipelineName: "namespace/ns1/pipeline/my-pipeline-2", RunId: "123e4567-e89b-12d3-a456-426655440003", MlmdExecutionID: "2", - CreatedAt: ×tamp.Timestamp{Seconds: 3}, - FinishedAt: ×tamp.Timestamp{Seconds: 4}, + CreatedAt: ×tamppb.Timestamp{Seconds: 3, Nanos: 0}, + FinishedAt: ×tamppb.Timestamp{Seconds: 4, Nanos: 0}, Fingerprint: "124", }, } @@ -1478,12 +1478,12 @@ func TestCronScheduledJobtoApiJob(t *testing.T) { Id: "job1", Name: "name 1", Enabled: true, - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - UpdatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + UpdatedAt: timestamppb.New(time.Unix(1, 0)), MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * *", }}, }, @@ -1533,12 +1533,12 @@ func TestPeriodicScheduledJobtoApiJob(t *testing.T) { Id: "job1", Name: "name 1", Enabled: true, - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - UpdatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + UpdatedAt: timestamppb.New(time.Unix(1, 0)), MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_PeriodicSchedule{PeriodicSchedule: &apiv1beta1.PeriodicSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), IntervalSecond: 3, }}, }, @@ -1578,8 +1578,8 @@ func TestNonScheduledJobtoApiJob(t *testing.T) { Id: "job1", Name: "name1", Enabled: true, - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - UpdatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + UpdatedAt: timestamppb.New(time.Unix(1, 0)), MaxConcurrency: 1, PipelineSpec: &apiv1beta1.PipelineSpec{ Parameters: []*apiv1beta1.Parameter{{Name: "param2", Value: "world"}}, @@ -1667,8 +1667,8 @@ func TestToApiJob_V2(t *testing.T) { Id: "job1", Name: "name 1", Enabled: true, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), MaxConcurrency: 2, NoCatchup: true, Status: "STATUS_UNSPECIFIED", @@ -1680,7 +1680,7 @@ func TestToApiJob_V2(t *testing.T) { }, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 2}, + StartTime: timestamppb.New(time.Unix(2, 0)), Cron: "2 * *", }}, }, @@ -1751,13 +1751,13 @@ func TestToApiJobs(t *testing.T) { Id: "job1", Name: "name 1", Enabled: true, - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - UpdatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + UpdatedAt: timestamppb.New(time.Unix(1, 0)), MaxConcurrency: 1, Status: "STATUS_UNSPECIFIED", Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * *", }}, }, @@ -1777,14 +1777,14 @@ func TestToApiJobs(t *testing.T) { Id: "job2", Name: "name 2", Enabled: true, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), MaxConcurrency: 2, NoCatchup: true, Status: "STATUS_UNSPECIFIED", Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 2}, + StartTime: timestamppb.New(time.Unix(2, 0)), Cron: "2 * *", }}, }, @@ -1927,7 +1927,7 @@ func TestToApiExperimentsV1(t *testing.T) { Id: "exp1", Name: "experiment1", Description: "experiment1 was created using V2 APIV1BETA1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), StorageState: apiv1beta1.Experiment_StorageState(apiv1beta1.Experiment_StorageState_value["STORAGESTATE_AVAILABLE"]), ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -1940,7 +1940,7 @@ func TestToApiExperimentsV1(t *testing.T) { Id: "exp2", Name: "experiment2", Description: "experiment2 was created using V2 APIV1BETA1", - CreatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), StorageState: apiv1beta1.Experiment_StorageState(apiv1beta1.Experiment_StorageState_value["STORAGESTATE_ARCHIVED"]), ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -1953,7 +1953,7 @@ func TestToApiExperimentsV1(t *testing.T) { Id: "exp3", Name: "experiment3", Description: "experiment3 was created using V1 APIV1BETA1", - CreatedAt: ×tamp.Timestamp{Seconds: 3}, + CreatedAt: ×tamppb.Timestamp{Seconds: 3, Nanos: 0}, StorageState: apiv1beta1.Experiment_StorageState(apiv1beta1.Experiment_StorageState_value["STORAGESTATE_AVAILABLE"]), ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -1966,7 +1966,7 @@ func TestToApiExperimentsV1(t *testing.T) { Id: "exp4", Name: "experiment4", Description: "experiment4 was created using V1 APIV1BETA1", - CreatedAt: ×tamp.Timestamp{Seconds: 4}, + CreatedAt: ×tamppb.Timestamp{Seconds: 4, Nanos: 0}, StorageState: apiv1beta1.Experiment_StorageState(apiv1beta1.Experiment_StorageState_value["STORAGESTATE_ARCHIVED"]), ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -1980,7 +1980,7 @@ func TestToApiExperimentsV1(t *testing.T) { Id: "exp5", Name: "experiment5", Description: "experiment5 was created using V2 APIV1BETA1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), StorageState: apiv1beta1.Experiment_StorageState(apiv1beta1.Experiment_StorageState_value["STORAGESTATE_UNSPECIFIED"]), ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -2040,32 +2040,32 @@ func TestToApiExperiments(t *testing.T) { ExperimentId: "exp1", DisplayName: "experiment1", Description: "My name is experiment1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(1, 0)), StorageState: apiv2beta1.Experiment_StorageState(apiv2beta1.Experiment_StorageState_value["AVAILABLE"]), }, { ExperimentId: "exp2", DisplayName: "experiment2", Description: "My name is experiment2", - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(2, 0)), StorageState: apiv2beta1.Experiment_StorageState(apiv2beta1.Experiment_StorageState_value["ARCHIVED"]), }, { ExperimentId: "exp3", DisplayName: "experiment3", Description: "experiment3 was created using V1 APIV1BETA1", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(1, 0)), StorageState: apiv2beta1.Experiment_StorageState(apiv2beta1.Experiment_StorageState_value["AVAILABLE"]), }, { ExperimentId: "exp4", DisplayName: "experiment4", Description: "experiment4 was created using V1 APIV1BETA1", - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(2, 0)), StorageState: apiv2beta1.Experiment_StorageState(apiv2beta1.Experiment_StorageState_value["ARCHIVED"]), }, {}, @@ -2073,8 +2073,8 @@ func TestToApiExperiments(t *testing.T) { ExperimentId: "exp5", DisplayName: "experiment5", Description: "My name is experiment5", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(1, 0)), StorageState: apiv2beta1.Experiment_StorageState(apiv2beta1.Experiment_StorageState_value["STORAGE_STATE_UNSPECIFIED"]), }, } @@ -2181,8 +2181,8 @@ func TestToApiRecurringRun(t *testing.T) { RecurringRunId: "job1", DisplayName: "name 1", Mode: apiv2beta1.RecurringRun_ENABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), MaxConcurrency: 2, NoCatchup: true, PipelineSource: &apiv2beta1.RecurringRun_PipelineVersionReference{ @@ -2192,7 +2192,7 @@ func TestToApiRecurringRun(t *testing.T) { }, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 2}, + StartTime: timestamppb.New(time.Unix(2, 0)), Cron: "2 * *", }}, }, @@ -2233,13 +2233,13 @@ func TestToApiRecurringRun(t *testing.T) { RecurringRunId: "job1", DisplayName: "name 1", Mode: apiv2beta1.RecurringRun_DISABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), MaxConcurrency: 2, NoCatchup: true, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 2}, + StartTime: timestamppb.New(time.Unix(2, 0)), Cron: "2 * *", }}, }, @@ -3708,9 +3708,9 @@ func TestToModelRun(t *testing.T) { RunId: "run1", TaskId: "task1", DisplayName: "this is task", - CreateTime: ×tamp.Timestamp{Seconds: 11}, - StartTime: ×tamp.Timestamp{Seconds: 12}, - EndTime: ×tamp.Timestamp{Seconds: 13}, + CreateTime: timestamppb.New(time.Unix(11, 0)), + StartTime: timestamppb.New(time.Unix(12, 0)), + EndTime: timestamppb.New(time.Unix(13, 0)), ExecutorDetail: nil, State: apiv2beta1.RuntimeState_FAILED, ExecutionId: 14, @@ -3737,9 +3737,9 @@ func TestToModelRun(t *testing.T) { RunId: "run1", TaskId: "task2", DisplayName: "this is task 2", - CreateTime: ×tamp.Timestamp{Seconds: 11}, - StartTime: ×tamp.Timestamp{Seconds: 12}, - EndTime: ×tamp.Timestamp{Seconds: 13}, + CreateTime: timestamppb.New(time.Unix(11, 0)), + StartTime: timestamppb.New(time.Unix(12, 0)), + EndTime: timestamppb.New(time.Unix(13, 0)), ExecutorDetail: nil, State: apiv2beta1.RuntimeState_CANCELED, ExecutionId: 14, @@ -3904,9 +3904,9 @@ func TestToModelRun(t *testing.T) { RunId: "run2", TaskId: "task1", DisplayName: "this is task", - CreateTime: ×tamp.Timestamp{Seconds: 11}, - StartTime: ×tamp.Timestamp{Seconds: 12}, - EndTime: ×tamp.Timestamp{Seconds: 13}, + CreateTime: timestamppb.New(time.Unix(11, 0)), + StartTime: timestamppb.New(time.Unix(12, 0)), + EndTime: timestamppb.New(time.Unix(13, 0)), ExecutorDetail: nil, State: apiv2beta1.RuntimeState_RUNNING, ExecutionId: 14, @@ -4246,9 +4246,9 @@ func Test_toApiRun(t *testing.T) { RunId: "run2", TaskId: "task1", DisplayName: "this is task", - CreateTime: ×tamp.Timestamp{Seconds: 11}, - StartTime: ×tamp.Timestamp{Seconds: 12}, - EndTime: ×tamp.Timestamp{Seconds: 13}, + CreateTime: timestamppb.New(time.Unix(11, 0)), + StartTime: timestamppb.New(time.Unix(12, 0)), + EndTime: timestamppb.New(time.Unix(13, 0)), ExecutorDetail: nil, State: apiv2beta1.RuntimeState_FAILED, ExecutionId: 14, diff --git a/backend/src/apiserver/server/auth_server.go b/backend/src/apiserver/server/auth_server.go index ae3216c4e8c..cc124053009 100644 --- a/backend/src/apiserver/server/auth_server.go +++ b/backend/src/apiserver/server/auth_server.go @@ -18,11 +18,13 @@ import ( "context" "strings" - "github.com/golang/protobuf/ptypes/empty" + apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" + api "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" "github.com/kubeflow/pipelines/backend/src/apiserver/resource" "github.com/kubeflow/pipelines/backend/src/common/util" + "google.golang.org/protobuf/types/known/emptypb" authorizationv1 "k8s.io/api/authorization/v1" ) @@ -37,10 +39,11 @@ var rbacResourceTypeToGroup = map[string]string{ type AuthServer struct { resourceManager *resource.ResourceManager + apiv1beta1.UnimplementedAuthServiceServer } func (s *AuthServer) AuthorizeV1(ctx context.Context, request *api.AuthorizeRequest) ( - *empty.Empty, error, + *emptypb.Empty, error, ) { err := ValidateAuthorizeRequest(request) if err != nil { @@ -64,7 +67,7 @@ func (s *AuthServer) AuthorizeV1(ctx context.Context, request *api.AuthorizeRequ return nil, util.Wrap(err, "Failed to authorize the request") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } func ValidateAuthorizeRequest(request *api.AuthorizeRequest) error { diff --git a/backend/src/apiserver/server/experiment_server.go b/backend/src/apiserver/server/experiment_server.go index cab20cf05fd..830fa6efdff 100644 --- a/backend/src/apiserver/server/experiment_server.go +++ b/backend/src/apiserver/server/experiment_server.go @@ -17,7 +17,8 @@ package server import ( "context" - "github.com/golang/protobuf/ptypes/empty" + "google.golang.org/protobuf/types/known/emptypb" + apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" @@ -76,12 +77,25 @@ type ExperimentServerOptions struct { CollectMetrics bool } -type ExperimentServer struct { +// BaseExperimentServer wraps ExperimentServer and ExperimentServerV1 +// to enable method sharing. It can be removed once ExperimentServerV1 +// is removed. +type BaseExperimentServer struct { resourceManager *resource.ResourceManager options *ExperimentServerOptions } -func (s *ExperimentServer) createExperiment(ctx context.Context, experiment *model.Experiment) (*model.Experiment, error) { +type ExperimentServer struct { + *BaseExperimentServer + apiv2beta1.UnimplementedExperimentServiceServer +} + +type ExperimentServerV1 struct { + *BaseExperimentServer + apiv1beta1.UnimplementedExperimentServiceServer +} + +func (s *BaseExperimentServer) createExperiment(ctx context.Context, experiment *model.Experiment) (*model.Experiment, error) { experiment.Namespace = s.resourceManager.ReplaceNamespace(experiment.Namespace) resourceAttributes := &authorizationv1.ResourceAttributes{ Namespace: experiment.Namespace, @@ -95,7 +109,7 @@ func (s *ExperimentServer) createExperiment(ctx context.Context, experiment *mod return s.resourceManager.CreateExperiment(experiment) } -func (s *ExperimentServer) CreateExperimentV1(ctx context.Context, request *apiv1beta1.CreateExperimentRequest) ( +func (s *ExperimentServerV1) CreateExperimentV1(ctx context.Context, request *apiv1beta1.CreateExperimentRequest) ( *apiv1beta1.Experiment, error, ) { if s.options.CollectMetrics { @@ -151,7 +165,7 @@ func (s *ExperimentServer) CreateExperiment(ctx context.Context, request *apiv2b return apiExperiment, nil } -func (s *ExperimentServer) getExperiment(ctx context.Context, experimentId string) (*model.Experiment, error) { +func (s *BaseExperimentServer) getExperiment(ctx context.Context, experimentId string) (*model.Experiment, error) { err := s.canAccessExperiment(ctx, experimentId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbGet}) if err != nil { return nil, util.Wrap(err, "Failed to authorize the request") @@ -159,7 +173,7 @@ func (s *ExperimentServer) getExperiment(ctx context.Context, experimentId strin return s.resourceManager.GetExperiment(experimentId) } -func (s *ExperimentServer) GetExperimentV1(ctx context.Context, request *apiv1beta1.GetExperimentRequest) ( +func (s *ExperimentServerV1) GetExperimentV1(ctx context.Context, request *apiv1beta1.GetExperimentRequest) ( *apiv1beta1.Experiment, error, ) { if s.options.CollectMetrics { @@ -197,7 +211,7 @@ func (s *ExperimentServer) GetExperiment(ctx context.Context, request *apiv2beta return apiExperiment, nil } -func (s *ExperimentServer) listExperiments(ctx context.Context, pageToken string, pageSize int32, sortBy string, opts *list.Options, namespace string) ([]*model.Experiment, int32, string, error) { +func (s *BaseExperimentServer) listExperiments(ctx context.Context, pageToken string, pageSize int32, sortBy string, opts *list.Options, namespace string) ([]*model.Experiment, int32, string, error) { namespace = s.resourceManager.ReplaceNamespace(namespace) resourceAttributes := &authorizationv1.ResourceAttributes{ Namespace: namespace, @@ -218,7 +232,7 @@ func (s *ExperimentServer) listExperiments(ctx context.Context, pageToken string return experiments, int32(totalSize), nextPageToken, nil } -func (s *ExperimentServer) ListExperimentsV1(ctx context.Context, request *apiv1beta1.ListExperimentsRequest) ( +func (s *ExperimentServerV1) ListExperimentsV1(ctx context.Context, request *apiv1beta1.ListExperimentsRequest) ( *apiv1beta1.ListExperimentsResponse, error, ) { if s.options.CollectMetrics { @@ -284,7 +298,7 @@ func (s *ExperimentServer) ListExperiments(ctx context.Context, request *apiv2be }, nil } -func (s *ExperimentServer) deleteExperiment(ctx context.Context, experimentId string) error { +func (s *BaseExperimentServer) deleteExperiment(ctx context.Context, experimentId string) error { err := s.canAccessExperiment(ctx, experimentId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbDelete}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -292,7 +306,7 @@ func (s *ExperimentServer) deleteExperiment(ctx context.Context, experimentId st return s.resourceManager.DeleteExperiment(experimentId) } -func (s *ExperimentServer) DeleteExperimentV1(ctx context.Context, request *apiv1beta1.DeleteExperimentRequest) (*empty.Empty, error) { +func (s *ExperimentServerV1) DeleteExperimentV1(ctx context.Context, request *apiv1beta1.DeleteExperimentRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deleteExperimentRequests.Inc() } @@ -304,10 +318,10 @@ func (s *ExperimentServer) DeleteExperimentV1(ctx context.Context, request *apiv if s.options.CollectMetrics { experimentCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *ExperimentServer) DeleteExperiment(ctx context.Context, request *apiv2beta1.DeleteExperimentRequest) (*empty.Empty, error) { +func (s *ExperimentServer) DeleteExperiment(ctx context.Context, request *apiv2beta1.DeleteExperimentRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deleteExperimentRequests.Inc() } @@ -319,11 +333,11 @@ func (s *ExperimentServer) DeleteExperiment(ctx context.Context, request *apiv2b if s.options.CollectMetrics { experimentCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // TODO(chensun): consider refactoring the code to get rid of double-query of experiment. -func (s *ExperimentServer) canAccessExperiment(ctx context.Context, experimentID string, resourceAttributes *authorizationv1.ResourceAttributes) error { +func (s *BaseExperimentServer) canAccessExperiment(ctx context.Context, experimentID string, resourceAttributes *authorizationv1.ResourceAttributes) error { if !common.IsMultiUserMode() { // Skip authorization if not multi-user mode. return nil @@ -352,7 +366,7 @@ func (s *ExperimentServer) canAccessExperiment(ctx context.Context, experimentID return nil } -func (s *ExperimentServer) archiveExperiment(ctx context.Context, experimentId string) error { +func (s *BaseExperimentServer) archiveExperiment(ctx context.Context, experimentId string) error { err := s.canAccessExperiment(ctx, experimentId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbArchive}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -360,17 +374,17 @@ func (s *ExperimentServer) archiveExperiment(ctx context.Context, experimentId s return s.resourceManager.ArchiveExperiment(ctx, experimentId) } -func (s *ExperimentServer) ArchiveExperimentV1(ctx context.Context, request *apiv1beta1.ArchiveExperimentRequest) (*empty.Empty, error) { +func (s *ExperimentServerV1) ArchiveExperimentV1(ctx context.Context, request *apiv1beta1.ArchiveExperimentRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { archiveExperimentRequests.Inc() } if err := s.archiveExperiment(ctx, request.GetId()); err != nil { return nil, util.Wrap(err, "Failed to archive v1beta1 experiment") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *ExperimentServer) ArchiveExperiment(ctx context.Context, request *apiv2beta1.ArchiveExperimentRequest) (*empty.Empty, error) { +func (s *ExperimentServer) ArchiveExperiment(ctx context.Context, request *apiv2beta1.ArchiveExperimentRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { archiveExperimentRequests.Inc() } @@ -378,10 +392,10 @@ func (s *ExperimentServer) ArchiveExperiment(ctx context.Context, request *apiv2 if err := s.archiveExperiment(ctx, request.GetExperimentId()); err != nil { return nil, util.Wrap(err, "Failed to archive experiment") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *ExperimentServer) unarchiveExperiment(ctx context.Context, experimentId string) error { +func (s *BaseExperimentServer) unarchiveExperiment(ctx context.Context, experimentId string) error { err := s.canAccessExperiment(ctx, experimentId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbUnarchive}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -389,7 +403,7 @@ func (s *ExperimentServer) unarchiveExperiment(ctx context.Context, experimentId return s.resourceManager.UnarchiveExperiment(experimentId) } -func (s *ExperimentServer) UnarchiveExperimentV1(ctx context.Context, request *apiv1beta1.UnarchiveExperimentRequest) (*empty.Empty, error) { +func (s *ExperimentServerV1) UnarchiveExperimentV1(ctx context.Context, request *apiv1beta1.UnarchiveExperimentRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { unarchiveExperimentRequests.Inc() } @@ -397,10 +411,10 @@ func (s *ExperimentServer) UnarchiveExperimentV1(ctx context.Context, request *a if err := s.unarchiveExperiment(ctx, request.GetId()); err != nil { return nil, util.Wrap(err, "Failed to unarchive v1beta1 experiment") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *ExperimentServer) UnarchiveExperiment(ctx context.Context, request *apiv2beta1.UnarchiveExperimentRequest) (*empty.Empty, error) { +func (s *ExperimentServer) UnarchiveExperiment(ctx context.Context, request *apiv2beta1.UnarchiveExperimentRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { unarchiveExperimentRequests.Inc() } @@ -408,9 +422,23 @@ func (s *ExperimentServer) UnarchiveExperiment(ctx context.Context, request *api if err := s.unarchiveExperiment(ctx, request.GetExperimentId()); err != nil { return nil, util.Wrap(err, "Failed to unarchive experiment") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } func NewExperimentServer(resourceManager *resource.ResourceManager, options *ExperimentServerOptions) *ExperimentServer { - return &ExperimentServer{resourceManager: resourceManager, options: options} + return &ExperimentServer{ + BaseExperimentServer: &BaseExperimentServer{ + resourceManager: resourceManager, + options: options, + }, + } +} + +func NewExperimentServerV1(resourceManager *resource.ResourceManager, options *ExperimentServerOptions) *ExperimentServerV1 { + return &ExperimentServerV1{ + BaseExperimentServer: &BaseExperimentServer{ + resourceManager: resourceManager, + options: options, + }, + } } diff --git a/backend/src/apiserver/server/experiment_server_test.go b/backend/src/apiserver/server/experiment_server_test.go index 35cc305c78d..0161a1773dc 100644 --- a/backend/src/apiserver/server/experiment_server_test.go +++ b/backend/src/apiserver/server/experiment_server_test.go @@ -18,11 +18,13 @@ import ( "context" "strings" "testing" + "time" + + "google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/structpb" "sigs.k8s.io/yaml" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" @@ -36,10 +38,33 @@ import ( "google.golang.org/protobuf/testing/protocmp" ) +func createExperimentServerV1(resourceManager *resource.ResourceManager) *ExperimentServerV1 { + return &ExperimentServerV1{ + BaseExperimentServer: &BaseExperimentServer{ + resourceManager: resourceManager, + options: &ExperimentServerOptions{ + CollectMetrics: false, + }, + }, + } +} + +func createExperimentServer(resourceManager *resource.ResourceManager) *ExperimentServer { + return &ExperimentServer{ + BaseExperimentServer: &BaseExperimentServer{ + resourceManager: resourceManager, + options: &ExperimentServerOptions{ + CollectMetrics: false, + }, + }, + } +} + func TestCreateExperimentV1(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{Name: "ex1", Description: "first experiment"} result, err := server.CreateExperimentV1(nil, &apiv1beta1.CreateExperimentRequest{Experiment: experiment}) @@ -48,7 +73,7 @@ func TestCreateExperimentV1(t *testing.T) { Id: DefaultFakeUUID, Name: "ex1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), StorageState: apiv1beta1.Experiment_STORAGESTATE_AVAILABLE, ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -63,7 +88,7 @@ func TestCreateExperimentV1(t *testing.T) { func TestCreateExperiment(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "ex1", Description: "first experiment"} result, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) @@ -72,8 +97,8 @@ func TestCreateExperiment(t *testing.T) { ExperimentId: DefaultFakeUUID, DisplayName: "ex1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 0}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(0, 0)), StorageState: apiV2beta1.Experiment_AVAILABLE, Namespace: "", } @@ -83,7 +108,7 @@ func TestCreateExperiment(t *testing.T) { func TestCreateExperimentV1_Failed(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{Name: "ex1", Description: "first experiment"} clientManager.DB().Close() _, err := server.CreateExperimentV1(nil, &apiv1beta1.CreateExperimentRequest{Experiment: experiment}) @@ -94,7 +119,7 @@ func TestCreateExperimentV1_Failed(t *testing.T) { func TestCreateExperiment_Failed(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "ex1", Description: "first experiment"} clientManager.DB().Close() _, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) @@ -105,7 +130,7 @@ func TestCreateExperiment_Failed(t *testing.T) { func TestCreateExperiment_EmptyName(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "", Description: "first experiment"} clientManager.DB().Close() _, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) @@ -116,7 +141,7 @@ func TestCreateExperiment_EmptyName(t *testing.T) { func TestCreateExperimentV1_EmptyName(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{Name: "", Description: "first experiment"} clientManager.DB().Close() _, err := server.CreateExperimentV1(nil, &apiv1beta1.CreateExperimentRequest{Experiment: experiment}) @@ -135,7 +160,7 @@ func TestCreateExperimentV1_Unauthorized(t *testing.T) { clients, resourceManager, _ := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{ Name: "exp1", Description: "first experiment", @@ -167,7 +192,7 @@ func TestCreateExperiment_Unauthorized(t *testing.T) { clients, resourceManager, _ := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{ DisplayName: "exp1", Description: "first experiment", @@ -191,7 +216,6 @@ func TestCreateExperimentV1_Multiuser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} tests := []struct { name string @@ -365,7 +389,7 @@ func TestCreateExperimentV1_Multiuser(t *testing.T) { for _, tt := range tests { clientManager.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal(tt.fakeId, nil)) resourceManager = resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server = ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) got, err := server.CreateExperimentV1(ctx, &apiv1beta1.CreateExperimentRequest{Experiment: tt.experiment}) if tt.wantError { assert.NotNil(t, err) @@ -387,7 +411,7 @@ func TestCreateExperiment_Multiuser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) tests := []struct { name string @@ -401,14 +425,14 @@ func TestCreateExperiment_Multiuser(t *testing.T) { &apiV2beta1.Experiment{ DisplayName: "exp1", Description: "first experiment", - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 0}, + LastRunCreatedAt: timestamppb.New(time.Unix(0, 0)), Namespace: "ns1", }, &apiV2beta1.Experiment{ ExperimentId: DefaultFakeUUID, DisplayName: "exp1", Description: "first experiment", - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 0}, + LastRunCreatedAt: timestamppb.New(time.Unix(0, 0)), Namespace: "ns1", StorageState: apiV2beta1.Experiment_AVAILABLE, }, @@ -453,7 +477,7 @@ func TestCreateExperiment_Multiuser(t *testing.T) { func TestGetExperimentV1(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{Name: "ex1", Description: "first experiment"} createResult, err := server.CreateExperimentV1(nil, &apiv1beta1.CreateExperimentRequest{Experiment: experiment}) @@ -464,7 +488,7 @@ func TestGetExperimentV1(t *testing.T) { Id: createResult.Id, Name: "ex1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), StorageState: apiv1beta1.Experiment_STORAGESTATE_AVAILABLE, ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -479,7 +503,7 @@ func TestGetExperimentV1(t *testing.T) { func TestGetExperiment(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "ex1", Description: "first experiment"} createResult, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) @@ -490,8 +514,8 @@ func TestGetExperiment(t *testing.T) { ExperimentId: createResult.ExperimentId, DisplayName: "ex1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 0}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(0, 0)), StorageState: apiV2beta1.Experiment_AVAILABLE, Namespace: "", } @@ -501,7 +525,7 @@ func TestGetExperiment(t *testing.T) { func TestGetExperimentV1_Failed(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{Name: "ex1", Description: "first experiment"} createResult, err := server.CreateExperimentV1(nil, &apiv1beta1.CreateExperimentRequest{Experiment: experiment}) @@ -515,7 +539,7 @@ func TestGetExperimentV1_Failed(t *testing.T) { func TestGetExperiment_Failed(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "ex1", Description: "first experiment"} createResult, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) @@ -537,7 +561,7 @@ func TestGetExperimentV1_Unauthorized(t *testing.T) { clients, manager, experiment := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := ExperimentServer{manager, &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(manager) _, err := server.GetExperimentV1(ctx, &apiv1beta1.GetExperimentRequest{Id: experiment.UUID}) assert.NotNil(t, err) @@ -559,7 +583,7 @@ func TestGetExperiment_Unauthorized(t *testing.T) { clients, manager, experiment := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := ExperimentServer{manager, &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(manager) _, err := server.GetExperiment(ctx, &apiV2beta1.GetExperimentRequest{ExperimentId: experiment.UUID}) assert.NotNil(t, err) @@ -578,7 +602,7 @@ func TestGetExperimentV1_Multiuser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) resourceReferences := []*apiv1beta1.ResourceReference{ { Key: &apiv1beta1.ResourceKey{Type: apiv1beta1.ResourceType_NAMESPACE, Id: "ns1"}, @@ -599,7 +623,7 @@ func TestGetExperimentV1_Multiuser(t *testing.T) { Id: createResult.Id, Name: "exp1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), ResourceReferences: resourceReferences, StorageState: apiv1beta1.Experiment_STORAGESTATE_AVAILABLE, } @@ -614,7 +638,7 @@ func TestGetExperiment_Multiuser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{ DisplayName: "exp1", Description: "first experiment", @@ -629,8 +653,8 @@ func TestGetExperiment_Multiuser(t *testing.T) { ExperimentId: createResult.ExperimentId, DisplayName: "exp1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 0}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(0, 0)), Namespace: "ns1", StorageState: apiV2beta1.Experiment_AVAILABLE, } @@ -640,7 +664,7 @@ func TestGetExperiment_Multiuser(t *testing.T) { func TestListExperimentsV1(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{Name: "ex1", Description: "first experiment"} createResult, err := server.CreateExperimentV1(nil, &apiv1beta1.CreateExperimentRequest{Experiment: experiment}) @@ -652,7 +676,7 @@ func TestListExperimentsV1(t *testing.T) { Id: createResult.Id, Name: "ex1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), StorageState: apiv1beta1.Experiment_STORAGESTATE_AVAILABLE, ResourceReferences: []*apiv1beta1.ResourceReference{ { @@ -668,7 +692,7 @@ func TestListExperimentsV1(t *testing.T) { func TestListExperiments(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "ex1", Description: "first experiment"} createResult, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) @@ -678,8 +702,8 @@ func TestListExperiments(t *testing.T) { ExperimentId: createResult.ExperimentId, DisplayName: "ex1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 0}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(0, 0)), StorageState: apiV2beta1.Experiment_AVAILABLE, Namespace: "", }} @@ -695,7 +719,7 @@ func TestListExperimentsByLastRunCreation(t *testing.T) { // Create another experiment clients.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal(DefaultFakeIdTwo, nil)) manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: manager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(manager) experiment := &apiV2beta1.Experiment{DisplayName: "exp2"} experiment2, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) assert.Nil(t, err) @@ -734,13 +758,13 @@ func TestListExperimentsByLastRunCreation(t *testing.T) { // Expected runs, note that because run 2 in experiment 2 // was created last, experiment 2 has the latest run execution - experimentServer := ExperimentServer{resourceManager: manager, options: &ExperimentServerOptions{CollectMetrics: false}} + experimentServer := createExperimentServer(manager) expected1 := &apiV2beta1.Experiment{ ExperimentId: experiment1.UUID, DisplayName: "exp1", Description: "", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 5}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(5, 0)), StorageState: apiV2beta1.Experiment_AVAILABLE, Namespace: "", } @@ -748,8 +772,8 @@ func TestListExperimentsByLastRunCreation(t *testing.T) { ExperimentId: experiment2.ExperimentId, DisplayName: "exp2", Description: "", - CreatedAt: ×tamp.Timestamp{Seconds: 4}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 7}, + CreatedAt: timestamppb.New(time.Unix(4, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(7, 0)), StorageState: apiV2beta1.Experiment_AVAILABLE, Namespace: "", } @@ -769,7 +793,7 @@ func TestListExperimentsByLastRunCreation(t *testing.T) { func TestListExperimentsV1_Failed(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{Name: "ex1", Description: "first experiment"} _, err := server.CreateExperimentV1(nil, &apiv1beta1.CreateExperimentRequest{Experiment: experiment}) @@ -783,7 +807,7 @@ func TestListExperimentsV1_Failed(t *testing.T) { func TestListExperiments_Failed(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "ex1", Description: "first experiment"} _, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) @@ -805,7 +829,7 @@ func TestListExperimentsV1_Unauthorized(t *testing.T) { clients, manager, _ := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := ExperimentServer{manager, &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(manager) _, err := server.ListExperimentsV1(ctx, &apiv1beta1.ListExperimentsRequest{ ResourceReferenceKey: &apiv1beta1.ResourceKey{ @@ -832,7 +856,7 @@ func TestListExperiments_Unauthorized(t *testing.T) { clients, manager, _ := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := ExperimentServer{manager, &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(manager) _, err := server.ListExperiments(ctx, &apiV2beta1.ListExperimentsRequest{Namespace: "ns1"}) assert.NotNil(t, err) assert.Contains( @@ -851,7 +875,7 @@ func TestListExperimentsV1_Multiuser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) resourceReferences := []*apiv1beta1.ResourceReference{ { @@ -889,7 +913,7 @@ func TestListExperimentsV1_Multiuser(t *testing.T) { Id: createResult.Id, Name: "exp1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), ResourceReferences: resourceReferences, StorageState: apiv1beta1.Experiment_STORAGESTATE_AVAILABLE, }}, @@ -978,7 +1002,7 @@ func TestListExperiments_Multiuser_NoDefault(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{ DisplayName: "exp1", Description: "first experiment", @@ -1004,8 +1028,8 @@ func TestListExperiments_Multiuser_NoDefault(t *testing.T) { ExperimentId: createResult.ExperimentId, DisplayName: "exp1", Description: "first experiment", - CreatedAt: ×tamp.Timestamp{Seconds: 1}, - LastRunCreatedAt: ×tamp.Timestamp{Seconds: 0}, + CreatedAt: timestamppb.New(time.Unix(1, 0)), + LastRunCreatedAt: timestamppb.New(time.Unix(0, 0)), Namespace: "ns1", StorageState: apiV2beta1.Experiment_AVAILABLE, }}, @@ -1048,7 +1072,7 @@ func TestArchiveAndUnarchiveExperimentV1(t *testing.T) { // Create experiment and runs/jobs under it. clients, manager, experiment, _ := initWithExperimentAndPipelineVersion(t) defer clients.Close() - runServer := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + runServer := createRunServerV1(manager) run1 := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReferencesOfExperimentAndPipelineVersion, @@ -1057,7 +1081,7 @@ func TestArchiveAndUnarchiveExperimentV1(t *testing.T) { assert.Nil(t, err) clients.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal(FakeUUIDOne, nil)) manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - runServer = NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + runServer = createRunServerV1(manager) run2 := &apiv1beta1.Run{ Name: "run2", ResourceReferences: validReferencesOfExperimentAndPipelineVersion, @@ -1066,14 +1090,14 @@ func TestArchiveAndUnarchiveExperimentV1(t *testing.T) { assert.Nil(t, err) clients.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal(DefaultFakeUUID, nil)) manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - jobServer := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + jobServer := createJobServerV1(manager) job1 := &apiv1beta1.Job{ Name: "name1", Enabled: true, MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -1087,7 +1111,7 @@ func TestArchiveAndUnarchiveExperimentV1(t *testing.T) { assert.Equal(t, true, jobs.Jobs[0].Enabled) // Archive the experiment and thus all runs under it. - experimentServer := NewExperimentServer(manager, &ExperimentServerOptions{CollectMetrics: false}) + experimentServer := createExperimentServerV1(manager) _, err = experimentServer.ArchiveExperimentV1(nil, &apiv1beta1.ArchiveExperimentRequest{Id: experiment.UUID}) assert.Nil(t, err) result, err := experimentServer.GetExperimentV1(nil, &apiv1beta1.GetExperimentRequest{Id: experiment.UUID}) @@ -1124,7 +1148,7 @@ func TestArchiveAndUnarchiveExperiment(t *testing.T) { // Create experiment and runs/jobs under it. clients, manager, experiment, _ := initWithExperimentAndPipelineVersion(t) defer clients.Close() - runServer := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + runServer := createRunServerV1(manager) run1 := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReferencesOfExperimentAndPipelineVersion, @@ -1133,7 +1157,7 @@ func TestArchiveAndUnarchiveExperiment(t *testing.T) { assert.Nil(t, err) clients.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal(FakeUUIDOne, nil)) manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - runServer = NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + runServer = createRunServerV1(manager) run2 := &apiv1beta1.Run{ Name: "run2", ResourceReferences: validReferencesOfExperimentAndPipelineVersion, @@ -1142,14 +1166,14 @@ func TestArchiveAndUnarchiveExperiment(t *testing.T) { assert.Nil(t, err) clients.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal(DefaultFakeUUID, nil)) manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - jobServer := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + jobServer := createJobServerV1(manager) job1 := &apiv1beta1.Job{ Name: "name1", Enabled: true, MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -1159,7 +1183,7 @@ func TestArchiveAndUnarchiveExperiment(t *testing.T) { assert.Nil(t, err) // Archive the experiment and thus all runs under it. - experimentServer := NewExperimentServer(manager, &ExperimentServerOptions{CollectMetrics: false}) + experimentServer := createExperimentServer(manager) _, err = experimentServer.ArchiveExperiment(nil, &apiV2beta1.ArchiveExperimentRequest{ExperimentId: experiment.UUID}) assert.Nil(t, err) result, err := experimentServer.GetExperiment(nil, &apiV2beta1.GetExperimentRequest{ExperimentId: experiment.UUID}) @@ -1197,7 +1221,7 @@ func TestArchiveAndUnarchiveExperiment(t *testing.T) { func TestDeleteExperiments_SingleUser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "ex1", Description: "first experiment"} resultExperiment, err := server.CreateExperiment(nil, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) assert.Nil(t, err) @@ -1215,7 +1239,7 @@ func TestDeleteExperiments_SingleUser(t *testing.T) { func TestDeleteExperimentsV1_SingleUser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) experiment := &apiv1beta1.Experiment{Name: "ex1", Description: "first experiment"} resultExperiment, err := server.CreateExperimentV1(nil, &apiv1beta1.CreateExperimentRequest{Experiment: experiment}) assert.Nil(t, err) @@ -1238,7 +1262,7 @@ func TestDeleteExperiments_MultiUser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServer(resourceManager) experiment := &apiV2beta1.Experiment{DisplayName: "ex1", Description: "first experiment", Namespace: "ns1"} resultExperiment, err := server.CreateExperiment(ctx, &apiV2beta1.CreateExperimentRequest{Experiment: experiment}) assert.Nil(t, err) @@ -1261,7 +1285,7 @@ func TestDeleteExperimentsV1_MultiUser(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := ExperimentServer{resourceManager: resourceManager, options: &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(resourceManager) resourceReferences := []*apiv1beta1.ResourceReference{ { Key: &apiv1beta1.ResourceKey{Type: apiv1beta1.ResourceType_NAMESPACE, Id: "ns1"}, @@ -1294,7 +1318,7 @@ func TestListExperimentsV1_Unauthenticated(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := ExperimentServer{manager, &ExperimentServerOptions{CollectMetrics: false}} + server := createExperimentServerV1(manager) _, err := server.ListExperimentsV1(ctx, &apiv1beta1.ListExperimentsRequest{ ResourceReferenceKey: &apiv1beta1.ResourceKey{ Type: apiv1beta1.ResourceType_NAMESPACE, diff --git a/backend/src/apiserver/server/job_server.go b/backend/src/apiserver/server/job_server.go index 557287ee62f..b2c1791286b 100644 --- a/backend/src/apiserver/server/job_server.go +++ b/backend/src/apiserver/server/job_server.go @@ -17,7 +17,8 @@ package server import ( "context" - "github.com/golang/protobuf/ptypes/empty" + "google.golang.org/protobuf/types/known/emptypb" + apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" @@ -75,12 +76,25 @@ type JobServerOptions struct { CollectMetrics bool } -type JobServer struct { +// BaseJobServer wraps JobServer and JobServerV1 +// to enable method sharing. It can be removed once JobServerV1 +// is removed. +type BaseJobServer struct { resourceManager *resource.ResourceManager options *JobServerOptions } -func (s *JobServer) createJob(ctx context.Context, job *model.Job) (*model.Job, error) { +type JobServer struct { + *BaseJobServer + apiv2beta1.UnimplementedRecurringRunServiceServer +} + +type JobServerV1 struct { + *BaseJobServer + apiv1beta1.UnimplementedJobServiceServer +} + +func (s *BaseJobServer) createJob(ctx context.Context, job *model.Job) (*model.Job, error) { // Validate user inputs if job.DisplayName == "" { return nil, util.NewInvalidInputError("Recurring run name is empty. Please specify a valid name") @@ -106,7 +120,7 @@ func (s *JobServer) createJob(ctx context.Context, job *model.Job) (*model.Job, return s.resourceManager.CreateJob(ctx, job) } -func (s *JobServer) CreateJob(ctx context.Context, request *apiv1beta1.CreateJobRequest) (*apiv1beta1.Job, error) { +func (s *JobServerV1) CreateJob(ctx context.Context, request *apiv1beta1.CreateJobRequest) (*apiv1beta1.Job, error) { if s.options.CollectMetrics { createJobRequests.Inc() } @@ -139,7 +153,7 @@ func (s *JobServer) CreateJob(ctx context.Context, request *apiv1beta1.CreateJob return toApiJobV1(newJob), nil } -func (s *JobServer) getJob(ctx context.Context, jobId string) (*model.Job, error) { +func (s *BaseJobServer) getJob(ctx context.Context, jobId string) (*model.Job, error) { err := s.canAccessJob(ctx, jobId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbGet}) if err != nil { return nil, util.Wrap(err, "Failed to authorize the request") @@ -147,7 +161,7 @@ func (s *JobServer) getJob(ctx context.Context, jobId string) (*model.Job, error return s.resourceManager.GetJob(jobId) } -func (s *JobServer) GetJob(ctx context.Context, request *apiv1beta1.GetJobRequest) (*apiv1beta1.Job, error) { +func (s *JobServerV1) GetJob(ctx context.Context, request *apiv1beta1.GetJobRequest) (*apiv1beta1.Job, error) { if s.options.CollectMetrics { getJobRequests.Inc() } @@ -164,7 +178,7 @@ func (s *JobServer) GetJob(ctx context.Context, request *apiv1beta1.GetJobReques return apiJob, nil } -func (s *JobServer) listJobs(ctx context.Context, pageToken string, pageSize int, sortBy string, opts *list.Options, namespace string, experimentId string) ([]*model.Job, int, string, error) { +func (s *BaseJobServer) listJobs(ctx context.Context, pageToken string, pageSize int, sortBy string, opts *list.Options, namespace string, experimentId string) ([]*model.Job, int, string, error) { namespace = s.resourceManager.ReplaceNamespace(namespace) if experimentId != "" { ns, err := s.resourceManager.GetNamespaceFromExperimentId(experimentId) @@ -200,7 +214,7 @@ func (s *JobServer) listJobs(ctx context.Context, pageToken string, pageSize int return jobs, totalSize, token, nil } -func (s *JobServer) ListJobs(ctx context.Context, r *apiv1beta1.ListJobsRequest) (*apiv1beta1.ListJobsResponse, error) { +func (s *JobServerV1) ListJobs(ctx context.Context, r *apiv1beta1.ListJobsRequest) (*apiv1beta1.ListJobsResponse, error) { if s.options.CollectMetrics { listJobRequests.Inc() } @@ -241,7 +255,7 @@ func (s *JobServer) ListJobs(ctx context.Context, r *apiv1beta1.ListJobsRequest) }, nil } -func (s *JobServer) EnableJob(ctx context.Context, request *apiv1beta1.EnableJobRequest) (*empty.Empty, error) { +func (s *JobServerV1) EnableJob(ctx context.Context, request *apiv1beta1.EnableJobRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { enableJobRequests.Inc() } @@ -249,10 +263,10 @@ func (s *JobServer) EnableJob(ctx context.Context, request *apiv1beta1.EnableJob if err != nil { return nil, util.Wrap(err, "Failed to enable a v1beta1 recurring run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *JobServer) disableJob(ctx context.Context, jobId string) error { +func (s *BaseJobServer) disableJob(ctx context.Context, jobId string) error { err := s.canAccessJob(ctx, jobId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbDisable}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -260,7 +274,7 @@ func (s *JobServer) disableJob(ctx context.Context, jobId string) error { return s.resourceManager.ChangeJobMode(ctx, jobId, false) } -func (s *JobServer) DisableJob(ctx context.Context, request *apiv1beta1.DisableJobRequest) (*empty.Empty, error) { +func (s *JobServerV1) DisableJob(ctx context.Context, request *apiv1beta1.DisableJobRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { disableJobRequests.Inc() } @@ -269,10 +283,10 @@ func (s *JobServer) DisableJob(ctx context.Context, request *apiv1beta1.DisableJ if err != nil { return nil, util.Wrap(err, "Failed to disable a v1beta1 recurring run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *JobServer) deleteJob(ctx context.Context, jobId string) error { +func (s *BaseJobServer) deleteJob(ctx context.Context, jobId string) error { err := s.canAccessJob(ctx, jobId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbDelete}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -281,7 +295,7 @@ func (s *JobServer) deleteJob(ctx context.Context, jobId string) error { return s.resourceManager.DeleteJob(ctx, jobId) } -func (s *JobServer) DeleteJob(ctx context.Context, request *apiv1beta1.DeleteJobRequest) (*empty.Empty, error) { +func (s *JobServerV1) DeleteJob(ctx context.Context, request *apiv1beta1.DeleteJobRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deleteJobRequests.Inc() } @@ -292,10 +306,10 @@ func (s *JobServer) DeleteJob(ctx context.Context, request *apiv1beta1.DeleteJob if s.options.CollectMetrics { jobCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *JobServer) enableJob(ctx context.Context, jobId string) error { +func (s *BaseJobServer) enableJob(ctx context.Context, jobId string) error { err := s.canAccessJob(ctx, jobId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbEnable}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -370,7 +384,7 @@ func (s *JobServer) ListRecurringRuns(ctx context.Context, r *apiv2beta1.ListRec }, nil } -func (s *JobServer) EnableRecurringRun(ctx context.Context, request *apiv2beta1.EnableRecurringRunRequest) (*empty.Empty, error) { +func (s *JobServer) EnableRecurringRun(ctx context.Context, request *apiv2beta1.EnableRecurringRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { enableJobRequests.Inc() } @@ -378,10 +392,10 @@ func (s *JobServer) EnableRecurringRun(ctx context.Context, request *apiv2beta1. if err != nil { return nil, util.Wrap(err, "Failed to enable a recurring run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *JobServer) DisableRecurringRun(ctx context.Context, request *apiv2beta1.DisableRecurringRunRequest) (*empty.Empty, error) { +func (s *JobServer) DisableRecurringRun(ctx context.Context, request *apiv2beta1.DisableRecurringRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { disableJobRequests.Inc() } @@ -390,10 +404,10 @@ func (s *JobServer) DisableRecurringRun(ctx context.Context, request *apiv2beta1 if err != nil { return nil, util.Wrap(err, "Failed to disable a recurring run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *JobServer) DeleteRecurringRun(ctx context.Context, request *apiv2beta1.DeleteRecurringRunRequest) (*empty.Empty, error) { +func (s *JobServer) DeleteRecurringRun(ctx context.Context, request *apiv2beta1.DeleteRecurringRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deleteJobRequests.Inc() } @@ -404,10 +418,10 @@ func (s *JobServer) DeleteRecurringRun(ctx context.Context, request *apiv2beta1. if s.options.CollectMetrics { jobCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *JobServer) canAccessJob(ctx context.Context, jobID string, resourceAttributes *authorizationv1.ResourceAttributes) error { +func (s *BaseJobServer) canAccessJob(ctx context.Context, jobID string, resourceAttributes *authorizationv1.ResourceAttributes) error { if !common.IsMultiUserMode() { // Skip authorization if not multi-user mode. return nil @@ -445,5 +459,19 @@ func (s *JobServer) canAccessJob(ctx context.Context, jobID string, resourceAttr } func NewJobServer(resourceManager *resource.ResourceManager, options *JobServerOptions) *JobServer { - return &JobServer{resourceManager: resourceManager, options: options} + return &JobServer{ + BaseJobServer: &BaseJobServer{ + resourceManager: resourceManager, + options: options, + }, + } +} + +func NewJobServerV1(resourceManager *resource.ResourceManager, options *JobServerOptions) *JobServerV1 { + return &JobServerV1{ + BaseJobServer: &BaseJobServer{ + resourceManager: resourceManager, + options: options, + }, + } } diff --git a/backend/src/apiserver/server/job_server_test.go b/backend/src/apiserver/server/job_server_test.go index ebe81973296..6bd1c6fad5d 100644 --- a/backend/src/apiserver/server/job_server_test.go +++ b/backend/src/apiserver/server/job_server_test.go @@ -18,8 +18,10 @@ import ( "context" "strings" "testing" + "time" + + "google.golang.org/protobuf/types/known/timestamppb" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" api "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" @@ -44,7 +46,7 @@ var ( MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -68,12 +70,12 @@ var ( MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), Status: "STATUS_UNSPECIFIED", PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: testWorkflow.ToStringForStore(), @@ -93,7 +95,7 @@ var ( MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -102,10 +104,32 @@ var ( } ) +func createJobServerV1(resourceManager *resource.ResourceManager) *JobServerV1 { + return &JobServerV1{ + BaseJobServer: &BaseJobServer{ + resourceManager: resourceManager, + options: &JobServerOptions{ + CollectMetrics: false, + }, + }, + } +} + +func createJobServer(resourceManager *resource.ResourceManager) *JobServer { + return &JobServer{ + BaseJobServer: &BaseJobServer{ + resourceManager: resourceManager, + options: &JobServerOptions{ + CollectMetrics: false, + }, + }, + } +} + func TestCreateJob_WrongInput(t *testing.T) { clients, manager, experiment, _ := initWithExperimentAndPipelineVersion(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) tests := []struct { name string arg *apiv1beta1.Job @@ -119,7 +143,7 @@ func TestCreateJob_WrongInput(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}}, ResourceReferences: []*api.ResourceReference{ @@ -146,7 +170,7 @@ func TestCreateJob_WrongInput(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -162,7 +186,7 @@ func TestCreateJob_WrongInput(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}}, PipelineSpec: &apiv1beta1.PipelineSpec{ @@ -184,7 +208,7 @@ func TestCreateJob_WrongInput(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * ", }}}, PipelineSpec: &apiv1beta1.PipelineSpec{ @@ -205,7 +229,7 @@ func TestCreateJob_WrongInput(t *testing.T) { MaxConcurrency: 0, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}}, PipelineSpec: &apiv1beta1.PipelineSpec{ @@ -254,7 +278,7 @@ func TestCreateJob_WrongInput(t *testing.T) { func TestCreateJob_pipelineVersion(t *testing.T) { clients, manager, exp, pipelineVersion := initWithExperimentAndPipelineVersion(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) rr := []*apiv1beta1.ResourceReference{ { Key: &apiv1beta1.ResourceKey{ @@ -277,7 +301,7 @@ func TestCreateJob_pipelineVersion(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}}, ResourceReferences: rr, @@ -292,7 +316,7 @@ func TestCreateJob_pipelineVersion(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}}, ResourceReferences: rr, @@ -324,14 +348,14 @@ func TestCreateJob_NoResRefs(t *testing.T) { defer clients.Close() clients.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal(DefaultFakeIdTwo, nil)) manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) apiJob := &apiv1beta1.Job{ Name: "job1", Enabled: true, MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}}, PipelineSpec: &apiv1beta1.PipelineSpec{ @@ -358,7 +382,7 @@ func TestCreateJob_NoResRefs(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}}, ResourceReferences: rr, @@ -387,7 +411,7 @@ func TestCreateJob_NoResRefs(t *testing.T) { func TestCreateJob(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) job, err := server.CreateJob(nil, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.Nil(t, err) matched := 0 @@ -412,7 +436,7 @@ func TestCreateJob(t *testing.T) { func TestCreateJob_V2(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) listParams := []interface{}{1, 2, 3} v2RuntimeListParams, _ := structpb.NewList(listParams) @@ -434,7 +458,7 @@ func TestCreateJob_V2(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -461,12 +485,12 @@ func TestCreateJob_V2(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv1beta1.Trigger{ Trigger: &apiv1beta1.Trigger_CronSchedule{CronSchedule: &apiv1beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), Status: "STATUS_UNSPECIFIED", PipelineSpec: &apiv1beta1.PipelineSpec{ PipelineManifest: v2SpecHelloWorldParams, @@ -515,7 +539,7 @@ func TestListRecurringRuns_MultiUser(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServer(manager) pipelineSpecStruct := &structpb.Struct{} yaml.Unmarshal([]byte(v2SpecHelloWorld), pipelineSpecStruct) @@ -526,7 +550,7 @@ func TestListRecurringRuns_MultiUser(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -552,12 +576,12 @@ func TestListRecurringRuns_MultiUser(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), PipelineSource: &apiv2beta1.RecurringRun_PipelineSpec{PipelineSpec: pipelineSpecStruct}, RuntimeConfig: &apiv2beta1.RuntimeConfig{ PipelineRoot: "model-pipeline-root", @@ -598,7 +622,7 @@ func TestCreateJob_Unauthorized(t *testing.T) { clients, manager, _ := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) _, err := server.CreateJob(ctx, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.NotNil(t, err) assert.Contains( @@ -619,13 +643,13 @@ func TestGetJob_Unauthorized(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) job, err := server.CreateJob(ctx, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.Nil(t, err) clients.SubjectAccessReviewClientFake = client.NewFakeSubjectAccessReviewClientUnauthorized() manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - server = NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server = createJobServerV1(manager) _, err = server.GetJob(ctx, &apiv1beta1.GetJobRequest{Id: job.Id}) assert.NotNil(t, err) @@ -645,7 +669,7 @@ func TestGetJob_Multiuser(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) createdJob, err := server.CreateJob(ctx, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.Nil(t, err) @@ -681,7 +705,7 @@ func TestListJobs_Unauthorized(t *testing.T) { clients, manager, experiment := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) _, err := server.ListJobs(ctx, &apiv1beta1.ListJobsRequest{ ResourceReferenceKey: &apiv1beta1.ResourceKey{ Type: apiv1beta1.ResourceType_EXPERIMENT, @@ -718,13 +742,13 @@ func TestListJobs_Multiuser(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) _, err := server.CreateJob(ctx, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.Nil(t, err) var expectedJobs []*apiv1beta1.Job - commonExpectedJob.CreatedAt = ×tamp.Timestamp{Seconds: 2} - commonExpectedJob.UpdatedAt = ×tamp.Timestamp{Seconds: 2} + commonExpectedJob.CreatedAt = timestamppb.New(time.Unix(2, 0)) + commonExpectedJob.UpdatedAt = timestamppb.New(time.Unix(2, 0)) commonExpectedJob.ResourceReferences = []*apiv1beta1.ResourceReference{ {Key: &apiv1beta1.ResourceKey{Type: apiv1beta1.ResourceType_NAMESPACE, Id: "ns1"}, Relationship: apiv1beta1.Relationship_OWNER}, {Key: &apiv1beta1.ResourceKey{Type: apiv1beta1.ResourceType_EXPERIMENT, Id: DefaultFakeIdOne}, Relationship: apiv1beta1.Relationship_OWNER}, @@ -826,13 +850,13 @@ func TestEnableJob_Unauthorized(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) job, err := server.CreateJob(ctx, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.Nil(t, err) clients.SubjectAccessReviewClientFake = client.NewFakeSubjectAccessReviewClientUnauthorized() manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - server = NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server = createJobServerV1(manager) _, err = server.EnableJob(ctx, &apiv1beta1.EnableJobRequest{Id: job.Id}) assert.NotNil(t, err) @@ -852,7 +876,7 @@ func TestEnableJob_Multiuser(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) job, err := server.CreateJob(ctx, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.Nil(t, err) @@ -871,13 +895,13 @@ func TestDisableJob_Unauthorized(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) job, err := server.CreateJob(ctx, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.Nil(t, err) clients.SubjectAccessReviewClientFake = client.NewFakeSubjectAccessReviewClientUnauthorized() manager = resource.NewResourceManager(clients, &resource.ResourceManagerOptions{CollectMetrics: false}) - server = NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server = createJobServerV1(manager) _, err = server.DisableJob(ctx, &apiv1beta1.DisableJobRequest{Id: job.Id}) assert.NotNil(t, err) @@ -897,7 +921,7 @@ func TestDisableJob_Multiuser(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) job, err := server.CreateJob(ctx, &apiv1beta1.CreateJobRequest{Job: commonApiJob}) assert.Nil(t, err) @@ -916,7 +940,7 @@ func TestListJobs_Unauthenticated(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServerV1(manager) _, err := server.ListJobs(ctx, &apiv1beta1.ListJobsRequest{ ResourceReferenceKey: &apiv1beta1.ResourceKey{ Type: apiv1beta1.ResourceType_EXPERIMENT, @@ -947,7 +971,7 @@ func TestListJobs_Unauthenticated(t *testing.T) { func TestCreateRecurringRun(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServer(manager) pipelineSpecStruct := &structpb.Struct{} yaml.Unmarshal([]byte(v2SpecHelloWorld), pipelineSpecStruct) @@ -958,7 +982,7 @@ func TestCreateRecurringRun(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -984,12 +1008,12 @@ func TestCreateRecurringRun(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), Status: apiv2beta1.RecurringRun_ENABLED, PipelineSource: &apiv2beta1.RecurringRun_PipelineSpec{PipelineSpec: pipelineSpecStruct}, RuntimeConfig: &apiv2beta1.RuntimeConfig{ @@ -1009,7 +1033,7 @@ func TestCreateRecurringRun(t *testing.T) { func TestGetRecurringRun(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServer(manager) pipelineSpecStruct := &structpb.Struct{} yaml.Unmarshal([]byte(v2SpecHelloWorld), pipelineSpecStruct) @@ -1020,7 +1044,7 @@ func TestGetRecurringRun(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -1046,12 +1070,12 @@ func TestGetRecurringRun(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), Status: apiv2beta1.RecurringRun_ENABLED, PipelineSource: &apiv2beta1.RecurringRun_PipelineSpec{PipelineSpec: pipelineSpecStruct}, RuntimeConfig: &apiv2beta1.RuntimeConfig{ @@ -1074,7 +1098,7 @@ func TestGetRecurringRun(t *testing.T) { func TestListRecurringRuns(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServer(manager) pipelineSpecStruct := &structpb.Struct{} yaml.Unmarshal([]byte(v2SpecHelloWorld), pipelineSpecStruct) @@ -1085,7 +1109,7 @@ func TestListRecurringRuns(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -1111,12 +1135,12 @@ func TestListRecurringRuns(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - UpdatedAt: ×tamp.Timestamp{Seconds: 2}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + UpdatedAt: timestamppb.New(time.Unix(2, 0)), PipelineSource: &apiv2beta1.RecurringRun_PipelineSpec{PipelineSpec: pipelineSpecStruct}, RuntimeConfig: &apiv2beta1.RuntimeConfig{ PipelineRoot: "model-pipeline-root", @@ -1152,7 +1176,7 @@ func TestListRecurringRuns(t *testing.T) { func TestEnableRecurringRun(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServer(manager) pipelineSpecStruct := &structpb.Struct{} yaml.Unmarshal([]byte(v2SpecHelloWorld), pipelineSpecStruct) @@ -1163,7 +1187,7 @@ func TestEnableRecurringRun(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, @@ -1187,7 +1211,7 @@ func TestEnableRecurringRun(t *testing.T) { func TestDisableRecurringRun(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewJobServer(manager, &JobServerOptions{CollectMetrics: false}) + server := createJobServer(manager) pipelineSpecStruct := &structpb.Struct{} yaml.Unmarshal([]byte(v2SpecHelloWorld), pipelineSpecStruct) @@ -1198,7 +1222,7 @@ func TestDisableRecurringRun(t *testing.T) { MaxConcurrency: 1, Trigger: &apiv2beta1.Trigger{ Trigger: &apiv2beta1.Trigger_CronSchedule{CronSchedule: &apiv2beta1.CronSchedule{ - StartTime: ×tamp.Timestamp{Seconds: 1}, + StartTime: timestamppb.New(time.Unix(1, 0)), Cron: "1 * * * *", }}, }, diff --git a/backend/src/apiserver/server/list_request_util.go b/backend/src/apiserver/server/list_request_util.go index c5bc8c71cf2..e6a1585dc75 100644 --- a/backend/src/apiserver/server/list_request_util.go +++ b/backend/src/apiserver/server/list_request_util.go @@ -17,11 +17,11 @@ package server import ( "encoding/base64" "encoding/json" + "fmt" "net/url" "strconv" "strings" - "github.com/golang/protobuf/jsonpb" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" @@ -29,6 +29,7 @@ import ( "github.com/kubeflow/pipelines/backend/src/apiserver/list" "github.com/kubeflow/pipelines/backend/src/apiserver/model" "github.com/kubeflow/pipelines/backend/src/common/util" + "google.golang.org/protobuf/encoding/protojson" ) const ( @@ -145,16 +146,23 @@ func parseAPIFilter(encoded string, apiVersion string) (interface{}, error) { if err != nil { return nil, util.NewInvalidInputError("failed to parse valid filter from %q: %v", encoded, err) } + + transformedJSON, err := transformJSONForBackwardCompatibility(decoded) + if err != nil { + fmt.Printf("Failed to transform JSON: %v\n", err) + return nil, err + } + switch apiVersion { case "v2beta1": f := &apiv2beta1.Filter{} - if err := jsonpb.UnmarshalString(decoded, f); err != nil { + if err := protojson.Unmarshal([]byte(transformedJSON), f); err != nil { return nil, util.NewInvalidInputError("failed to parse valid filter from %q: %v", encoded, err) } return f, nil case "v1beta1": f := &apiv1beta1.Filter{} - if err := jsonpb.UnmarshalString(decoded, f); err != nil { + if err := protojson.Unmarshal([]byte(transformedJSON), f); err != nil { return nil, util.NewInvalidInputError("failed to parse valid filter from %q: %v", encoded, err) } return f, nil @@ -206,3 +214,16 @@ func validatedListOptions(listable list.Listable, pageToken string, pageSize int return opts, nil } + +func transformJSONForBackwardCompatibility(jsonStr string) (string, error) { + replacer := strings.NewReplacer( + `"intValue":`, `"int_value":`, + `"longValue":`, `"long_value":`, + `"stringValue":`, `"string_value":`, + `"timestampValue":`, `"timestamp_value":`, + `"intValues":`, `"int_values":`, + `"longValues":`, `"long_values":`, + `"stringValues":`, `"string_values":`, + ) + return replacer.Replace(jsonStr), nil +} diff --git a/backend/src/apiserver/server/list_request_util_test.go b/backend/src/apiserver/server/list_request_util_test.go index 98efaaf7a62..e13d8315957 100644 --- a/backend/src/apiserver/server/list_request_util_test.go +++ b/backend/src/apiserver/server/list_request_util_test.go @@ -128,7 +128,59 @@ func TestDeserializePageToken(t *testing.T) { assert.Nil(t, err) assert.Equal(t, token, *actualToken) } +func TestTransformJSONForBackwardCompatibility(t *testing.T) { + tests := []struct { + name string + input string + expected string + expectErr bool + }{ + { + name: "Standard case with multiple replacements", + input: `{"intValue": 1, "stringValue": "test", "longValue": 1234567890}`, + expected: `{"int_value": 1, "string_value": "test", "long_value": 1234567890}`, + expectErr: false, + }, + { + name: "No replacements needed", + input: `{"int_value": 1, "string_value": "test", "long_value": 1234567890}`, + expected: `{"int_value": 1, "string_value": "test", "long_value": 1234567890}`, + expectErr: false, + }, + { + name: "Empty input", + input: ``, + expected: ``, + expectErr: false, + }, + { + name: "Nested JSON structure", + input: `{"data": {"intValue": 5, "stringValue": "nested"}}`, + expected: `{"data": {"int_value": 5, "string_value": "nested"}}`, + expectErr: false, + }, + { + name: "Input with no recognized fields", + input: `{"otherValue": "value"}`, + expected: `{"otherValue": "value"}`, + expectErr: false, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + result, err := transformJSONForBackwardCompatibility(test.input) + + if test.expectErr { + assert.NotNil(t, err, "Expected an error but got none") + return + } + assert.Nil(t, err, "Expected no error but got: %+v", err) + assert.Equal(t, test.expected, result, "Unexpected result for input: %v", test.input) + }) + } +} func TestDeserializePageToken_InvalidEncodingStringError(t *testing.T) { _, err := deserializePageToken("this is a invalid token") assert.Equal(t, codes.InvalidArgument, err.(*util.UserError).ExternalStatusCode()) diff --git a/backend/src/apiserver/server/pipeline_server.go b/backend/src/apiserver/server/pipeline_server.go index 2eae419cb27..fd3dbbf00df 100644 --- a/backend/src/apiserver/server/pipeline_server.go +++ b/backend/src/apiserver/server/pipeline_server.go @@ -20,7 +20,8 @@ import ( "net/url" "path" - "github.com/golang/protobuf/ptypes/empty" + "google.golang.org/protobuf/types/known/emptypb" + apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" @@ -97,15 +98,28 @@ type PipelineServerOptions struct { CollectMetrics bool `json:"collect_metrics,omitempty"` } -type PipelineServer struct { +// BasePipelineServer wraps PipelineServer and PipelineServerV1 +// to enable method sharing. It can be removed once PipelineServerV1 +// is removed. +type BasePipelineServer struct { resourceManager *resource.ResourceManager httpClient *http.Client options *PipelineServerOptions } +type PipelineServer struct { + *BasePipelineServer + apiv2beta1.UnimplementedPipelineServiceServer +} + +type PipelineServerV1 struct { + *BasePipelineServer + apiv1beta1.UnimplementedPipelineServiceServer +} + // Creates a pipeline. Not exported. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) createPipeline(ctx context.Context, pipeline *model.Pipeline) (*model.Pipeline, error) { +func (s *BasePipelineServer) createPipeline(ctx context.Context, pipeline *model.Pipeline) (*model.Pipeline, error) { pipeline.Namespace = s.resourceManager.ReplaceNamespace(pipeline.Namespace) if pipeline.Name == "" { @@ -127,7 +141,7 @@ func (s *PipelineServer) createPipeline(ctx context.Context, pipeline *model.Pip // Creates a pipeline and a pipeline version in a single transaction. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) createPipelineAndPipelineVersion(ctx context.Context, pipeline *model.Pipeline, pipelineUrlStr string) (*model.Pipeline, *model.PipelineVersion, error) { +func (s *BasePipelineServer) createPipelineAndPipelineVersion(ctx context.Context, pipeline *model.Pipeline, pipelineUrlStr string) (*model.Pipeline, *model.PipelineVersion, error) { // Resolve name and namespace pipelineFileName := path.Base(pipelineUrlStr) @@ -187,7 +201,7 @@ func (s *PipelineServer) createPipelineAndPipelineVersion(ctx context.Context, p // Creates a pipeline and a pipeline version in a single transaction. // Supports v1beta1 behavior. -func (s *PipelineServer) CreatePipelineV1(ctx context.Context, request *apiv1beta1.CreatePipelineRequest) (*apiv1beta1.Pipeline, error) { +func (s *PipelineServerV1) CreatePipelineV1(ctx context.Context, request *apiv1beta1.CreatePipelineRequest) (*apiv1beta1.Pipeline, error) { if s.options.CollectMetrics { createPipelineRequests.Inc() createPipelineVersionRequests.Inc() @@ -240,7 +254,7 @@ func (s *PipelineServer) CreatePipeline(ctx context.Context, request *apiv2beta1 // TODO(gkcalat): consider removing as default version is deprecated. This requires changes to v1beta1 proto. // Updates default pipeline version for a given pipeline. // Supports v1beta1 behavior. -func (s *PipelineServer) UpdatePipelineDefaultVersionV1(ctx context.Context, request *apiv1beta1.UpdatePipelineDefaultVersionRequest) (*empty.Empty, error) { +func (s *PipelineServerV1) UpdatePipelineDefaultVersionV1(ctx context.Context, request *apiv1beta1.UpdatePipelineDefaultVersionRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { updatePipelineDefaultVersionRequests.Inc() } @@ -255,12 +269,12 @@ func (s *PipelineServer) UpdatePipelineDefaultVersionV1(ctx context.Context, req if err != nil { return nil, util.Wrapf(err, "Failed to update (v1beta1) default pipeline version to %s for pipeline %s. Check error stack", request.GetVersionId(), request.GetPipelineId()) } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Fetches a pipeline. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) getPipeline(ctx context.Context, pipelineId string) (*model.Pipeline, error) { +func (s *BasePipelineServer) getPipeline(ctx context.Context, pipelineId string) (*model.Pipeline, error) { if pipelineId == "" { return nil, util.NewInvalidInputError("Failed to get a pipeline. Pipeline id cannot be empty") } @@ -278,7 +292,7 @@ func (s *PipelineServer) getPipeline(ctx context.Context, pipelineId string) (*m // Returns a pipeline. // Note, the default pipeline version will be set to be the latest pipeline version. // Supports v1beta behavior. -func (s *PipelineServer) GetPipelineV1(ctx context.Context, request *apiv1beta1.GetPipelineRequest) (*apiv1beta1.Pipeline, error) { +func (s *PipelineServerV1) GetPipelineV1(ctx context.Context, request *apiv1beta1.GetPipelineRequest) (*apiv1beta1.Pipeline, error) { if s.options.CollectMetrics { getPipelineRequests.Inc() } @@ -312,7 +326,7 @@ func (s *PipelineServer) GetPipeline(ctx context.Context, request *apiv2beta1.Ge // Fetches pipeline and (optionally) pipeline version for a given name and namespace. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) getPipelineByName(ctx context.Context, name string, namespace string, apiRequestVersion string) (*model.Pipeline, *model.PipelineVersion, error) { +func (s *BasePipelineServer) getPipelineByName(ctx context.Context, name string, namespace string, apiRequestVersion string) (*model.Pipeline, *model.PipelineVersion, error) { namespace = s.resourceManager.ReplaceNamespace(namespace) resourceAttributes := &authorizationv1.ResourceAttributes{ Namespace: namespace, @@ -338,7 +352,7 @@ func (s *PipelineServer) getPipelineByName(ctx context.Context, name string, nam // Returns a pipeline with the default (latest) pipeline version given a name and a namespace. // Supports v1beta behavior. -func (s *PipelineServer) GetPipelineByNameV1(ctx context.Context, request *apiv1beta1.GetPipelineByNameRequest) (*apiv1beta1.Pipeline, error) { +func (s *PipelineServerV1) GetPipelineByNameV1(ctx context.Context, request *apiv1beta1.GetPipelineByNameRequest) (*apiv1beta1.Pipeline, error) { if s.options.CollectMetrics { getPipelineRequests.Inc() } @@ -372,7 +386,7 @@ func (s *PipelineServer) GetPipelineByName(ctx context.Context, request *apiv2be // Fetches an array of pipelines and an array of pipeline versions for given search query parameters. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) listPipelines(ctx context.Context, namespace string, pageToken string, pageSize int32, sortBy string, opts *list.Options, apiRequestVersion string) ([]*model.Pipeline, []*model.PipelineVersion, int, string, error) { +func (s *BasePipelineServer) listPipelines(ctx context.Context, namespace string, pageToken string, pageSize int32, sortBy string, opts *list.Options, apiRequestVersion string) ([]*model.Pipeline, []*model.PipelineVersion, int, string, error) { // Fill in the default namespace namespace = s.resourceManager.ReplaceNamespace(namespace) resourceAttributes := &authorizationv1.ResourceAttributes{ @@ -403,7 +417,7 @@ func (s *PipelineServer) listPipelines(ctx context.Context, namespace string, pa // Returns pipelines with default pipeline versions for a given query. // Supports v1beta behavior. -func (s *PipelineServer) ListPipelinesV1(ctx context.Context, request *apiv1beta1.ListPipelinesRequest) (*apiv1beta1.ListPipelinesResponse, error) { +func (s *PipelineServerV1) ListPipelinesV1(ctx context.Context, request *apiv1beta1.ListPipelinesRequest) (*apiv1beta1.ListPipelinesResponse, error) { if s.options.CollectMetrics { listPipelineRequests.Inc() } @@ -475,7 +489,7 @@ func (s *PipelineServer) ListPipelines(ctx context.Context, request *apiv2beta1. // Removes a pipeline. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) deletePipeline(ctx context.Context, pipelineId string, cascade bool) error { +func (s *BasePipelineServer) deletePipeline(ctx context.Context, pipelineId string, cascade bool) error { // Fail fast if pipelineId == "" { return util.NewInvalidInputError("Failed to delete a pipeline due missing pipeline id") @@ -495,7 +509,7 @@ func (s *PipelineServer) deletePipeline(ctx context.Context, pipelineId string, // Deletes a pipeline. // Supports v1beta1 behavior. -func (s *PipelineServer) DeletePipelineV1(ctx context.Context, request *apiv1beta1.DeletePipelineRequest) (*empty.Empty, error) { +func (s *PipelineServerV1) DeletePipelineV1(ctx context.Context, request *apiv1beta1.DeletePipelineRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deletePipelineRequests.Inc() } @@ -508,12 +522,12 @@ func (s *PipelineServer) DeletePipelineV1(ctx context.Context, request *apiv1bet pipelineCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Deletes a pipeline. // Supports v2beta1 behavior. -func (s *PipelineServer) DeletePipeline(ctx context.Context, request *apiv2beta1.DeletePipelineRequest) (*empty.Empty, error) { +func (s *PipelineServer) DeletePipeline(ctx context.Context, request *apiv2beta1.DeletePipelineRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deletePipelineRequests.Inc() } @@ -526,7 +540,7 @@ func (s *PipelineServer) DeletePipeline(ctx context.Context, request *apiv2beta1 pipelineCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Returns the default (latest) pipeline template for a given pipeline id. @@ -552,7 +566,7 @@ func (s *PipelineServer) GetTemplate(ctx context.Context, request *apiv1beta1.Ge } // Fetches the latest pipeline version for a given pipeline id. -func (s *PipelineServer) getLatestPipelineVersion(ctx context.Context, pipelineId string) (*model.PipelineVersion, error) { +func (s *BasePipelineServer) getLatestPipelineVersion(ctx context.Context, pipelineId string) (*model.PipelineVersion, error) { if pipelineId == "" { return nil, util.NewInvalidInputError("Failed to get the latest pipeline version as pipeline id is empty") } @@ -568,7 +582,7 @@ func (s *PipelineServer) getLatestPipelineVersion(ctx context.Context, pipelineI // Validates a pipeline version before creating a record in the DB. // Requires Name and PipelineId to be non-empty and presence of PipelineSpec or a valid URI to the pipeline spec. -func (s *PipelineServer) validatePipelineVersionBeforeCreating(p *model.PipelineVersion) error { +func (s *BasePipelineServer) validatePipelineVersionBeforeCreating(p *model.PipelineVersion) error { if p.Name == "" { return util.NewInvalidInputError("name is required") } @@ -590,7 +604,23 @@ func (s *PipelineServer) validatePipelineVersionBeforeCreating(p *model.Pipeline } func NewPipelineServer(resourceManager *resource.ResourceManager, options *PipelineServerOptions) *PipelineServer { - return &PipelineServer{resourceManager: resourceManager, httpClient: http.DefaultClient, options: options} + return &PipelineServer{ + BasePipelineServer: &BasePipelineServer{ + resourceManager: resourceManager, + httpClient: http.DefaultClient, + options: options, + }, + } +} + +func NewPipelineServerV1(resourceManager *resource.ResourceManager, options *PipelineServerOptions) *PipelineServerV1 { + return &PipelineServerV1{ + BasePipelineServer: &BasePipelineServer{ + resourceManager: resourceManager, + httpClient: http.DefaultClient, + options: options, + }, + } } // Creates a pipeline and a pipeline version in a single transaction. @@ -622,7 +652,7 @@ func (s *PipelineServer) CreatePipelineAndVersion(ctx context.Context, request * // Creates a pipeline version from. Not exported. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) createPipelineVersion(ctx context.Context, pv *model.PipelineVersion) (*model.PipelineVersion, error) { +func (s *BasePipelineServer) createPipelineVersion(ctx context.Context, pv *model.PipelineVersion) (*model.PipelineVersion, error) { // Fail if pipeline URL is missing if pv.PipelineSpecURI == "" { return nil, util.NewInvalidInputError("Failed to create a pipeline version due to missing pipeline URL") @@ -680,7 +710,7 @@ func (s *PipelineServer) createPipelineVersion(ctx context.Context, pv *model.Pi // Creates a pipeline version. // Supports v1beta behavior. -func (s *PipelineServer) CreatePipelineVersionV1(ctx context.Context, request *apiv1beta1.CreatePipelineVersionRequest) (*apiv1beta1.PipelineVersion, error) { +func (s *PipelineServerV1) CreatePipelineVersionV1(ctx context.Context, request *apiv1beta1.CreatePipelineVersionRequest) (*apiv1beta1.PipelineVersion, error) { if s.options.CollectMetrics { createPipelineVersionRequests.Inc() } @@ -772,7 +802,7 @@ func (s *PipelineServer) CreatePipelineVersion(ctx context.Context, request *api // Fetches a pipeline version for given pipeline id. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) getPipelineVersion(ctx context.Context, pipelineVersionId string) (*model.PipelineVersion, error) { +func (s *BasePipelineServer) getPipelineVersion(ctx context.Context, pipelineVersionId string) (*model.PipelineVersion, error) { // Check authorization resourceAttributes := &authorizationv1.ResourceAttributes{ Verb: common.RbacResourceVerbGet, @@ -786,7 +816,7 @@ func (s *PipelineServer) getPipelineVersion(ctx context.Context, pipelineVersion // Returns a pipeline version. // Supports v1beta behavior. -func (s *PipelineServer) GetPipelineVersionV1(ctx context.Context, request *apiv1beta1.GetPipelineVersionRequest) (*apiv1beta1.PipelineVersion, error) { +func (s *PipelineServerV1) GetPipelineVersionV1(ctx context.Context, request *apiv1beta1.GetPipelineVersionRequest) (*apiv1beta1.PipelineVersion, error) { if s.options.CollectMetrics { getPipelineVersionRequests.Inc() } @@ -818,7 +848,7 @@ func (s *PipelineServer) GetPipelineVersion(ctx context.Context, request *apiv2b // Fetches an array of pipeline versions for given search query parameters. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) listPipelineVersions(ctx context.Context, pipelineId string, pageToken string, pageSize int32, sortBy string, opts *list.Options) ([]*model.PipelineVersion, int, string, error) { +func (s *BasePipelineServer) listPipelineVersions(ctx context.Context, pipelineId string, pageToken string, pageSize int32, sortBy string, opts *list.Options) ([]*model.PipelineVersion, int, string, error) { // Fail fast of pipeline id or namespace are missing if pipelineId == "" { return nil, 0, "", util.NewInvalidInputError("Failed to list pipeline versions. Pipeline id cannot be empty") @@ -843,7 +873,7 @@ func (s *PipelineServer) listPipelineVersions(ctx context.Context, pipelineId st // Returns an array of pipeline versions for a given query. // Supports v1beta1 behavior. -func (s *PipelineServer) ListPipelineVersionsV1(ctx context.Context, request *apiv1beta1.ListPipelineVersionsRequest) (*apiv1beta1.ListPipelineVersionsResponse, error) { +func (s *PipelineServerV1) ListPipelineVersionsV1(ctx context.Context, request *apiv1beta1.ListPipelineVersionsRequest) (*apiv1beta1.ListPipelineVersionsResponse, error) { if s.options.CollectMetrics { listPipelineVersionRequests.Inc() } @@ -912,7 +942,7 @@ func (s *PipelineServer) ListPipelineVersions(ctx context.Context, request *apiv // Removes a pipeline version. // Applies common logic on v1beta1 and v2beta1 API. -func (s *PipelineServer) deletePipelineVersion(ctx context.Context, pipelineId string, pipelineVersionId string) error { +func (s *BasePipelineServer) deletePipelineVersion(ctx context.Context, pipelineId string, pipelineVersionId string) error { // Fail fast if pipelineId == "" { return util.NewInvalidInputError("Failed to delete a pipeline version id %v due missing pipeline id", pipelineVersionId) @@ -935,7 +965,7 @@ func (s *PipelineServer) deletePipelineVersion(ctx context.Context, pipelineId s // Deletes a pipeline version. // Supports v1beta1 behavior. -func (s *PipelineServer) DeletePipelineVersionV1(ctx context.Context, request *apiv1beta1.DeletePipelineVersionRequest) (*empty.Empty, error) { +func (s *PipelineServerV1) DeletePipelineVersionV1(ctx context.Context, request *apiv1beta1.DeletePipelineVersionRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deletePipelineVersionRequests.Inc() } @@ -960,12 +990,12 @@ func (s *PipelineServer) DeletePipelineVersionV1(ctx context.Context, request *a if s.options.CollectMetrics { pipelineVersionCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Deletes a pipeline version. // Supports v2beta1 behavior. -func (s *PipelineServer) DeletePipelineVersion(ctx context.Context, request *apiv2beta1.DeletePipelineVersionRequest) (*empty.Empty, error) { +func (s *PipelineServer) DeletePipelineVersion(ctx context.Context, request *apiv2beta1.DeletePipelineVersionRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deletePipelineVersionRequests.Inc() } @@ -988,7 +1018,7 @@ func (s *PipelineServer) DeletePipelineVersion(ctx context.Context, request *api if s.options.CollectMetrics { pipelineVersionCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Returns pipeline template. @@ -1012,7 +1042,7 @@ func (s *PipelineServer) GetPipelineVersionTemplate(ctx context.Context, request // Checks if a user can access a pipeline version. // Adds namespace of the parent pipeline if version id is not empty, // API group, version, and resource type. -func (s *PipelineServer) canAccessPipelineVersion(ctx context.Context, versionId string, resourceAttributes *authorizationv1.ResourceAttributes) error { +func (s *BasePipelineServer) canAccessPipelineVersion(ctx context.Context, versionId string, resourceAttributes *authorizationv1.ResourceAttributes) error { if !common.IsMultiUserMode() { // Skip authorization if not multi-user mode. return nil @@ -1031,7 +1061,7 @@ func (s *PipelineServer) canAccessPipelineVersion(ctx context.Context, versionId // Checks if a user can access a pipeline. // Adds parent namespace if pipeline id is not empty, // API group, version, and resource type. -func (s *PipelineServer) canAccessPipeline(ctx context.Context, pipelineId string, resourceAttributes *authorizationv1.ResourceAttributes) error { +func (s *BasePipelineServer) canAccessPipeline(ctx context.Context, pipelineId string, resourceAttributes *authorizationv1.ResourceAttributes) error { if !common.IsMultiUserMode() { // Skip authorization if not multi-user mode. return nil diff --git a/backend/src/apiserver/server/pipeline_server_test.go b/backend/src/apiserver/server/pipeline_server_test.go index 3671ac24026..217c52801af 100644 --- a/backend/src/apiserver/server/pipeline_server_test.go +++ b/backend/src/apiserver/server/pipeline_server_test.go @@ -35,6 +35,22 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" ) +func createPipelineServerV1(resourceManager *resource.ResourceManager, httpClient *http.Client) *PipelineServerV1 { + return &PipelineServerV1{ + BasePipelineServer: &BasePipelineServer{ + resourceManager: resourceManager, httpClient: httpClient, options: &PipelineServerOptions{CollectMetrics: false}, + }, + } +} + +func createPipelineServer(resourceManager *resource.ResourceManager, httpClient *http.Client) *PipelineServer { + return &PipelineServer{ + BasePipelineServer: &BasePipelineServer{ + resourceManager: resourceManager, httpClient: httpClient, options: &PipelineServerOptions{CollectMetrics: false}, + }, + } +} + func TestBuildPipelineName_QueryStringNotEmpty(t *testing.T) { pipelineName := buildPipelineName("pipeline one", "", "file one") assert.Equal(t, "pipeline one", pipelineName) @@ -63,7 +79,7 @@ func TestCreatePipelineV1_YAML(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipeline, err := pipelineServer.CreatePipelineV1(context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ Url: &api.Url{PipelineUrl: httpServer.URL + "/arguments-parameters.yaml"}, @@ -92,7 +108,7 @@ func TestCreatePipelineV1_LargeFile(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipeline, err := pipelineServer.CreatePipelineV1(context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ Url: &api.Url{PipelineUrl: "https://raw.githubusercontent.com/kubeflow/pipelines/master/sdk/python/test_data/pipelines/xgboost_sample_pipeline.yaml"}, @@ -121,7 +137,7 @@ func TestCreatePipelineV1_Tarball(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipeline, err := pipelineServer.CreatePipelineV1(context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ Url: &api.Url{PipelineUrl: httpServer.URL + "/arguments_tarball/arguments.tar.gz"}, @@ -151,7 +167,7 @@ func TestCreatePipelineV1_InvalidYAML(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) createdPipeline, err := pipelineServer.CreatePipelineV1( context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ @@ -173,7 +189,7 @@ func TestCreatePipelineV1_InvalidURL(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) createdPipeline, err := pipelineServer.CreatePipelineV1( context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ @@ -195,7 +211,7 @@ func TestCreatePipelineV1_MissingUrl(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) createdPipeline, err := pipelineServer.CreatePipelineV1( context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ @@ -225,7 +241,7 @@ func TestCreatePipelineV1_ExistingPipeline(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipelineServer.CreatePipelineV1( context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ @@ -274,9 +290,7 @@ func TestCreatePipelineVersionV1_YAML(t *testing.T) { util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{ - resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}, - } + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipelineVersion, err := pipelineServer.CreatePipelineVersionV1( context.Background(), &api.CreatePipelineVersionRequest{ Version: &api.PipelineVersion{ @@ -319,7 +333,7 @@ func TestCreatePipelineVersion_InvalidYAML(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) _, err := pipelineServer.CreatePipelineVersionV1( context.Background(), &api.CreatePipelineVersionRequest{ Version: &api.PipelineVersion{ @@ -351,7 +365,7 @@ func TestCreatePipelineVersion_Tarball(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipelineVersion, err := pipelineServer.CreatePipelineVersionV1( context.Background(), &api.CreatePipelineVersionRequest{ Version: &api.PipelineVersion{ @@ -393,7 +407,7 @@ func TestCreatePipelineVersion_InvalidURL(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) _, err := pipelineServer.CreatePipelineVersionV1(context.Background(), &api.CreatePipelineVersionRequest{ Version: &api.PipelineVersion{ PackageUrl: &api.Url{ @@ -424,7 +438,7 @@ func TestListPipelineVersion_NoResourceKey(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) _, err := pipelineServer.ListPipelineVersionsV1(context.Background(), &api.ListPipelineVersionsRequest{ ResourceKey: nil, @@ -440,7 +454,7 @@ func TestListPipelinesPublic(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) _, err := pipelineServer.ListPipelinesV1(context.Background(), &api.ListPipelinesRequest{ PageSize: 20, @@ -458,7 +472,7 @@ func TestGetPipelineByName_OK(t *testing.T) { defer httpServer.Close() clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipeline, err := pipelineServer.CreatePipelineV1(context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ Url: &api.Url{PipelineUrl: httpServer.URL + "/arguments-parameters.yaml"}, @@ -491,7 +505,7 @@ func TestGetPipelineByName_Shared_OK(t *testing.T) { defer httpServer.Close() clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipeline, err := pipelineServer.CreatePipelineV1(context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ Url: &api.Url{PipelineUrl: httpServer.URL + "/arguments-parameters.yaml"}, @@ -519,7 +533,7 @@ func TestGetPipelineByName_NotFound(t *testing.T) { defer httpServer.Close() clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) _, err := pipelineServer.GetPipelineByNameV1(context.Background(), &api.GetPipelineByNameRequest{ Name: "foo", @@ -533,7 +547,7 @@ func TestGetPipelineByName_WrongNameSpace(t *testing.T) { defer httpServer.Close() clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipeline, err := pipelineServer.CreatePipelineV1(context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ Url: &api.Url{PipelineUrl: httpServer.URL + "/arguments-parameters.yaml"}, @@ -570,7 +584,7 @@ func TestCreatePipelineVersionAndCheckLatestVersion(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServerV1(resourceManager, httpServer.Client()) pipeline, err := pipelineServer.CreatePipelineV1(context.Background(), &api.CreatePipelineRequest{ Pipeline: &api.Pipeline{ Url: &api.Url{PipelineUrl: httpServer.URL + "/arguments_tarball/arguments.tar.gz"}, @@ -586,7 +600,7 @@ func TestCreatePipelineVersionAndCheckLatestVersion(t *testing.T) { clientManager.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal("123e4567-e89b-12d3-a456-526655440001", nil)) resourceManager = resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer = PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer = createPipelineServerV1(resourceManager, httpServer.Client()) pipelineVersion, err := pipelineServer.CreatePipelineVersionV1( context.Background(), &api.CreatePipelineVersionRequest{ Version: &api.PipelineVersion{ @@ -640,7 +654,7 @@ func TestPipelineServer_CreatePipeline(t *testing.T) { defer httpServer.Close() clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer := createPipelineServer(resourceManager, httpServer.Client()) type args struct { pipeline *model.Pipeline @@ -709,7 +723,7 @@ func TestPipelineServer_CreatePipeline(t *testing.T) { t.Run(tt.name, func(t *testing.T) { clientManager.UpdateUUID(util.NewFakeUUIDGeneratorOrFatal(tt.id, nil)) resourceManager = resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer = PipelineServer{resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}} + pipelineServer = createPipelineServer(resourceManager, httpServer.Client()) got, err := pipelineServer.CreatePipeline(context.Background(), &apiv2.CreatePipelineRequest{Pipeline: tt.arg}) if tt.wantErr { assert.NotNil(t, err) @@ -866,9 +880,7 @@ func TestPipelineServer_CreatePipelineAndVersion_v2(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal( util.NewFakeTimeForEpoch()) resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - pipelineServer := PipelineServer{ - resourceManager: resourceManager, httpClient: httpServer.Client(), options: &PipelineServerOptions{CollectMetrics: false}, - } + pipelineServer := createPipelineServer(resourceManager, httpServer.Client()) t.Run(tt.name, func(t *testing.T) { got, err := pipelineServer.CreatePipelineAndVersion(context.Background(), tt.request) if tt.wantErr { diff --git a/backend/src/apiserver/server/pipeline_upload_server.go b/backend/src/apiserver/server/pipeline_upload_server.go index 47fb2365d1f..c1b08c8cfeb 100644 --- a/backend/src/apiserver/server/pipeline_upload_server.go +++ b/backend/src/apiserver/server/pipeline_upload_server.go @@ -20,8 +20,10 @@ import ( "fmt" "net/http" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "github.com/golang/glog" - "github.com/golang/protobuf/jsonpb" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" "github.com/kubeflow/pipelines/backend/src/apiserver/model" @@ -156,18 +158,29 @@ func (s *PipelineUploadServer) uploadPipeline(api_version string, w http.Respons pipelineVersionCount.Inc() } - marshaler := &jsonpb.Marshaler{EnumsAsInts: false, OrigName: true} - + var messageToMarshal proto.Message if api_version == "v1beta1" { - err = marshaler.Marshal(w, toApiPipelineV1(newPipeline, newPipelineVersion)) + messageToMarshal = toApiPipelineV1(newPipeline, newPipelineVersion) } else if api_version == "v2beta1" { - err = marshaler.Marshal(w, toApiPipeline(newPipeline)) + messageToMarshal = toApiPipeline(newPipeline) } else { s.writeErrorToResponse(w, http.StatusInternalServerError, util.Wrap(err, "Failed to create a pipeline. Invalid API version")) return } + + // Marshal the message to bytes + marshaler := &protojson.MarshalOptions{ + UseProtoNames: true, + // Note: Default behavior in protojson is to output enum names (strings). + } + data, err := marshaler.Marshal(messageToMarshal) + if err != nil { + s.writeErrorToResponse(w, http.StatusInternalServerError, util.Wrap(err, "Failed to create a pipeline. Marshaling error")) + return + } + _, err = w.Write(data) if err != nil { - s.writeErrorToResponse(w, http.StatusInternalServerError, util.Wrap(err, "Failed to create a pipeline due to error marshalling the pipeline")) + s.writeErrorToResponse(w, http.StatusInternalServerError, util.Wrap(err, "Failed to create a pipeline. Write error.")) return } } @@ -256,18 +269,28 @@ func (s *PipelineUploadServer) uploadPipelineVersion(api_version string, w http. return } - marshaler := &jsonpb.Marshaler{EnumsAsInts: false, OrigName: true} + var messageToMarshal proto.Message if api_version == "v1beta1" { - err = marshaler.Marshal(w, toApiPipelineVersionV1(newPipelineVersion)) + messageToMarshal = toApiPipelineVersionV1(newPipelineVersion) } else if api_version == "v2beta1" { - err = marshaler.Marshal(w, toApiPipelineVersion(newPipelineVersion)) + messageToMarshal = toApiPipelineVersion(newPipelineVersion) } else { s.writeErrorToResponse(w, http.StatusInternalServerError, util.Wrap(err, "Failed to create a pipeline version. Invalid API version")) return } - + // Marshal the message to bytes + marshaler := &protojson.MarshalOptions{ + UseProtoNames: true, + // Note: Default behavior in protojson is to output enum names (strings). + } + data, err := marshaler.Marshal(messageToMarshal) + if err != nil { + s.writeErrorToResponse(w, http.StatusInternalServerError, util.Wrap(err, "Failed to create a pipeline version. Marshaling error")) + return + } + _, err = w.Write(data) if err != nil { - s.writeErrorToResponse(w, http.StatusInternalServerError, util.Wrap(err, "Failed to create a pipeline version due to marshalling error")) + s.writeErrorToResponse(w, http.StatusInternalServerError, util.Wrap(err, "Failed to create a pipeline version. Write error.")) return } diff --git a/backend/src/apiserver/server/report_server.go b/backend/src/apiserver/server/report_server.go index 5667a0191ca..fcda727f280 100644 --- a/backend/src/apiserver/server/report_server.go +++ b/backend/src/apiserver/server/report_server.go @@ -18,10 +18,11 @@ import ( "context" "encoding/json" + "google.golang.org/protobuf/types/known/emptypb" + "github.com/kubeflow/pipelines/backend/src/apiserver/common" authorizationv1 "k8s.io/api/authorization/v1" - "github.com/golang/protobuf/ptypes/empty" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/model" @@ -30,12 +31,25 @@ import ( scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1" ) -type ReportServer struct { +// BaseReportServer wraps ReportServer and ReportServerV1 +// to enable method sharing. It can be removed once ReportServerV1 +// is removed. +type BaseReportServer struct { resourceManager *resource.ResourceManager } +type ReportServer struct { + *BaseReportServer + apiv2beta1.UnimplementedReportServiceServer +} + +type ReportServerV1 struct { + *BaseReportServer + apiv1beta1.UnimplementedReportServiceServer +} + // Extracts task details from an execution spec and reports them to storage. -func (s ReportServer) reportTasksFromExecution(execSpec util.ExecutionSpec, runId string) ([]*model.Task, error) { +func (s *BaseReportServer) reportTasksFromExecution(execSpec util.ExecutionSpec, runId string) ([]*model.Task, error) { if !execSpec.ExecutionStatus().HasNodes() { return nil, nil } @@ -47,7 +61,7 @@ func (s ReportServer) reportTasksFromExecution(execSpec util.ExecutionSpec, runI } // Reports a workflow. -func (s *ReportServer) reportWorkflow(ctx context.Context, workflow string) (*empty.Empty, error) { +func (s *BaseReportServer) reportWorkflow(ctx context.Context, workflow string) (*emptypb.Empty, error) { execSpec, err := validateReportWorkflowRequest(workflow) if err != nil { return nil, util.Wrap(err, "Report workflow failed") @@ -73,23 +87,23 @@ func (s *ReportServer) reportWorkflow(ctx context.Context, workflow string) (*em if err != nil { return nil, util.Wrap(err, "Failed to report task details") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *ReportServer) ReportWorkflowV1(ctx context.Context, +func (s *ReportServerV1) ReportWorkflowV1(ctx context.Context, request *apiv1beta1.ReportWorkflowRequest, -) (*empty.Empty, error) { +) (*emptypb.Empty, error) { return s.reportWorkflow(ctx, request.GetWorkflow()) } func (s *ReportServer) ReportWorkflow(ctx context.Context, request *apiv2beta1.ReportWorkflowRequest, -) (*empty.Empty, error) { +) (*emptypb.Empty, error) { return s.reportWorkflow(ctx, request.GetWorkflow()) } // Reports a scheduled workflow. -func (s *ReportServer) reportScheduledWorkflow(ctx context.Context, swf string) (*empty.Empty, error) { +func (s *BaseReportServer) reportScheduledWorkflow(ctx context.Context, swf string) (*emptypb.Empty, error) { scheduledWorkflow, err := validateReportScheduledWorkflowRequest(swf) if err != nil { return nil, util.Wrap(err, "Report scheduled workflow failed") @@ -107,18 +121,18 @@ func (s *ReportServer) reportScheduledWorkflow(ctx context.Context, swf string) if err != nil { return nil, err } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } -func (s *ReportServer) ReportScheduledWorkflowV1(ctx context.Context, +func (s *ReportServerV1) ReportScheduledWorkflowV1(ctx context.Context, request *apiv1beta1.ReportScheduledWorkflowRequest, -) (*empty.Empty, error) { +) (*emptypb.Empty, error) { return s.reportScheduledWorkflow(ctx, request.GetScheduledWorkflow()) } func (s *ReportServer) ReportScheduledWorkflow(ctx context.Context, request *apiv2beta1.ReportScheduledWorkflowRequest, -) (*empty.Empty, error) { +) (*emptypb.Empty, error) { return s.reportScheduledWorkflow(ctx, request.GetScheduledWorkflow()) } @@ -159,7 +173,7 @@ func validateReportScheduledWorkflowRequest(swfManifest string) (*util.Scheduled return swf, nil } -func (s *ReportServer) canAccessWorkflow(ctx context.Context, executionName string, resourceAttributes *authorizationv1.ResourceAttributes) error { +func (s *BaseReportServer) canAccessWorkflow(ctx context.Context, executionName string, resourceAttributes *authorizationv1.ResourceAttributes) error { resourceAttributes.Group = common.RbacPipelinesGroup resourceAttributes.Version = common.RbacPipelinesVersion err := s.resourceManager.IsAuthorized(ctx, resourceAttributes) @@ -170,5 +184,17 @@ func (s *ReportServer) canAccessWorkflow(ctx context.Context, executionName stri } func NewReportServer(resourceManager *resource.ResourceManager) *ReportServer { - return &ReportServer{resourceManager: resourceManager} + return &ReportServer{ + BaseReportServer: &BaseReportServer{ + resourceManager: resourceManager, + }, + } +} + +func NewReportServerV1(resourceManager *resource.ResourceManager) *ReportServerV1 { + return &ReportServerV1{ + BaseReportServer: &BaseReportServer{ + resourceManager: resourceManager, + }, + } } diff --git a/backend/src/apiserver/server/report_server_test.go b/backend/src/apiserver/server/report_server_test.go index ebe0464b7e9..9d2b5c6f90e 100644 --- a/backend/src/apiserver/server/report_server_test.go +++ b/backend/src/apiserver/server/report_server_test.go @@ -33,7 +33,11 @@ import ( func TestReportWorkflowV1(t *testing.T) { clientManager, resourceManager, run := initWithOneTimeRun(t) defer clientManager.Close() - reportServer := NewReportServer(resourceManager) + reportServer := &ReportServerV1{ + BaseReportServer: &BaseReportServer{ + resourceManager: resourceManager, + }, + } workflow := util.NewWorkflow(&v1alpha1.Workflow{ TypeMeta: metav1.TypeMeta{ @@ -140,7 +144,7 @@ func TestReportWorkflow(t *testing.T) { func TestReportWorkflow_ValidationFailed(t *testing.T) { clientManager, resourceManager, run := initWithOneTimeRun(t) defer clientManager.Close() - reportServer := NewReportServer(resourceManager) + reportServer := NewReportServerV1(resourceManager) workflow := util.NewWorkflow(&v1alpha1.Workflow{ TypeMeta: metav1.TypeMeta{ diff --git a/backend/src/apiserver/server/run_server.go b/backend/src/apiserver/server/run_server.go index a850fa9bdc9..96392b77ea4 100644 --- a/backend/src/apiserver/server/run_server.go +++ b/backend/src/apiserver/server/run_server.go @@ -17,8 +17,9 @@ package server import ( "context" + "google.golang.org/protobuf/types/known/emptypb" + "github.com/golang/glog" - "github.com/golang/protobuf/ptypes/empty" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" apiv2beta1 "github.com/kubeflow/pipelines/backend/api/v2beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" @@ -95,18 +96,45 @@ type RunServerOptions struct { CollectMetrics bool `json:"collect_metrics,omitempty"` } -type RunServer struct { +// BaseRunServer wraps RunServer and RunServerV1 +// to enable method sharing. It can be removed once RunServerV1 +// is removed. +type BaseRunServer struct { resourceManager *resource.ResourceManager options *RunServerOptions } +type RunServer struct { + *BaseRunServer + apiv2beta1.UnimplementedRunServiceServer +} + +type RunServerV1 struct { + *BaseRunServer + apiv1beta1.UnimplementedRunServiceServer +} + func NewRunServer(resourceManager *resource.ResourceManager, options *RunServerOptions) *RunServer { - return &RunServer{resourceManager: resourceManager, options: options} + return &RunServer{ + BaseRunServer: &BaseRunServer{ + resourceManager: resourceManager, + options: options, + }, + } +} + +func NewRunServerV1(resourceManager *resource.ResourceManager, options *RunServerOptions) *RunServerV1 { + return &RunServerV1{ + BaseRunServer: &BaseRunServer{ + resourceManager: resourceManager, + options: options, + }, + } } // Creates a run. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) createRun(ctx context.Context, run *model.Run) (*model.Run, error) { +func (s *BaseRunServer) createRun(ctx context.Context, run *model.Run) (*model.Run, error) { // Validate user inputs if run.DisplayName == "" { return nil, util.Wrapf(util.NewInvalidInputError("The run name is empty. Please specify a valid name"), "Failed to create a run due to invalid name") @@ -133,7 +161,7 @@ func (s *RunServer) createRun(ctx context.Context, run *model.Run) (*model.Run, // Creates a run. // Supports v1beta1 behavior. -func (s *RunServer) CreateRunV1(ctx context.Context, request *apiv1beta1.CreateRunRequest) (*apiv1beta1.RunDetail, error) { +func (s *RunServerV1) CreateRunV1(ctx context.Context, request *apiv1beta1.CreateRunRequest) (*apiv1beta1.RunDetail, error) { if s.options.CollectMetrics { createRunRequests.Inc() } @@ -156,7 +184,7 @@ func (s *RunServer) CreateRunV1(ctx context.Context, request *apiv1beta1.CreateR // Fetches a run. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) getRun(ctx context.Context, runId string) (*model.Run, error) { +func (s *BaseRunServer) getRun(ctx context.Context, runId string) (*model.Run, error) { err := s.canAccessRun(ctx, runId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbGet}) if err != nil { return nil, util.Wrap(err, "Failed to authorize the request") @@ -170,7 +198,7 @@ func (s *RunServer) getRun(ctx context.Context, runId string) (*model.Run, error // Fetches a run. // Supports v1beta1 behavior. -func (s *RunServer) GetRunV1(ctx context.Context, request *apiv1beta1.GetRunRequest) (*apiv1beta1.RunDetail, error) { +func (s *RunServerV1) GetRunV1(ctx context.Context, request *apiv1beta1.GetRunRequest) (*apiv1beta1.RunDetail, error) { if s.options.CollectMetrics { getRunRequests.Inc() } @@ -185,7 +213,7 @@ func (s *RunServer) GetRunV1(ctx context.Context, request *apiv1beta1.GetRunRequ // Fetches all runs that conform to the specified filter and listing options. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) listRuns(ctx context.Context, pageToken string, pageSize int, sortBy string, opts *list.Options, namespace string, experimentId string) ([]*model.Run, int, string, error) { +func (s *BaseRunServer) listRuns(ctx context.Context, pageToken string, pageSize int, sortBy string, opts *list.Options, namespace string, experimentId string) ([]*model.Run, int, string, error) { namespace = s.resourceManager.ReplaceNamespace(namespace) if experimentId != "" { ns, err := s.resourceManager.GetNamespaceFromExperimentId(experimentId) @@ -223,7 +251,7 @@ func (s *RunServer) listRuns(ctx context.Context, pageToken string, pageSize int // Fetches runs given query parameters. // Supports v1beta1 behavior. -func (s *RunServer) ListRunsV1(ctx context.Context, r *apiv1beta1.ListRunsRequest) (*apiv1beta1.ListRunsResponse, error) { +func (s *RunServerV1) ListRunsV1(ctx context.Context, r *apiv1beta1.ListRunsRequest) (*apiv1beta1.ListRunsResponse, error) { if s.options.CollectMetrics { listRunRequests.Inc() } @@ -266,7 +294,7 @@ func (s *RunServer) ListRunsV1(ctx context.Context, r *apiv1beta1.ListRunsReques // Archives a run. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) archiveRun(ctx context.Context, runId string) error { +func (s *BaseRunServer) archiveRun(ctx context.Context, runId string) error { err := s.canAccessRun(ctx, runId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbArchive}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -276,7 +304,7 @@ func (s *RunServer) archiveRun(ctx context.Context, runId string) error { // Archives a run. // Supports v1beta1 behavior. -func (s *RunServer) ArchiveRunV1(ctx context.Context, request *apiv1beta1.ArchiveRunRequest) (*empty.Empty, error) { +func (s *RunServerV1) ArchiveRunV1(ctx context.Context, request *apiv1beta1.ArchiveRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { archiveRunRequests.Inc() } @@ -284,12 +312,12 @@ func (s *RunServer) ArchiveRunV1(ctx context.Context, request *apiv1beta1.Archiv if err != nil { return nil, util.Wrap(err, "Failed to archive a v1beta1 run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Un-archives a run. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) unarchiveRun(ctx context.Context, runId string) error { +func (s *BaseRunServer) unarchiveRun(ctx context.Context, runId string) error { err := s.canAccessRun(ctx, runId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbUnarchive}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -299,7 +327,7 @@ func (s *RunServer) unarchiveRun(ctx context.Context, runId string) error { // Un-archives a run. // Supports v1beta1 behavior. -func (s *RunServer) UnarchiveRunV1(ctx context.Context, request *apiv1beta1.UnarchiveRunRequest) (*empty.Empty, error) { +func (s *RunServerV1) UnarchiveRunV1(ctx context.Context, request *apiv1beta1.UnarchiveRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { unarchiveRunRequests.Inc() } @@ -307,12 +335,12 @@ func (s *RunServer) UnarchiveRunV1(ctx context.Context, request *apiv1beta1.Unar if err != nil { return nil, util.Wrap(err, "Failed to unarchive a v1beta1 run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Deletes a run. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) deleteRun(ctx context.Context, runId string) error { +func (s *BaseRunServer) deleteRun(ctx context.Context, runId string) error { err := s.canAccessRun(ctx, runId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbDelete}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -322,7 +350,7 @@ func (s *RunServer) deleteRun(ctx context.Context, runId string) error { // Deletes a run. // Supports v1beta1 behavior. -func (s *RunServer) DeleteRunV1(ctx context.Context, request *apiv1beta1.DeleteRunRequest) (*empty.Empty, error) { +func (s *RunServerV1) DeleteRunV1(ctx context.Context, request *apiv1beta1.DeleteRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deleteRunRequests.Inc() } @@ -334,12 +362,12 @@ func (s *RunServer) DeleteRunV1(ctx context.Context, request *apiv1beta1.DeleteR runCount.Dec() } } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Reports run metrics. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) reportRunMetrics(ctx context.Context, metrics []*model.RunMetric, runId string) ([]map[string]string, error) { +func (s *BaseRunServer) reportRunMetrics(ctx context.Context, metrics []*model.RunMetric, runId string) ([]map[string]string, error) { err := s.canAccessRun(ctx, runId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbReportMetrics}) if err != nil { return nil, util.Wrap(err, "Failed to authorize the request") @@ -390,7 +418,7 @@ func (s *RunServer) reportRunMetrics(ctx context.Context, metrics []*model.RunMe // Reports run metrics. // Supports v1beta1 API. -func (s *RunServer) ReportRunMetricsV1(ctx context.Context, request *apiv1beta1.ReportRunMetricsRequest) (*apiv1beta1.ReportRunMetricsResponse, error) { +func (s *RunServerV1) ReportRunMetricsV1(ctx context.Context, request *apiv1beta1.ReportRunMetricsRequest) (*apiv1beta1.ReportRunMetricsResponse, error) { if s.options.CollectMetrics { reportRunMetricsRequests.Inc() } @@ -417,7 +445,7 @@ func (s *RunServer) ReportRunMetricsV1(ctx context.Context, request *apiv1beta1. // Reads an artifact. // Supports v1beta1 behavior. -func (s *RunServer) ReadArtifactV1(ctx context.Context, request *apiv1beta1.ReadArtifactRequest) (*apiv1beta1.ReadArtifactResponse, error) { +func (s *RunServerV1) ReadArtifactV1(ctx context.Context, request *apiv1beta1.ReadArtifactRequest) (*apiv1beta1.ReadArtifactResponse, error) { if s.options.CollectMetrics { readArtifactRequests.Inc() } @@ -439,7 +467,7 @@ func (s *RunServer) ReadArtifactV1(ctx context.Context, request *apiv1beta1.Read // Terminates a run. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) terminateRun(ctx context.Context, runId string) error { +func (s *BaseRunServer) terminateRun(ctx context.Context, runId string) error { err := s.canAccessRun(ctx, runId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbTerminate}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -449,7 +477,7 @@ func (s *RunServer) terminateRun(ctx context.Context, runId string) error { // Retries a run. // Applies common logic on v1beta1 and v2beta1 API. -func (s *RunServer) retryRun(ctx context.Context, runId string) error { +func (s *BaseRunServer) retryRun(ctx context.Context, runId string) error { err := s.canAccessRun(ctx, runId, &authorizationv1.ResourceAttributes{Verb: common.RbacResourceVerbRetry}) if err != nil { return util.Wrap(err, "Failed to authorize the request") @@ -459,7 +487,7 @@ func (s *RunServer) retryRun(ctx context.Context, runId string) error { // Terminates a run. // Supports v1beta1 behavior. -func (s *RunServer) TerminateRunV1(ctx context.Context, request *apiv1beta1.TerminateRunRequest) (*empty.Empty, error) { +func (s *RunServerV1) TerminateRunV1(ctx context.Context, request *apiv1beta1.TerminateRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { terminateRunRequests.Inc() } @@ -467,12 +495,12 @@ func (s *RunServer) TerminateRunV1(ctx context.Context, request *apiv1beta1.Term if err != nil { return nil, util.Wrap(err, "Failed to terminate a v1beta1 run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Retries a run. // Supports v1beta1 behavior. -func (s *RunServer) RetryRunV1(ctx context.Context, request *apiv1beta1.RetryRunRequest) (*empty.Empty, error) { +func (s *RunServerV1) RetryRunV1(ctx context.Context, request *apiv1beta1.RetryRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { retryRunRequests.Inc() } @@ -482,7 +510,7 @@ func (s *RunServer) RetryRunV1(ctx context.Context, request *apiv1beta1.RetryRun return nil, util.Wrap(err, "Failed to retry a run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Creates a run. @@ -542,7 +570,7 @@ func (s *RunServer) ListRuns(ctx context.Context, r *apiv2beta1.ListRunsRequest) // Archives a run. // Supports v2beta1 behavior. -func (s *RunServer) ArchiveRun(ctx context.Context, request *apiv2beta1.ArchiveRunRequest) (*empty.Empty, error) { +func (s *RunServer) ArchiveRun(ctx context.Context, request *apiv2beta1.ArchiveRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { archiveRunRequests.Inc() } @@ -550,12 +578,12 @@ func (s *RunServer) ArchiveRun(ctx context.Context, request *apiv2beta1.ArchiveR if err != nil { return nil, util.Wrap(err, "Failed to archive a run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Un-archives a run. // Supports v2beta1 behavior. -func (s *RunServer) UnarchiveRun(ctx context.Context, request *apiv2beta1.UnarchiveRunRequest) (*empty.Empty, error) { +func (s *RunServer) UnarchiveRun(ctx context.Context, request *apiv2beta1.UnarchiveRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { unarchiveRunRequests.Inc() } @@ -563,12 +591,12 @@ func (s *RunServer) UnarchiveRun(ctx context.Context, request *apiv2beta1.Unarch if err != nil { return nil, util.Wrap(err, "Failed to unarchive a run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Deletes a run. // Supports v2beta1 behavior. -func (s *RunServer) DeleteRun(ctx context.Context, request *apiv2beta1.DeleteRunRequest) (*empty.Empty, error) { +func (s *RunServer) DeleteRun(ctx context.Context, request *apiv2beta1.DeleteRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { deleteRunRequests.Inc() } @@ -578,7 +606,7 @@ func (s *RunServer) DeleteRun(ctx context.Context, request *apiv2beta1.DeleteRun if s.options.CollectMetrics { runCount.Dec() } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Reads an artifact. @@ -605,7 +633,7 @@ func (s *RunServer) ReadArtifact(ctx context.Context, request *apiv2beta1.ReadAr // Terminates a run. // Supports v2beta1 behavior. -func (s *RunServer) TerminateRun(ctx context.Context, request *apiv2beta1.TerminateRunRequest) (*empty.Empty, error) { +func (s *RunServer) TerminateRun(ctx context.Context, request *apiv2beta1.TerminateRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { terminateRunRequests.Inc() } @@ -613,12 +641,12 @@ func (s *RunServer) TerminateRun(ctx context.Context, request *apiv2beta1.Termin if err != nil { return nil, util.Wrap(err, "Failed to terminate a run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Retries a run. // Supports v2beta1 behavior. -func (s *RunServer) RetryRun(ctx context.Context, request *apiv2beta1.RetryRunRequest) (*empty.Empty, error) { +func (s *RunServer) RetryRun(ctx context.Context, request *apiv2beta1.RetryRunRequest) (*emptypb.Empty, error) { if s.options.CollectMetrics { retryRunRequests.Inc() } @@ -628,13 +656,13 @@ func (s *RunServer) RetryRun(ctx context.Context, request *apiv2beta1.RetryRunRe return nil, util.Wrap(err, "Failed to retry a run") } - return &empty.Empty{}, nil + return &emptypb.Empty{}, nil } // Checks if a user can access a run. // Adds namespace of the parent experiment of a run id, // API group, version, and resource type. -func (s *RunServer) canAccessRun(ctx context.Context, runId string, resourceAttributes *authorizationv1.ResourceAttributes) error { +func (s *BaseRunServer) canAccessRun(ctx context.Context, runId string, resourceAttributes *authorizationv1.ResourceAttributes) error { if !common.IsMultiUserMode() { // Skip authz if not multi-user mode. return nil diff --git a/backend/src/apiserver/server/run_server_test.go b/backend/src/apiserver/server/run_server_test.go index 4c6addfb460..ea59998e5fd 100644 --- a/backend/src/apiserver/server/run_server_test.go +++ b/backend/src/apiserver/server/run_server_test.go @@ -20,8 +20,9 @@ import ( "testing" "time" + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" @@ -43,6 +44,22 @@ import ( "sigs.k8s.io/yaml" ) +func createRunServerV1(resourceManager *resource.ResourceManager) *RunServerV1 { + return &RunServerV1{ + BaseRunServer: &BaseRunServer{ + resourceManager: resourceManager, options: &RunServerOptions{CollectMetrics: false}, + }, + } +} + +func createRunServer(resourceManager *resource.ResourceManager) *RunServer { + return &RunServer{ + BaseRunServer: &BaseRunServer{ + resourceManager: resourceManager, options: &RunServerOptions{CollectMetrics: false}, + }, + } +} + var metricV1 = &apiv1beta1.RunMetric{ Name: "metric-1", NodeId: "node-1", @@ -55,7 +72,7 @@ var metricV1 = &apiv1beta1.RunMetric{ func TestCreateRunV1_empty_name(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ ResourceReferences: validReference, PipelineSpec: &apiv1beta1.PipelineSpec{ @@ -72,7 +89,7 @@ func TestCreateRunV1_empty_name(t *testing.T) { func TestCreateRunV1_invalid_pipeline_version(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -89,7 +106,7 @@ func TestCreateRunV1_invalid_pipeline_version(t *testing.T) { func TestCreateRunV1_no_experiment(t *testing.T) { clients, manager, exp := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", PipelineSpec: &apiv1beta1.PipelineSpec{ @@ -115,7 +132,7 @@ func TestCreateRunV1_no_experiment(t *testing.T) { func TestCreateRunV1_no_pipeline_source(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -129,7 +146,7 @@ func TestCreateRunV1_no_pipeline_source(t *testing.T) { func TestCreateRunV1_invalid_spec(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -147,7 +164,7 @@ func TestCreateRunV1_invalid_spec(t *testing.T) { func TestCreateRunV1_too_many_params(t *testing.T) { clients, manager, _ := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) var params []*apiv1beta1.Parameter // Create a long enough parameter string so it exceed the length limit of parameter. for i := 0; i < 10000; i++ { @@ -170,7 +187,7 @@ func TestCreateRunV1_too_many_params(t *testing.T) { func TestCreateRunV1_pipeline(t *testing.T) { clients, manager, exp, _ := initWithExperimentAndPipelineVersion(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: []*apiv1beta1.ResourceReference{ @@ -200,7 +217,7 @@ func TestCreateRunV1_pipeline(t *testing.T) { func TestCreateRunV1_pipelineversion(t *testing.T) { clients, manager, exp, _ := initWithExperimentAndPipelineVersion(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReferencesOfExperimentAndPipelineVersion, @@ -215,7 +232,7 @@ func TestCreateRunV1_pipelineversion(t *testing.T) { func TestCreateRunV1_Manifest_and_pipeline_version(t *testing.T) { clients, manager, exp, _ := initWithExperimentAndPipelineVersion(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReferencesOfExperimentAndPipelineVersion, @@ -235,7 +252,7 @@ func TestCreateRunV1_Manifest_and_pipeline_version(t *testing.T) { func TestCreateRunV1_V1Params(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -269,9 +286,9 @@ func TestCreateRunV1_V1Params(t *testing.T) { Name: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 4}, - ScheduledAt: ×tamp.Timestamp{Seconds: 4}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(4, 0)), + ScheduledAt: timestamppb.New(time.Unix(4, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), Status: "Pending", PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: testWorkflow.ToStringForStore(), @@ -312,7 +329,7 @@ func TestCreateRunV1_V1Params(t *testing.T) { func TestCreateRunV1_RuntimeParams_V2Spec(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) listParams := []interface{}{1, 2, 3} v2RuntimeListParams, _ := structpb.NewList(listParams) @@ -348,9 +365,9 @@ func TestCreateRunV1_RuntimeParams_V2Spec(t *testing.T) { Name: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), Status: "Pending", PipelineSpec: &apiv1beta1.PipelineSpec{ PipelineManifest: v2SpecHelloWorldParams, @@ -395,7 +412,7 @@ func TestCreateRunV1_RuntimeParams_V2Spec(t *testing.T) { func TestCreateRunV1Patch(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -416,9 +433,9 @@ func TestCreateRunV1Patch(t *testing.T) { ServiceAccount: "pipeline-runner", Status: "Pending", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: testWorkflowPatch.ToStringForStore(), Parameters: []*apiv1beta1.Parameter{ @@ -472,7 +489,7 @@ func TestCreateRunV1_Unauthorized(t *testing.T) { clients, manager, _ := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -501,7 +518,7 @@ func TestCreateRunV1_Multiuser(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -536,9 +553,9 @@ func TestCreateRunV1_Multiuser(t *testing.T) { Status: "Pending", ServiceAccount: "default-editor", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 4}, - ScheduledAt: ×tamp.Timestamp{Seconds: 4}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(4, 0)), + ScheduledAt: timestamppb.New(time.Unix(4, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: testWorkflow.ToStringForStore(), Parameters: []*apiv1beta1.Parameter{{Name: "param1", Value: "world"}}, @@ -630,9 +647,9 @@ func TestRunServer_CreateRun_SingleUser(t *testing.T) { DisplayName: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv2beta1.Run_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), PipelineSource: &apiv2beta1.Run_PipelineSpec{ PipelineSpec: nil, }, @@ -643,7 +660,7 @@ func TestRunServer_CreateRun_SingleUser(t *testing.T) { State: apiv2beta1.RuntimeState_PENDING, StateHistory: []*apiv2beta1.RuntimeStatus{ { - UpdateTime: ×tamp.Timestamp{Seconds: 3}, + UpdateTime: timestamppb.New(time.Unix(3, 0)), State: apiv2beta1.RuntimeState_PENDING, }, }, @@ -671,9 +688,9 @@ func TestRunServer_CreateRun_SingleUser(t *testing.T) { DisplayName: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv2beta1.Run_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), PipelineSource: &apiv2beta1.Run_PipelineSpec{ PipelineSpec: nil, }, @@ -684,7 +701,7 @@ func TestRunServer_CreateRun_SingleUser(t *testing.T) { State: apiv2beta1.RuntimeState_PENDING, StateHistory: []*apiv2beta1.RuntimeStatus{ { - UpdateTime: ×tamp.Timestamp{Seconds: 3}, + UpdateTime: timestamppb.New(time.Unix(3, 0)), State: apiv2beta1.RuntimeState_PENDING, }, }, @@ -734,7 +751,7 @@ func TestRunServer_CreateRun_SingleUser(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { clients, manager, _ := initWithExperiment(t) - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServer(manager) server.resourceManager.SetDefaultExperimentId(DefaultFakeUUID) got, err := server.CreateRun(context.Background(), tt.args) if tt.wantErr { @@ -756,7 +773,7 @@ func TestRunServer_CreateRun_SingleUser(t *testing.T) { func TestGetRunV1(t *testing.T) { clients, manager, _, _ := initWithExperimentAndPipelineVersion(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: []*apiv1beta1.ResourceReference{ @@ -792,7 +809,7 @@ func TestGetRunV1(t *testing.T) { func TestGetRun(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServer(manager) listParams := []interface{}{1, 2, 3} v2RuntimeListParams, _ := structpb.NewList(listParams) @@ -831,9 +848,9 @@ func TestGetRun(t *testing.T) { DisplayName: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv2beta1.Run_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), PipelineSource: &apiv2beta1.Run_PipelineSpec{ PipelineSpec: returnedRun.GetPipelineSpec(), }, @@ -844,7 +861,7 @@ func TestGetRun(t *testing.T) { State: apiv2beta1.RuntimeState_PENDING, StateHistory: []*apiv2beta1.RuntimeStatus{ { - UpdateTime: ×tamp.Timestamp{Seconds: 3}, + UpdateTime: timestamppb.New(time.Unix(3, 0)), State: apiv2beta1.RuntimeState_PENDING, }, }, @@ -858,7 +875,7 @@ func TestGetRun(t *testing.T) { func TestListRunsV1(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -875,9 +892,9 @@ func TestListRunsV1(t *testing.T) { Name: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), Status: "Pending", PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: testWorkflow.ToStringForStore(), @@ -933,7 +950,7 @@ func TestListRunsV1_MultiUser(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -950,9 +967,9 @@ func TestListRunsV1_MultiUser(t *testing.T) { Name: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), Status: "Pending", PipelineSpec: &apiv1beta1.PipelineSpec{ WorkflowManifest: testWorkflow.ToStringForStore(), @@ -996,7 +1013,7 @@ func TestListRunsV1_Unauthorized(t *testing.T) { clients, manager, _ := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) _, err := server.ListRunsV1(ctx, &apiv1beta1.ListRunsRequest{ ResourceReferenceKey: &apiv1beta1.ResourceKey{ Type: apiv1beta1.ResourceType_NAMESPACE, @@ -1020,7 +1037,7 @@ func TestListRunsV1_Multiuser(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServerV1(manager) run := &apiv1beta1.Run{ Name: "run1", ResourceReferences: validReference, @@ -1037,9 +1054,9 @@ func TestListRunsV1_Multiuser(t *testing.T) { Name: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv1beta1.Run_STORAGESTATE_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), Status: "Pending", PipelineSpec: &apiv1beta1.PipelineSpec{ PipelineId: createdRun.Run.PipelineSpec.GetPipelineId(), @@ -1146,7 +1163,7 @@ func TestListRunsV1_Multiuser(t *testing.T) { func TestListRuns(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServer(manager) pipelineSpecStruct := &structpb.Struct{} yaml.Unmarshal([]byte(v2SpecHelloWorld), pipelineSpecStruct) @@ -1172,9 +1189,9 @@ func TestListRuns(t *testing.T) { DisplayName: "run1", ServiceAccount: "pipeline-runner", StorageState: apiv2beta1.Run_AVAILABLE, - CreatedAt: ×tamp.Timestamp{Seconds: 2}, - ScheduledAt: ×tamp.Timestamp{Seconds: 2}, - FinishedAt: ×tamp.Timestamp{}, + CreatedAt: timestamppb.New(time.Unix(2, 0)), + ScheduledAt: timestamppb.New(time.Unix(2, 0)), + FinishedAt: timestamppb.New(time.Unix(0, 0)), PipelineSource: &apiv2beta1.Run_PipelineSpec{ PipelineSpec: createdRun.GetPipelineSpec(), }, @@ -1187,7 +1204,7 @@ func TestListRuns(t *testing.T) { State: apiv2beta1.RuntimeState_PENDING, StateHistory: []*apiv2beta1.RuntimeStatus{ { - UpdateTime: ×tamp.Timestamp{Seconds: 3}, + UpdateTime: timestamppb.New(time.Unix(3, 0)), State: apiv2beta1.RuntimeState_PENDING, }, }, @@ -1211,7 +1228,7 @@ func TestReportRunMetricsV1_RunNotFound(t *testing.T) { clientManager, resourceManager, _ := initWithOneTimeRun(t) defer clientManager.Close() - runServer := RunServer{resourceManager: resourceManager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(resourceManager) _, err := runServer.ReportRunMetricsV1(context.Background(), &apiv1beta1.ReportRunMetricsRequest{ RunId: "1", @@ -1227,7 +1244,7 @@ func TestReportRunMetricsV1_Succeed_Multiuser(t *testing.T) { clientManager, resourceManager, runDetails := initWithOneTimeRun(t) defer clientManager.Close() - runServer := RunServer{resourceManager: resourceManager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(resourceManager) response, err := runServer.ReportRunMetricsV1(ctx, &apiv1beta1.ReportRunMetricsRequest{ RunId: runDetails.UUID, @@ -1263,7 +1280,7 @@ func TestReportRunMetricsV1_Unauthorized(t *testing.T) { defer clientManager.Close() clientManager.SubjectAccessReviewClientFake = client.NewFakeSubjectAccessReviewClientUnauthorized() resourceManager = resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - runServer := RunServer{resourceManager: resourceManager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(resourceManager) _, err := runServer.ReportRunMetricsV1(ctx, &apiv1beta1.ReportRunMetricsRequest{ RunId: runDetails.UUID, @@ -1284,7 +1301,7 @@ func TestReportRunMetricsV1_PartialFailures(t *testing.T) { clientManager, resourceManager, runDetail := initWithOneTimeRun(t) defer clientManager.Close() - runServer := RunServer{resourceManager: resourceManager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(resourceManager) validMetric := metricV1 invalidNameMetric := &apiv1beta1.RunMetric{ @@ -1331,7 +1348,7 @@ func TestCanAccessRun_Unauthorized(t *testing.T) { clients, manager, experiment := initWithExperiment_SubjectAccessReview_Unauthorized(t) defer clients.Close() - runServer := RunServer{resourceManager: manager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(manager) userIdentity := "user@google.com" md := metadata.New(map[string]string{common.GoogleIAPUserIdentityHeader: common.GoogleIAPUserIdentityPrefix + userIdentity}) @@ -1372,7 +1389,7 @@ func TestCanAccessRun_Authorized(t *testing.T) { clients, manager, oneTimeRun := initWithOneTimeRun(t) defer clients.Close() - runServer := RunServer{resourceManager: manager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(manager) md := metadata.New(map[string]string{common.GoogleIAPUserIdentityHeader: common.GoogleIAPUserIdentityPrefix + "user@google.com"}) ctx := metadata.NewIncomingContext(context.Background(), md) @@ -1387,7 +1404,7 @@ func TestCanAccessRun_Unauthenticated(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - runServer := RunServer{resourceManager: manager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(manager) md := metadata.New(map[string]string{"no-identity-header": "user"}) ctx := metadata.NewIncomingContext(context.Background(), md) @@ -1476,7 +1493,7 @@ func TestReadArtifactsV1_Succeed(t *testing.T) { _, err := manager.ReportWorkflowResource(context.Background(), workflow) assert.Nil(t, err) - runServer := RunServer{resourceManager: manager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(manager) artifact := &apiv1beta1.ReadArtifactRequest{ RunId: run.UUID, NodeId: "node-1", @@ -1504,7 +1521,7 @@ func TestReadArtifactsV1_Unauthorized(t *testing.T) { clientManager.SubjectAccessReviewClientFake = client.NewFakeSubjectAccessReviewClientUnauthorized() resourceManager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - runServer := RunServer{resourceManager: resourceManager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(resourceManager) artifact := &apiv1beta1.ReadArtifactRequest{ RunId: run.UUID, NodeId: "node-1", @@ -1522,7 +1539,7 @@ func TestReadArtifactsV1_Unauthorized(t *testing.T) { func TestReadArtifactsV1_Run_NotFound(t *testing.T) { clientManager := resource.NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) manager := resource.NewResourceManager(clientManager, &resource.ResourceManagerOptions{CollectMetrics: false}) - runServer := RunServer{resourceManager: manager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(manager) artifact := &apiv1beta1.ReadArtifactRequest{ RunId: "Wrong_RUN_UUID", NodeId: "node-1", @@ -1560,7 +1577,7 @@ func TestReadArtifactsV1_Resource_NotFound(t *testing.T) { _, err := manager.ReportWorkflowResource(context.Background(), workflow) assert.Nil(t, err) - runServer := RunServer{resourceManager: manager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServerV1(manager) //`artifactRequest` search for node that does not exist artifactRequest := &apiv1beta1.ReadArtifactRequest{ RunId: run.UUID, @@ -1623,7 +1640,7 @@ func TestReadArtifacts_Succeed(t *testing.T) { _, err := manager.ReportWorkflowResource(context.Background(), workflow) assert.Nil(t, err) - runServer := RunServer{resourceManager: manager, options: &RunServerOptions{CollectMetrics: false}} + runServer := createRunServer(manager) artifact := &apiv2beta1.ReadArtifactRequest{ RunId: run.UUID, NodeId: "node-1", @@ -1641,7 +1658,7 @@ func TestReadArtifacts_Succeed(t *testing.T) { func TestRetryRun(t *testing.T) { clients, manager, experiment := initWithExperiment(t) defer clients.Close() - server := NewRunServer(manager, &RunServerOptions{CollectMetrics: false}) + server := createRunServer(manager) listParams := []interface{}{1, 2, 3} v2RuntimeListParams, _ := structpb.NewList(listParams) diff --git a/backend/src/apiserver/server/task_server.go b/backend/src/apiserver/server/task_server.go index 8de983929be..f787076a1dd 100644 --- a/backend/src/apiserver/server/task_server.go +++ b/backend/src/apiserver/server/task_server.go @@ -18,6 +18,8 @@ import ( "context" "strings" + apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" + api "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/model" "github.com/kubeflow/pipelines/backend/src/apiserver/resource" @@ -26,6 +28,7 @@ import ( type TaskServer struct { resourceManager *resource.ResourceManager + apiv1beta1.UnimplementedTaskServiceServer } // Creates a task. diff --git a/backend/src/apiserver/server/visualization_server.go b/backend/src/apiserver/server/visualization_server.go index 7ff4cf9356a..8f2ee908167 100644 --- a/backend/src/apiserver/server/visualization_server.go +++ b/backend/src/apiserver/server/visualization_server.go @@ -23,6 +23,8 @@ import ( "net/url" "strings" + apiv1beta1 "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" + "github.com/golang/glog" "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" "github.com/kubeflow/pipelines/backend/src/apiserver/common" @@ -40,6 +42,7 @@ const ( type VisualizationServer struct { resourceManager *resource.ResourceManager serviceURL string + apiv1beta1.UnimplementedVisualizationServiceServer } func (s *VisualizationServer) CreateVisualizationV1(ctx context.Context, request *go_client.CreateVisualizationRequest) (*go_client.Visualization, error) { diff --git a/backend/src/apiserver/template/v2_template.go b/backend/src/apiserver/template/v2_template.go index 8a60f2a5623..287f14f2d51 100644 --- a/backend/src/apiserver/template/v2_template.go +++ b/backend/src/apiserver/template/v2_template.go @@ -23,7 +23,8 @@ import ( "regexp" "strings" - structpb "github.com/golang/protobuf/ptypes/struct" + "google.golang.org/protobuf/types/known/structpb" + "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" "github.com/kubeflow/pipelines/backend/src/apiserver/model" "github.com/kubeflow/pipelines/backend/src/common/util" diff --git a/backend/src/common/client/api_server/v1/experiment_client.go b/backend/src/common/client/api_server/v1/experiment_client.go index c22d06c0b8f..ffb680de629 100644 --- a/backend/src/common/client/api_server/v1/experiment_client.go +++ b/backend/src/common/client/api_server/v1/experiment_client.go @@ -85,14 +85,14 @@ func (c *ExperimentClient) Create(parameters *params.ExperimentServiceCreateExpe response, err := c.apiClient.ExperimentService.ExperimentServiceCreateExperimentV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.ExperimentServiceCreateExperimentV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, - fmt.Sprintf("Failed to create experiment. Params: '%+v'. Body: '%+v'", parameters, parameters.Body), - fmt.Sprintf("Failed to create experiment '%v'", parameters.Body.Name)) + fmt.Sprintf("Failed to create experiment. Params: '%+v'. Body: '%+v'", parameters, parameters.Experiment), + fmt.Sprintf("Failed to create experiment '%v'", parameters.Experiment.Name)) } return response.Payload, nil @@ -109,7 +109,7 @@ func (c *ExperimentClient) Get(parameters *params.ExperimentServiceGetExperiment response, err := c.apiClient.ExperimentService.ExperimentServiceGetExperimentV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.ExperimentServiceGetExperimentV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -133,7 +133,7 @@ func (c *ExperimentClient) List(parameters *params.ExperimentServiceListExperime response, err := c.apiClient.ExperimentService.ExperimentServiceListExperimentsV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.ExperimentServiceListExperimentsV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -156,7 +156,7 @@ func (c *ExperimentClient) Delete(parameters *params.ExperimentServiceDeleteExpe _, err := c.apiClient.ExperimentService.ExperimentServiceDeleteExperimentV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.ExperimentServiceDeleteExperimentV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -210,7 +210,7 @@ func (c *ExperimentClient) Archive(parameters *params.ExperimentServiceArchiveEx if err != nil { if defaultError, ok := err.(*params.ExperimentServiceArchiveExperimentV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -234,7 +234,7 @@ func (c *ExperimentClient) Unarchive(parameters *params.ExperimentServiceUnarchi if err != nil { if defaultError, ok := err.(*params.ExperimentServiceUnarchiveExperimentV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } diff --git a/backend/src/common/client/api_server/v1/experiment_client_fake.go b/backend/src/common/client/api_server/v1/experiment_client_fake.go index c8f9301e5b5..959b7f7ea90 100644 --- a/backend/src/common/client/api_server/v1/experiment_client_fake.go +++ b/backend/src/common/client/api_server/v1/experiment_client_fake.go @@ -43,11 +43,11 @@ func NewExperimentClientFake() *ExperimentClientFake { func (c *ExperimentClientFake) Create(params *experimentparams.ExperimentServiceCreateExperimentV1Params) ( *experimentmodel.APIExperiment, error) { - switch params.Body.Name { + switch params.Experiment.Name { case ExperimentForClientErrorTest: return nil, fmt.Errorf(ClientErrorString) default: - return getDefaultExperiment("500", params.Body.Name), nil + return getDefaultExperiment("500", params.Experiment.Name), nil } } diff --git a/backend/src/common/client/api_server/v1/healthz_client.go b/backend/src/common/client/api_server/v1/healthz_client.go index a3ca7798185..6ae2bdf16c8 100644 --- a/backend/src/common/client/api_server/v1/healthz_client.go +++ b/backend/src/common/client/api_server/v1/healthz_client.go @@ -69,7 +69,7 @@ func (c *HealthzClient) GetHealthz() (*model.APIGetHealthzResponse, error) { response, err := c.apiClient.HealthzService.HealthzServiceGetHealthz(parameters, api_server.PassThroughAuth) if err != nil { if defaultError, ok := err.(*params.HealthzServiceGetHealthzDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } diff --git a/backend/src/common/client/api_server/v1/job_client.go b/backend/src/common/client/api_server/v1/job_client.go index 0c21f301e14..6d00b72930a 100644 --- a/backend/src/common/client/api_server/v1/job_client.go +++ b/backend/src/common/client/api_server/v1/job_client.go @@ -85,14 +85,14 @@ func (c *JobClient) Create(parameters *params.JobServiceCreateJobParams) (*model response, err := c.apiClient.JobService.JobServiceCreateJob(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.JobServiceCreateJobDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, - fmt.Sprintf("Failed to create job. Params: '%+v'. Body: '%+v'", parameters, parameters.Body), - fmt.Sprintf("Failed to create job '%v'", parameters.Body.Name)) + fmt.Sprintf("Failed to create job. Params: '%+v'. Body: '%+v'", parameters, parameters.Job), + fmt.Sprintf("Failed to create job '%v'", parameters.Job.Name)) } return response.Payload, nil @@ -109,7 +109,7 @@ func (c *JobClient) Get(parameters *params.JobServiceGetJobParams) (*model.APIJo response, err := c.apiClient.JobService.JobServiceGetJob(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.JobServiceGetJobDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -132,7 +132,7 @@ func (c *JobClient) Delete(parameters *params.JobServiceDeleteJobParams) error { _, err := c.apiClient.JobService.JobServiceDeleteJob(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.JobServiceDeleteJobDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -155,7 +155,7 @@ func (c *JobClient) Enable(parameters *params.JobServiceEnableJobParams) error { _, err := c.apiClient.JobService.JobServiceEnableJob(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.JobServiceEnableJobDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -178,7 +178,7 @@ func (c *JobClient) Disable(parameters *params.JobServiceDisableJobParams) error _, err := c.apiClient.JobService.JobServiceDisableJob(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.JobServiceDisableJobDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -202,7 +202,7 @@ func (c *JobClient) List(parameters *params.JobServiceListJobsParams) ( response, err := c.apiClient.JobService.JobServiceListJobs(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.JobServiceListJobsDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } diff --git a/backend/src/common/client/api_server/v1/job_client_fake.go b/backend/src/common/client/api_server/v1/job_client_fake.go index 37510997a8e..724aa417173 100644 --- a/backend/src/common/client/api_server/v1/job_client_fake.go +++ b/backend/src/common/client/api_server/v1/job_client_fake.go @@ -44,11 +44,11 @@ func NewJobClientFake() *JobClientFake { func (c *JobClientFake) Create(params *jobparams.JobServiceCreateJobParams) ( *jobmodel.APIJob, error) { - switch params.Body.Name { + switch params.Job.Name { case JobForClientErrorTest: return nil, fmt.Errorf(ClientErrorString) default: - return getDefaultJob("500", params.Body.Name), nil + return getDefaultJob("500", params.Job.Name), nil } } diff --git a/backend/src/common/client/api_server/v1/pipeline_client.go b/backend/src/common/client/api_server/v1/pipeline_client.go index e938d4ff092..f932418b8d6 100644 --- a/backend/src/common/client/api_server/v1/pipeline_client.go +++ b/backend/src/common/client/api_server/v1/pipeline_client.go @@ -55,7 +55,7 @@ func (c *PipelineClient) UpdateDefaultVersion(parameters *params.PipelineService _, err := c.apiClient.PipelineService.PipelineServiceUpdatePipelineDefaultVersionV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceGetPipelineV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -108,14 +108,14 @@ func (c *PipelineClient) Create(parameters *params.PipelineServiceCreatePipeline response, err := c.apiClient.PipelineService.PipelineServiceCreatePipelineV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceCreatePipelineV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, fmt.Sprintf("Failed to create pipeline. Params: '%v'", parameters), - fmt.Sprintf("Failed to create pipeline from URL '%v'", parameters.Body.URL.PipelineURL)) + fmt.Sprintf("Failed to create pipeline from URL '%v'", parameters.Pipeline.URL.PipelineURL)) } return response.Payload, nil @@ -132,7 +132,7 @@ func (c *PipelineClient) Get(parameters *params.PipelineServiceGetPipelineV1Para response, err := c.apiClient.PipelineService.PipelineServiceGetPipelineV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceGetPipelineV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -155,7 +155,7 @@ func (c *PipelineClient) Delete(parameters *params.PipelineServiceDeletePipeline _, err := c.apiClient.PipelineService.PipelineServiceDeletePipelineV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceDeletePipelineV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -178,7 +178,7 @@ func (c *PipelineClient) DeletePipelineVersion(parameters *params.PipelineServic _, err := c.apiClient.PipelineService.PipelineServiceDeletePipelineVersionV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceDeletePipelineVersionV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -200,7 +200,7 @@ func (c *PipelineClient) GetTemplate(parameters *params.PipelineServiceGetTempla response, err := c.apiClient.PipelineService.PipelineServiceGetTemplate(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceGetTemplateDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -225,7 +225,7 @@ func (c *PipelineClient) List(parameters *params.PipelineServiceListPipelinesV1P response, err := c.apiClient.PipelineService.PipelineServiceListPipelinesV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceListPipelinesV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -278,14 +278,14 @@ func (c *PipelineClient) CreatePipelineVersion(parameters *params.PipelineServic response, err := c.apiClient.PipelineService.PipelineServiceCreatePipelineVersionV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceCreatePipelineVersionV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, fmt.Sprintf("Failed to create pipeline version. Params: '%v'", parameters), - fmt.Sprintf("Failed to create pipeline version from URL '%v'", parameters.Body.PackageURL.PipelineURL)) + fmt.Sprintf("Failed to create pipeline version from URL '%v'", parameters.Version.PackageURL.PipelineURL)) } return response.Payload, nil @@ -302,7 +302,7 @@ func (c *PipelineClient) ListPipelineVersions(parameters *params.PipelineService response, err := c.apiClient.PipelineService.PipelineServiceListPipelineVersionsV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceListPipelineVersionsV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -326,7 +326,7 @@ func (c *PipelineClient) GetPipelineVersion(parameters *params.PipelineServiceGe response, err := c.apiClient.PipelineService.PipelineServiceGetPipelineVersionV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceGetPipelineVersionV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -350,7 +350,7 @@ func (c *PipelineClient) GetPipelineVersionTemplate(parameters *params.PipelineS response, err := c.apiClient.PipelineService.PipelineServiceGetPipelineVersionTemplate(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.PipelineServiceGetPipelineVersionTemplateDefault); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } diff --git a/backend/src/common/client/api_server/v1/pipeline_client_fake.go b/backend/src/common/client/api_server/v1/pipeline_client_fake.go index aefe0e8fa9f..72ab821d1eb 100644 --- a/backend/src/common/client/api_server/v1/pipeline_client_fake.go +++ b/backend/src/common/client/api_server/v1/pipeline_client_fake.go @@ -79,11 +79,11 @@ func NewPipelineClientFake() *PipelineClientFake { func (c *PipelineClientFake) Create(params *pipelineparams.PipelineServiceCreatePipelineV1Params) ( *pipelinemodel.APIPipeline, error) { - switch params.Body.URL.PipelineURL { + switch params.Pipeline.URL.PipelineURL { case PipelineInvalidURL: return nil, fmt.Errorf(ClientErrorString) default: - return getDefaultPipeline(path.Base(params.Body.URL.PipelineURL)), nil + return getDefaultPipeline(path.Base(params.Pipeline.URL.PipelineURL)), nil } } diff --git a/backend/src/common/client/api_server/v1/run_client.go b/backend/src/common/client/api_server/v1/run_client.go index 608d6e36693..c2878959dcb 100644 --- a/backend/src/common/client/api_server/v1/run_client.go +++ b/backend/src/common/client/api_server/v1/run_client.go @@ -86,14 +86,14 @@ func (c *RunClient) Create(parameters *params.RunServiceCreateRunV1Params) (*mod response, err := c.apiClient.RunService.RunServiceCreateRunV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.RunServiceGetRunV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } return nil, nil, util.NewUserError(err, fmt.Sprintf("Failed to create run. Params: '%+v'", parameters), - fmt.Sprintf("Failed to create run '%v'", parameters.Body.Name)) + fmt.Sprintf("Failed to create run '%v'", parameters.Run.Name)) } // Unmarshal response @@ -120,7 +120,7 @@ func (c *RunClient) Get(parameters *params.RunServiceGetRunV1Params) (*model.API response, err := c.apiClient.RunService.RunServiceGetRunV1(parameters, c.authInfoWriter) if err != nil { if defaultError, ok := err.(*params.RunServiceGetRunV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -154,7 +154,7 @@ func (c *RunClient) Archive(parameters *params.RunServiceArchiveRunV1Params) err if err != nil { if defaultError, ok := err.(*params.RunServiceListRunsV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -178,7 +178,7 @@ func (c *RunClient) Unarchive(parameters *params.RunServiceUnarchiveRunV1Params) if err != nil { if defaultError, ok := err.(*params.RunServiceListRunsV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -202,7 +202,7 @@ func (c *RunClient) Delete(parameters *params.RunServiceDeleteRunV1Params) error if err != nil { if defaultError, ok := err.(*params.RunServiceListRunsV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } @@ -227,7 +227,7 @@ func (c *RunClient) List(parameters *params.RunServiceListRunsV1Params) ( if err != nil { if defaultError, ok := err.(*params.RunServiceListRunsV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } diff --git a/backend/src/common/client/api_server/v1/visualization_client.go b/backend/src/common/client/api_server/v1/visualization_client.go index ec6887ab670..ee73b5b0738 100644 --- a/backend/src/common/client/api_server/v1/visualization_client.go +++ b/backend/src/common/client/api_server/v1/visualization_client.go @@ -65,14 +65,14 @@ func (c *VisualizationClient) Create(parameters *params.VisualizationServiceCrea response, err := c.apiClient.VisualizationService.VisualizationServiceCreateVisualizationV1(parameters, api_server.PassThroughAuth) if err != nil { if defaultError, ok := err.(*params.VisualizationServiceCreateVisualizationV1Default); ok { - err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Error, defaultError.Payload.Code) + err = api_server.CreateErrorFromAPIStatus(defaultError.Payload.Message, defaultError.Payload.Code) } else { err = api_server.CreateErrorCouldNotRecoverAPIStatus(err) } return nil, util.NewUserError(err, - fmt.Sprintf("Failed to create visualization. Params: '%+v'. Body: '%+v'", parameters, parameters.Body), - fmt.Sprintf("Failed to create visualization '%v'", parameters.Body.Type)) + fmt.Sprintf("Failed to create visualization. Params: '%+v'. Body: '%+v'", parameters, parameters.Visualization), + fmt.Sprintf("Failed to create visualization '%v'", parameters.Visualization.Type)) } return response.Payload, nil diff --git a/backend/src/common/client/api_server/v1/visualization_client_fake.go b/backend/src/common/client/api_server/v1/visualization_client_fake.go index 5afb2ca331e..4dad57e48d6 100644 --- a/backend/src/common/client/api_server/v1/visualization_client_fake.go +++ b/backend/src/common/client/api_server/v1/visualization_client_fake.go @@ -21,12 +21,12 @@ func NewVisualizationClientFake() *VisualizationClientFake { func (c *VisualizationClientFake) Create(params *params.VisualizationServiceCreateVisualizationV1Params) ( *model.APIVisualization, error) { var arguments VisualizationArguments - err := json.Unmarshal([]byte(params.Body.Arguments), &arguments) + err := json.Unmarshal([]byte(params.Visualization.Arguments), &arguments) if err != nil { return nil, err } if arguments.fail { return nil, fmt.Errorf(ClientErrorString) } - return params.Body, nil + return params.Visualization, nil } diff --git a/backend/src/common/client/api_server/v2/experiment_client.go b/backend/src/common/client/api_server/v2/experiment_client.go index a4e682c9ae1..2f61207e424 100644 --- a/backend/src/common/client/api_server/v2/experiment_client.go +++ b/backend/src/common/client/api_server/v2/experiment_client.go @@ -81,8 +81,8 @@ func (c *ExperimentClient) Create(parameters *params.ExperimentServiceCreateExpe response, err := c.apiClient.ExperimentService.ExperimentServiceCreateExperiment(parameters) if err != nil { return nil, util.NewUserError(err, - fmt.Sprintf("Failed to create experiment. Params: '%+v'. Body: '%+v'", parameters, parameters.Body), - fmt.Sprintf("Failed to create experiment '%v'", parameters.Body.DisplayName)) + fmt.Sprintf("Failed to create experiment. Params: '%+v'. Body: '%+v'", parameters, parameters.Experiment), + fmt.Sprintf("Failed to create experiment '%v'", parameters.Experiment.DisplayName)) } return response.Payload, nil diff --git a/backend/src/common/client/api_server/v2/experiment_client_fake.go b/backend/src/common/client/api_server/v2/experiment_client_fake.go index 3c4511cc3be..78f665a1d93 100644 --- a/backend/src/common/client/api_server/v2/experiment_client_fake.go +++ b/backend/src/common/client/api_server/v2/experiment_client_fake.go @@ -37,7 +37,7 @@ func NewExperimentClientFake() *ExperimentClientFake { func (c *ExperimentClientFake) Create(parameters *params.ExperimentServiceCreateExperimentParams) ( *model.V2beta1Experiment, error) { - return getDefaultExperiment("500", parameters.Body.DisplayName), nil + return getDefaultExperiment("500", parameters.Experiment.DisplayName), nil } func (c *ExperimentClientFake) Get(parameters *params.ExperimentServiceGetExperimentParams) ( diff --git a/backend/src/common/client/api_server/v2/pipeline_client.go b/backend/src/common/client/api_server/v2/pipeline_client.go index 71faf77f71e..8e1b00e4dd4 100644 --- a/backend/src/common/client/api_server/v2/pipeline_client.go +++ b/backend/src/common/client/api_server/v2/pipeline_client.go @@ -93,7 +93,7 @@ func (c *PipelineClient) Create(parameters *params.PipelineServiceCreatePipeline return nil, util.NewUserError(err, fmt.Sprintf("Failed to create pipeline. Params: '%v'", parameters), - fmt.Sprintf("Failed to create pipeline '%v'", parameters.Body.DisplayName)) + fmt.Sprintf("Failed to create pipeline '%v'", parameters.Pipeline.DisplayName)) } return response.Payload, nil diff --git a/backend/src/common/client/api_server/v2/pipeline_client_fake.go b/backend/src/common/client/api_server/v2/pipeline_client_fake.go index aabd9e1b9b0..717bf164d72 100644 --- a/backend/src/common/client/api_server/v2/pipeline_client_fake.go +++ b/backend/src/common/client/api_server/v2/pipeline_client_fake.go @@ -63,7 +63,7 @@ func NewPipelineClientFake() *PipelineClientFake { func (c *PipelineClientFake) Create(params *params.PipelineServiceCreatePipelineParams) ( *model.V2beta1Pipeline, error) { - return getDefaultPipeline(params.Body.PipelineID), nil + return getDefaultPipeline(params.Pipeline.PipelineID), nil } func (c *PipelineClientFake) CreatePipelineAndVersion(params *params.PipelineServiceCreatePipelineAndVersionParams) (*model.V2beta1Pipeline, error) { diff --git a/backend/src/common/client/api_server/v2/recurring_run_client.go b/backend/src/common/client/api_server/v2/recurring_run_client.go index dbb8beae8e5..62749e19a43 100644 --- a/backend/src/common/client/api_server/v2/recurring_run_client.go +++ b/backend/src/common/client/api_server/v2/recurring_run_client.go @@ -85,8 +85,8 @@ func (c *RecurringRunClient) Create(parameters *params.RecurringRunServiceCreate response, err := c.apiClient.RecurringRunService.RecurringRunServiceCreateRecurringRun(parameters) if err != nil { return nil, util.NewUserError(err, - fmt.Sprintf("Failed to create job. Params: '%+v'. Body: '%+v'", parameters, parameters.Body), - fmt.Sprintf("Failed to create job '%v'", parameters.Body.DisplayName)) + fmt.Sprintf("Failed to create job. Params: '%+v'. Body: '%+v'", parameters, parameters.RecurringRun), + fmt.Sprintf("Failed to create job '%v'", parameters.RecurringRun.DisplayName)) } return response.Payload, nil diff --git a/backend/src/common/client/api_server/v2/recurring_run_client_fake.go b/backend/src/common/client/api_server/v2/recurring_run_client_fake.go index 2221a0ed0fc..c6b703449fc 100644 --- a/backend/src/common/client/api_server/v2/recurring_run_client_fake.go +++ b/backend/src/common/client/api_server/v2/recurring_run_client_fake.go @@ -37,7 +37,7 @@ func NewRecurringRunClientFake() *RecurringRunClientFake { func (c *RecurringRunClientFake) Create(params *params.RecurringRunServiceCreateRecurringRunParams) ( *model.V2beta1RecurringRun, error) { - return getDefaultJob("500", params.Body.DisplayName), nil + return getDefaultJob("500", params.RecurringRun.DisplayName), nil } func (c *RecurringRunClientFake) Get(params *params.RecurringRunServiceGetRecurringRunParams) ( diff --git a/backend/src/common/client/api_server/v2/run_client.go b/backend/src/common/client/api_server/v2/run_client.go index 47b37ab89a4..cd09a300be2 100644 --- a/backend/src/common/client/api_server/v2/run_client.go +++ b/backend/src/common/client/api_server/v2/run_client.go @@ -91,7 +91,7 @@ func (c *RunClient) Create(parameters *params.RunServiceCreateRunParams) (*model return nil, util.NewUserError(err, fmt.Sprintf("Failed to create run. Params: '%+v'", parameters), - fmt.Sprintf("Failed to create run '%v'", parameters.Body.DisplayName)) + fmt.Sprintf("Failed to create run '%v'", parameters.Run.DisplayName)) } return response.Payload, nil diff --git a/backend/src/common/util/json.go b/backend/src/common/util/json.go index 7719ff5f29e..6f01143b3e9 100644 --- a/backend/src/common/util/json.go +++ b/backend/src/common/util/json.go @@ -15,13 +15,12 @@ package util import ( - "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/encoding/protojson" "encoding/json" - "strings" "github.com/golang/glog" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) func UnmarshalJsonOrFail(data string, v interface{}) { @@ -71,6 +70,8 @@ func UnmarshalJsonWithError(data interface{}, v *interface{}) error { // UnmarshalString unmarshals a JSON object from s into m. // Allows unknown fields func UnmarshalString(s string, m proto.Message) error { - unmarshaler := jsonpb.Unmarshaler{AllowUnknownFields: true} - return unmarshaler.Unmarshal(strings.NewReader(s), m) + unmarshaler := protojson.UnmarshalOptions{ + DiscardUnknown: true, + } + return unmarshaler.Unmarshal([]byte(s), m) } diff --git a/backend/src/common/util/workflow.go b/backend/src/common/util/workflow.go index 0d88b7bcdfd..19acd21bed4 100644 --- a/backend/src/common/util/workflow.go +++ b/backend/src/common/util/workflow.go @@ -20,6 +20,8 @@ import ( "strings" "time" + "google.golang.org/protobuf/encoding/protojson" + workflowapi "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" argoclient "github.com/argoproj/argo-workflows/v3/pkg/client/clientset/versioned" argoclientwf "github.com/argoproj/argo-workflows/v3/pkg/client/clientset/versioned/typed/workflow/v1alpha1" @@ -29,7 +31,6 @@ import ( "github.com/argoproj/argo-workflows/v3/workflow/packer" "github.com/argoproj/argo-workflows/v3/workflow/validate" "github.com/golang/glog" - "github.com/golang/protobuf/jsonpb" api "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" exec "github.com/kubeflow/pipelines/backend/src/common" swfregister "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow" @@ -517,7 +518,7 @@ func collectNodeMetricsOrNil(runID string, nodeStatus *workflowapi.NodeStatus, r // ReportRunMetricsRequest as a workaround to hold user's metrics, which is a superset of what // user can provide. reportMetricsRequest := new(api.ReportRunMetricsRequest) - err = jsonpb.UnmarshalString(metricsJSON, reportMetricsRequest) + err = protojson.Unmarshal([]byte(metricsJSON), reportMetricsRequest) if err != nil { // User writes invalid metrics JSON. // TODO(#1426): report the error back to api server to notify user diff --git a/backend/src/v2/cmd/compiler/main.go b/backend/src/v2/cmd/compiler/main.go index ed64c78bc0a..6e132f5923c 100644 --- a/backend/src/v2/cmd/compiler/main.go +++ b/backend/src/v2/cmd/compiler/main.go @@ -19,11 +19,11 @@ import ( "os" "github.com/golang/glog" - structpb "github.com/golang/protobuf/ptypes/struct" "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" "github.com/kubeflow/pipelines/backend/src/v2/compiler/argocompiler" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/structpb" "sigs.k8s.io/yaml" ) diff --git a/backend/src/v2/cmd/driver/main.go b/backend/src/v2/cmd/driver/main.go index ea8dbe1b6e1..ed624fdc7c5 100644 --- a/backend/src/v2/cmd/driver/main.go +++ b/backend/src/v2/cmd/driver/main.go @@ -20,6 +20,8 @@ import ( "flag" "fmt" + "google.golang.org/protobuf/encoding/protojson" + "github.com/kubeflow/pipelines/backend/src/apiserver/config/proxy" "github.com/kubeflow/pipelines/backend/src/common/util" @@ -28,7 +30,6 @@ import ( "strconv" "github.com/golang/glog" - "github.com/golang/protobuf/jsonpb" "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" "github.com/kubeflow/pipelines/backend/src/v2/cacheutils" "github.com/kubeflow/pipelines/backend/src/v2/config" @@ -294,11 +295,11 @@ func handleExecution(execution *driver.Execution, driverType string, executionPa } } if execution.ExecutorInput != nil { - marshaler := jsonpb.Marshaler{} - executorInputJSON, err := marshaler.MarshalToString(execution.ExecutorInput) + executorInputBytes, err := protojson.Marshal(execution.ExecutorInput) if err != nil { return fmt.Errorf("failed to marshal ExecutorInput to JSON: %w", err) } + executorInputJSON := string(executorInputBytes) glog.Infof("output ExecutorInput:%s\n", prettyPrint(executorInputJSON)) } return nil diff --git a/backend/src/v2/cmd/driver/main_test.go b/backend/src/v2/cmd/driver/main_test.go index bd1d4b48183..ad15a7b00e9 100644 --- a/backend/src/v2/cmd/driver/main_test.go +++ b/backend/src/v2/cmd/driver/main_test.go @@ -4,10 +4,10 @@ import ( "os" "testing" - "github.com/golang/protobuf/proto" "github.com/kubeflow/pipelines/backend/src/v2/driver" "github.com/kubeflow/pipelines/kubernetes_platform/go/kubernetesplatform" "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/proto" ) func strPtr(s string) *string { diff --git a/backend/src/v2/compiler/argocompiler/container.go b/backend/src/v2/compiler/argocompiler/container.go index d83987c19b3..3c41f7593df 100644 --- a/backend/src/v2/compiler/argocompiler/container.go +++ b/backend/src/v2/compiler/argocompiler/container.go @@ -20,12 +20,13 @@ import ( "strconv" "strings" + "google.golang.org/protobuf/encoding/protojson" + "github.com/kubeflow/pipelines/backend/src/apiserver/config/proxy" "k8s.io/apimachinery/pkg/util/intstr" wfapi "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" "github.com/golang/glog" - "github.com/golang/protobuf/jsonpb" "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" "github.com/kubeflow/pipelines/backend/src/v2/component" "github.com/kubeflow/pipelines/kubernetes_platform/go/kubernetesplatform" @@ -477,7 +478,7 @@ func (c *workflowCompiler) addContainerExecutorTemplate(task *pipelinespec.Pipel if kubernetesConfigParam != nil { k8sExecCfg := &kubernetesplatform.KubernetesExecutorConfig{} - if err := jsonpb.UnmarshalString(string(*kubernetesConfigParam.Value), k8sExecCfg); err == nil { + if err := protojson.Unmarshal([]byte(*kubernetesConfigParam.Value), k8sExecCfg); err == nil { extendPodMetadata(&executor.Metadata, k8sExecCfg) } } diff --git a/backend/src/v2/compiler/visitor.go b/backend/src/v2/compiler/visitor.go index 282af01a9de..29320ba5919 100644 --- a/backend/src/v2/compiler/visitor.go +++ b/backend/src/v2/compiler/visitor.go @@ -26,7 +26,8 @@ import ( "fmt" "sort" - "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/encoding/protojson" + "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" "google.golang.org/protobuf/types/known/structpb" ) @@ -171,15 +172,17 @@ func (state *pipelineDFS) dfs(name string, component *pipelinespec.ComponentSpec } func GetDeploymentConfig(spec *pipelinespec.PipelineSpec) (*pipelinespec.PipelineDeploymentConfig, error) { - marshaler := jsonpb.Marshaler{} - buffer := new(bytes.Buffer) - if err := marshaler.Marshal(buffer, spec.GetDeploymentSpec()); err != nil { + jsonBytes, err := protojson.Marshal(spec.GetDeploymentSpec()) + if err != nil { return nil, err } + buffer := bytes.NewBuffer(jsonBytes) deploymentConfig := &pipelinespec.PipelineDeploymentConfig{} // Allow unknown '@type' field in the json message. - unmarshaler := jsonpb.Unmarshaler{AllowUnknownFields: true} - if err := unmarshaler.Unmarshal(buffer, deploymentConfig); err != nil { + unmarshaler := protojson.UnmarshalOptions{ + DiscardUnknown: true, + } + if err := unmarshaler.Unmarshal(buffer.Bytes(), deploymentConfig); err != nil { return nil, err } return deploymentConfig, nil @@ -187,13 +190,14 @@ func GetDeploymentConfig(spec *pipelinespec.PipelineSpec) (*pipelinespec.Pipelin func GetPipelineSpec(job *pipelinespec.PipelineJob) (*pipelinespec.PipelineSpec, error) { // TODO(Bobgy): can we avoid this marshal to string step? - marshaler := jsonpb.Marshaler{} - json, err := marshaler.MarshalToString(job.GetPipelineSpec()) + marshaler := &protojson.MarshalOptions{} + jsonBytes, err := marshaler.Marshal(job.GetPipelineSpec()) if err != nil { return nil, fmt.Errorf("failed marshal pipeline spec to json: %w", err) } + jsonStr := string(jsonBytes) spec := &pipelinespec.PipelineSpec{} - if err := jsonpb.UnmarshalString(json, spec); err != nil { + if err := protojson.Unmarshal([]byte(jsonStr), spec); err != nil { return nil, fmt.Errorf("failed to parse pipeline spec: %v", err) } return spec, nil diff --git a/backend/src/v2/compiler/visitor_test.go b/backend/src/v2/compiler/visitor_test.go index 00aec8e81b6..ba194d890d2 100644 --- a/backend/src/v2/compiler/visitor_test.go +++ b/backend/src/v2/compiler/visitor_test.go @@ -18,7 +18,8 @@ import ( "os" "testing" - "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/encoding/protojson" + "github.com/google/go-cmp/cmp" "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" "github.com/kubeflow/pipelines/backend/src/v2/compiler" @@ -93,7 +94,7 @@ func load(t *testing.T, path string) *pipelinespec.PipelineJob { } json := string(content) job := &pipelinespec.PipelineJob{} - if err := jsonpb.UnmarshalString(json, job); err != nil { + if err := protojson.Unmarshal([]byte(json), job); err != nil { t.Errorf("Failed to parse pipeline job, error: %s, job: %v", err, json) } return job diff --git a/backend/src/v2/component/launcher_v2.go b/backend/src/v2/component/launcher_v2.go index 9e15f00ea1e..a8150ca36f9 100644 --- a/backend/src/v2/component/launcher_v2.go +++ b/backend/src/v2/component/launcher_v2.go @@ -27,11 +27,12 @@ import ( "strings" "time" + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/golang/glog" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/timestamp" api "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" "github.com/kubeflow/pipelines/backend/src/v2/client_manager" + "google.golang.org/protobuf/proto" "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" "github.com/kubeflow/pipelines/backend/src/v2/metadata" @@ -241,8 +242,8 @@ func (l *LauncherV2) Execute(ctx context.Context) (err error) { Namespace: l.options.Namespace, RunId: l.options.RunID, MlmdExecutionID: strconv.FormatInt(id, 10), - CreatedAt: ×tamp.Timestamp{Seconds: executedStartedTime}, - FinishedAt: ×tamp.Timestamp{Seconds: time.Now().Unix()}, + CreatedAt: timestamppb.New(time.Unix(executedStartedTime, 0)), + FinishedAt: timestamppb.New(time.Unix(time.Now().Unix(), 0)), Fingerprint: fingerPrint, } return l.clientManager.CacheClient().CreateExecutionCache(ctx, task) diff --git a/backend/src/v2/driver/cache.go b/backend/src/v2/driver/cache.go index 3c03b38e97d..be169f63dba 100644 --- a/backend/src/v2/driver/cache.go +++ b/backend/src/v2/driver/cache.go @@ -20,8 +20,9 @@ import ( "strconv" "time" + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/golang/glog" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/kubeflow/pipelines/api/v2alpha1/go/pipelinespec" api "github.com/kubeflow/pipelines/backend/api/v1beta1/go_client" "github.com/kubeflow/pipelines/backend/src/v2/cacheutils" @@ -127,8 +128,8 @@ func createCache( Namespace: opts.Namespace, RunId: opts.RunID, MlmdExecutionID: strconv.FormatInt(id, 10), - CreatedAt: ×tamp.Timestamp{Seconds: taskStartedTime}, - FinishedAt: ×tamp.Timestamp{Seconds: time.Now().Unix()}, + CreatedAt: timestamppb.New(time.Unix(taskStartedTime, 0)), + FinishedAt: timestamppb.New(time.Unix(time.Now().Unix(), 0)), Fingerprint: fingerPrint, } err := cacheClient.CreateExecutionCache(ctx, task) diff --git a/backend/test/integration/experiment_api_test.go b/backend/test/integration/experiment_api_test.go index c0f4ae7dd5b..ce6a306c43b 100644 --- a/backend/test/integration/experiment_api_test.go +++ b/backend/test/integration/experiment_api_test.go @@ -143,7 +143,7 @@ func (s *ExperimentApiTest) TestExperimentAPI() { expectedTrainingExperiment := test.GetExperiment("training", "my first experiment", s.resourceNamespace) trainingExperiment, err := s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentV1Params{ - Body: experiment, + Experiment: experiment, }) assert.Nil(t, err) assert.True(t, test.VerifyExperimentResourceReferences(trainingExperiment.ResourceReferences, expectedTrainingExperiment.ResourceReferences)) @@ -151,11 +151,11 @@ func (s *ExperimentApiTest) TestExperimentAPI() { expectedTrainingExperiment.ID = trainingExperiment.ID expectedTrainingExperiment.CreatedAt = trainingExperiment.CreatedAt - expectedTrainingExperiment.StorageState = "STORAGESTATE_AVAILABLE" + expectedTrainingExperiment.StorageState = (*experiment_model.APIExperimentStorageState)(util.StringPointer("STORAGESTATE_AVAILABLE")) assert.Equal(t, expectedTrainingExperiment, trainingExperiment) /* ---------- Create an experiment with same name. Should fail due to name uniqueness ---------- */ - _, err = s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + _, err = s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.NotNil(t, err) assert.Contains(t, err.Error(), "Please specify a new name") @@ -164,12 +164,12 @@ func (s *ExperimentApiTest) TestExperimentAPI() { time.Sleep(1 * time.Second) experiment = test.GetExperiment("prediction", "my second experiment", s.resourceNamespace) _, err = s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentV1Params{ - Body: experiment, + Experiment: experiment, }) time.Sleep(1 * time.Second) experiment = test.GetExperiment("moonshot", "my second experiment", s.resourceNamespace) _, err = s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentV1Params{ - Body: experiment, + Experiment: experiment, }) assert.Nil(t, err) @@ -300,17 +300,17 @@ func (s *ExperimentApiTest) TestExperimentAPI() { Pipelineid: util.StringPointer(pipeline.ID), }) assert.Nil(t, err) - createRunRequest := &runParams.RunServiceCreateRunV1Params{Body: &run_model.APIRun{ + createRunRequest := &runParams.RunServiceCreateRunV1Params{Run: &run_model.APIRun{ Name: "hello world", Description: "this is hello world", ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experiment.ID}, - Name: experiment.Name, Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiment.ID}, + Name: experiment.Name, Relationship: run_model.APIRelationshipOWNER.Pointer(), }, { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION, ID: pipelineVersion.ID}, - Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: pipelineVersion.ID}, + Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, }, }} @@ -319,17 +319,17 @@ func (s *ExperimentApiTest) TestExperimentAPI() { run2, _, err := s.runClient.Create(createRunRequest) assert.Nil(t, err) /* ---------- Create a new hello world job by specifying pipeline ID ---------- */ - createJobRequest := &jobParams.JobServiceCreateJobParams{Body: &job_model.APIJob{ + createJobRequest := &jobParams.JobServiceCreateJobParams{Job: &job_model.APIJob{ Name: "hello world", Description: "this is hello world", ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: experiment.ID}, - Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiment.ID}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION, ID: pipelineVersion.ID}, - Relationship: job_model.APIRelationshipCREATOR, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: pipelineVersion.ID}, + Relationship: job_model.APIRelationshipCREATOR.Pointer(), }, }, MaxConcurrency: 10, diff --git a/backend/test/integration/job_api_test.go b/backend/test/integration/job_api_test.go index 0f32a643960..ddf177bb187 100644 --- a/backend/test/integration/job_api_test.go +++ b/backend/test/integration/job_api_test.go @@ -171,21 +171,21 @@ func (s *JobApiTestSuite) TestJobApis() { /* ---------- Create a new hello world experiment ---------- */ experiment := test.GetExperiment("hello world experiment", "", s.resourceNamespace) - helloWorldExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + helloWorldExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.Nil(t, err) /* ---------- Create a new hello world job by specifying pipeline ID ---------- */ - createJobRequest := &jobparams.JobServiceCreateJobParams{Body: &job_model.APIJob{ + createJobRequest := &jobparams.JobServiceCreateJobParams{Job: &job_model.APIJob{ Name: "hello world", Description: "this is hello world", ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: helloWorldExperiment.ID}, - Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: helloWorldExperiment.ID}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION, ID: helloWorldPipelineVersion.ID}, - Relationship: job_model.APIRelationshipCREATOR, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: helloWorldPipelineVersion.ID}, + Relationship: job_model.APIRelationshipCREATOR.Pointer(), }, }, MaxConcurrency: 10, @@ -202,7 +202,7 @@ func (s *JobApiTestSuite) TestJobApis() { /* ---------- Create a new argument parameter experiment ---------- */ experiment = test.GetExperiment("argument parameter experiment", "", s.resourceNamespace) - argParamsExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + argParamsExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.Nil(t, err) /* ---------- Create a new argument parameter job by uploading workflow manifest ---------- */ @@ -213,7 +213,7 @@ func (s *JobApiTestSuite) TestJobApis() { assert.Nil(t, err) argParamsBytes, err = yaml.ToJSON(argParamsBytes) assert.Nil(t, err) - createJobRequest = &jobparams.JobServiceCreateJobParams{Body: &job_model.APIJob{ + createJobRequest = &jobparams.JobServiceCreateJobParams{Job: &job_model.APIJob{ Name: "argument parameter", Description: "this is argument parameter", PipelineSpec: &job_model.APIPipelineSpec{ @@ -225,8 +225,8 @@ func (s *JobApiTestSuite) TestJobApis() { }, ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: argParamsExperiment.ID}, - Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: argParamsExperiment.ID}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, }, MaxConcurrency: 10, @@ -316,17 +316,17 @@ func (s *JobApiTestSuite) TestJobApis() { time.Sleep(5 * time.Second) // Sleep for 5 seconds to make sure the previous jobs are created at a different timestamp filterTime := time.Now().Unix() time.Sleep(5 * time.Second) - createJobRequestNew := &jobparams.JobServiceCreateJobParams{Body: &job_model.APIJob{ + createJobRequestNew := &jobparams.JobServiceCreateJobParams{Job: &job_model.APIJob{ Name: "new hello world job", Description: "this is a new hello world", ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: helloWorldExperiment.ID}, - Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: helloWorldExperiment.ID}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION, ID: helloWorldPipelineVersion.ID}, - Relationship: job_model.APIRelationshipCREATOR, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: helloWorldPipelineVersion.ID}, + Relationship: job_model.APIRelationshipCREATOR.Pointer(), }, }, MaxConcurrency: 10, @@ -414,7 +414,7 @@ func (s *JobApiTestSuite) TestJobApis_noCatchupOption() { /* ---------- Create a periodic job with start and end date in the past and catchup = true ---------- */ experiment := test.GetExperiment("periodic catchup true", "", s.resourceNamespace) - periodicCatchupTrueExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + periodicCatchupTrueExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.Nil(t, err) job := jobInThePastForTwoMinutes(jobOptions{ @@ -425,13 +425,13 @@ func (s *JobApiTestSuite) TestJobApis_noCatchupOption() { job.Name = "periodic-catchup-true-" job.Description = "A job with NoCatchup=false will backfill each past interval when behind schedule." job.NoCatchup = false // This is the key difference. - createJobRequest := &jobparams.JobServiceCreateJobParams{Body: job} + createJobRequest := &jobparams.JobServiceCreateJobParams{Job: job} _, err = s.jobClient.Create(createJobRequest) assert.Nil(t, err) /* -------- Create another periodic job with start and end date in the past but catchup = false ------ */ experiment = test.GetExperiment("periodic catchup false", "", s.resourceNamespace) - periodicCatchupFalseExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + periodicCatchupFalseExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.Nil(t, err) job = jobInThePastForTwoMinutes(jobOptions{ @@ -442,13 +442,13 @@ func (s *JobApiTestSuite) TestJobApis_noCatchupOption() { job.Name = "periodic-catchup-false-" job.Description = "A job with NoCatchup=true only schedules the last interval when behind schedule." job.NoCatchup = true // This is the key difference. - createJobRequest = &jobparams.JobServiceCreateJobParams{Body: job} + createJobRequest = &jobparams.JobServiceCreateJobParams{Job: job} _, err = s.jobClient.Create(createJobRequest) assert.Nil(t, err) /* ---------- Create a cron job with start and end date in the past and catchup = true ---------- */ experiment = test.GetExperiment("cron catchup true", "", s.resourceNamespace) - cronCatchupTrueExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + cronCatchupTrueExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.Nil(t, err) job = jobInThePastForTwoMinutes(jobOptions{ @@ -459,13 +459,13 @@ func (s *JobApiTestSuite) TestJobApis_noCatchupOption() { job.Name = "cron-catchup-true-" job.Description = "A job with NoCatchup=false will backfill each past interval when behind schedule." job.NoCatchup = false // This is the key difference. - createJobRequest = &jobparams.JobServiceCreateJobParams{Body: job} + createJobRequest = &jobparams.JobServiceCreateJobParams{Job: job} _, err = s.jobClient.Create(createJobRequest) assert.Nil(t, err) /* -------- Create another cron job with start and end date in the past but catchup = false ------ */ experiment = test.GetExperiment("cron catchup false", "", s.resourceNamespace) - cronCatchupFalseExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + cronCatchupFalseExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.Nil(t, err) job = jobInThePastForTwoMinutes(jobOptions{ @@ -476,7 +476,7 @@ func (s *JobApiTestSuite) TestJobApis_noCatchupOption() { job.Name = "cron-catchup-false-" job.Description = "A job with NoCatchup=true only schedules the last interval when behind schedule." job.NoCatchup = true // This is the key difference. - createJobRequest = &jobparams.JobServiceCreateJobParams{Body: job} + createJobRequest = &jobparams.JobServiceCreateJobParams{Job: job} _, err = s.jobClient.Create(createJobRequest) assert.Nil(t, err) @@ -557,12 +557,12 @@ func (s *JobApiTestSuite) checkHelloWorldJob(t *testing.T, job *job_model.APIJob }, ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: experimentID}, - Name: experimentName, Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experimentID}, + Name: experimentName, Relationship: job_model.APIRelationshipOWNER.Pointer(), }, { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION, ID: pipelineVersionId}, - Name: pipelineVersionName, Relationship: job_model.APIRelationshipCREATOR, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: pipelineVersionId}, + Name: pipelineVersionName, Relationship: job_model.APIRelationshipCREATOR.Pointer(), }, }, MaxConcurrency: 10, @@ -596,8 +596,8 @@ func (s *JobApiTestSuite) checkArgParamsJob(t *testing.T, job *job_model.APIJob, }, ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: experimentID}, - Name: experimentName, Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experimentID}, + Name: experimentName, Relationship: job_model.APIRelationshipOWNER.Pointer(), }, }, MaxConcurrency: 10, @@ -619,7 +619,7 @@ func (s *JobApiTestSuite) TestJobApis_SwfNotFound() { require.Nil(t, err) /* ---------- Create a new hello world job by specifying pipeline ID ---------- */ - createJobRequest := &jobparams.JobServiceCreateJobParams{Body: &job_model.APIJob{ + createJobRequest := &jobparams.JobServiceCreateJobParams{Job: &job_model.APIJob{ Name: "test-swf-not-found", PipelineSpec: &job_model.APIPipelineSpec{ PipelineID: pipeline.ID, @@ -630,12 +630,12 @@ func (s *JobApiTestSuite) TestJobApis_SwfNotFound() { // In multi-user mode, jobs must be associated with an experiment. if *isKubeflowMode { experiment := test.GetExperiment("test-swf-not-found experiment", "", s.resourceNamespace) - swfNotFoundExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + swfNotFoundExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.Nil(t, err) - createJobRequest.Body.ResourceReferences = []*job_model.APIResourceReference{ - {Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: swfNotFoundExperiment.ID}, - Relationship: job_model.APIRelationshipOWNER, + createJobRequest.Job.ResourceReferences = []*job_model.APIResourceReference{ + {Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: swfNotFoundExperiment.ID}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, } } @@ -694,12 +694,12 @@ func (s *JobApiTestSuite) checkHelloWorldRun(run *run_model.APIRun, experimentID // Check runtime workflow manifest is not empty resourceReferences := []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experimentID}, - Name: experimentName, Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experimentID}, + Name: experimentName, Relationship: run_model.APIRelationshipOWNER.Pointer(), }, { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeJOB, ID: jobID}, - Name: jobName, Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeJOB.Pointer(), ID: jobID}, + Name: jobName, Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, } if !test.VerifyRunResourceReferences(run.ResourceReferences, resourceReferences) { @@ -716,12 +716,12 @@ func (s *JobApiTestSuite) checkArgParamsRun(run *run_model.APIRun, experimentID // Check runtime workflow manifest is not empty resourceReferences := []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experimentID}, - Name: experimentName, Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experimentID}, + Name: experimentName, Relationship: run_model.APIRelationshipOWNER.Pointer(), }, { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeJOB, ID: jobID}, - Name: jobName, Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeJOB.Pointer(), ID: jobID}, + Name: jobName, Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, } if !test.VerifyRunResourceReferences(run.ResourceReferences, resourceReferences) { @@ -757,12 +757,12 @@ func defaultApiJob(pipelineVersionId, experimentId string) *job_model.APIJob { Description: "This is a default pipeline", ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: experimentId}, - Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experimentId}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION, ID: pipelineVersionId}, - Relationship: job_model.APIRelationshipCREATOR, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: pipelineVersionId}, + Relationship: job_model.APIRelationshipCREATOR.Pointer(), }, }, MaxConcurrency: 10, diff --git a/backend/test/integration/pipeline_api_test.go b/backend/test/integration/pipeline_api_test.go index f313519f22d..60df103f7ab 100644 --- a/backend/test/integration/pipeline_api_test.go +++ b/backend/test/integration/pipeline_api_test.go @@ -123,7 +123,7 @@ func (s *PipelineApiTest) TestPipelineAPI() { /* ---------- Import pipeline YAML by URL ---------- */ time.Sleep(1 * time.Second) sequentialPipeline, err := s.pipelineClient.Create(¶ms.PipelineServiceCreatePipelineV1Params{ - Body: &model.APIPipeline{Name: "sequential", URL: &model.APIURL{ + Pipeline: &model.APIPipeline{Name: "sequential", URL: &model.APIURL{ PipelineURL: "https://raw.githubusercontent.com/kubeflow/pipelines/refs/heads/master/backend/test/v2/resources/sequential.yaml", }}, }) @@ -146,7 +146,7 @@ func (s *PipelineApiTest) TestPipelineAPI() { time.Sleep(1 * time.Second) argumentUrlPipeline, err := s.pipelineClient.Create(¶ms.PipelineServiceCreatePipelineV1Params{ - Body: &model.APIPipeline{ + Pipeline: &model.APIPipeline{ URL: &model.APIURL{ PipelineURL: pipelineURL, }, @@ -281,8 +281,8 @@ func verifyPipeline(t *testing.T, pipeline *model.APIPipeline) { {Name: "param2"}, }, ResourceReferences: []*model.APIResourceReference{{ - Key: &model.APIResourceKey{ID: pipeline.ID, Type: model.APIResourceTypePIPELINE}, - Relationship: model.APIRelationshipOWNER, + Key: &model.APIResourceKey{ID: pipeline.ID, Type: model.APIResourceTypePIPELINE.Pointer()}, + Relationship: model.APIRelationshipOWNER.Pointer(), }}, }, } diff --git a/backend/test/integration/pipeline_version_api_test.go b/backend/test/integration/pipeline_version_api_test.go index 69717c5ffa3..fb52523de03 100644 --- a/backend/test/integration/pipeline_version_api_test.go +++ b/backend/test/integration/pipeline_version_api_test.go @@ -143,15 +143,15 @@ func (s *PipelineVersionApiTest) TestArgoSpec() { /* ---------- Import pipeline version YAML by URL ---------- */ time.Sleep(1 * time.Second) sequentialPipelineVersion, err := s.pipelineClient.CreatePipelineVersion(¶ms.PipelineServiceCreatePipelineVersionV1Params{ - Body: &pipeline_model.APIPipelineVersion{ + Version: &pipeline_model.APIPipelineVersion{ Name: "sequential", PackageURL: &pipeline_model.APIURL{ PipelineURL: "https://raw.githubusercontent.com/kubeflow/pipelines/refs/heads/master/backend/test/v2/resources/sequential.yaml", }, ResourceReferences: []*pipeline_model.APIResourceReference{ { - Key: &pipeline_model.APIResourceKey{Type: pipeline_model.APIResourceTypePIPELINE, ID: pipelineId}, - Relationship: pipeline_model.APIRelationshipOWNER, + Key: &pipeline_model.APIResourceKey{Type: pipeline_model.APIResourceTypePIPELINE.Pointer(), ID: pipelineId}, + Relationship: pipeline_model.APIRelationshipOWNER.Pointer(), }, }, }, @@ -178,15 +178,15 @@ func (s *PipelineVersionApiTest) TestArgoSpec() { } argumentUrlPipelineVersion, err := s.pipelineClient.CreatePipelineVersion(¶ms.PipelineServiceCreatePipelineVersionV1Params{ - Body: &pipeline_model.APIPipelineVersion{ + Version: &pipeline_model.APIPipelineVersion{ Name: "arguments", PackageURL: &pipeline_model.APIURL{ PipelineURL: pipelineURL, }, ResourceReferences: []*pipeline_model.APIResourceReference{ { - Key: &pipeline_model.APIResourceKey{Type: pipeline_model.APIResourceTypePIPELINE, ID: pipelineId}, - Relationship: pipeline_model.APIRelationshipOWNER, + Key: &pipeline_model.APIResourceKey{Type: pipeline_model.APIResourceTypePIPELINE.Pointer(), ID: pipelineId}, + Relationship: pipeline_model.APIRelationshipOWNER.Pointer(), }, }, }, diff --git a/backend/test/integration/run_api_test.go b/backend/test/integration/run_api_test.go index ad641191971..97316407d46 100644 --- a/backend/test/integration/run_api_test.go +++ b/backend/test/integration/run_api_test.go @@ -141,21 +141,21 @@ func (s *RunApiTestSuite) TestRunApis() { /* ---------- Create a new hello world experiment ---------- */ experiment := test.GetExperiment("hello world experiment", "", s.resourceNamespace) - helloWorldExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + helloWorldExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) assert.Nil(t, err) /* ---------- Create a new hello world run by specifying pipeline version ID ---------- */ - createRunRequest := &runparams.RunServiceCreateRunV1Params{Body: &run_model.APIRun{ + createRunRequest := &runparams.RunServiceCreateRunV1Params{Run: &run_model.APIRun{ Name: "hello world", Description: "this is hello world", ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: helloWorldExperiment.ID}, - Name: helloWorldExperiment.Name, Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: helloWorldExperiment.ID}, + Name: helloWorldExperiment.Name, Relationship: run_model.APIRelationshipOWNER.Pointer(), }, { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION, ID: helloWorldPipelineVersion.ID}, - Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: helloWorldPipelineVersion.ID}, + Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, }, }} @@ -170,7 +170,7 @@ func (s *RunApiTestSuite) TestRunApis() { /* ---------- Create a new argument parameter experiment ---------- */ createExperimentRequest := &experimentparams.ExperimentServiceCreateExperimentV1Params{ - Body: test.GetExperiment("argument parameter experiment", "", s.resourceNamespace), + Experiment: test.GetExperiment("argument parameter experiment", "", s.resourceNamespace), } argParamsExperiment, err := s.experimentClient.Create(createExperimentRequest) assert.Nil(t, err) @@ -180,7 +180,7 @@ func (s *RunApiTestSuite) TestRunApis() { assert.Nil(t, err) argParamsBytes, err = yaml.ToJSON(argParamsBytes) assert.Nil(t, err) - createRunRequest = &runparams.RunServiceCreateRunV1Params{Body: &run_model.APIRun{ + createRunRequest = &runparams.RunServiceCreateRunV1Params{Run: &run_model.APIRun{ Name: "argument parameter", Description: "this is argument parameter", PipelineSpec: &run_model.APIPipelineSpec{ @@ -192,8 +192,8 @@ func (s *RunApiTestSuite) TestRunApis() { }, ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: argParamsExperiment.ID}, - Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: argParamsExperiment.ID}, + Relationship: run_model.APIRelationshipOWNER.Pointer(), }, }, }} @@ -280,7 +280,7 @@ func (s *RunApiTestSuite) TestRunApis() { filterTime := time.Now().Unix() time.Sleep(5 * time.Second) // Create a new run - createRunRequest.Body.Name = "argument parameter 2" + createRunRequest.Run.Name = "argument parameter 2" _, _, err = s.runClient.Create(createRunRequest) assert.Nil(t, err) // Check total number of runs is 3 @@ -314,7 +314,7 @@ func (s *RunApiTestSuite) TestRunApis() { assert.Equal(t, 1, len(runs)) assert.Equal(t, 1, totalSize) assert.Equal(t, "hello world", runs[0].Name) - assert.Equal(t, string(runs[0].StorageState), api.Run_STORAGESTATE_ARCHIVED.String()) + assert.Equal(t, string(*runs[0].StorageState), api.Run_STORAGESTATE_ARCHIVED.String()) /* ---------- Upload long-running pipeline YAML ---------- */ longRunningPipeline, err := s.pipelineUploadClient.UploadFile("../resources/long-running.yaml", uploadParams.NewUploadPipelineParamsWithTimeout(10*time.Second)) @@ -329,17 +329,17 @@ func (s *RunApiTestSuite) TestRunApis() { assert.Nil(t, err) /* ---------- Create a new long-running run by specifying pipeline ID ---------- */ - createLongRunningRunRequest := &runparams.RunServiceCreateRunV1Params{Body: &run_model.APIRun{ + createLongRunningRunRequest := &runparams.RunServiceCreateRunV1Params{Run: &run_model.APIRun{ Name: "long running", Description: "this pipeline will run long enough for us to manually terminate it before it finishes", ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: helloWorldExperiment.ID}, - Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: helloWorldExperiment.ID}, + Relationship: run_model.APIRelationshipOWNER.Pointer(), }, { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION, ID: longRunningPipelineVersion.ID}, - Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: longRunningPipelineVersion.ID}, + Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, }, }} @@ -377,12 +377,12 @@ func (s *RunApiTestSuite) checkTerminatedRunDetail(t *testing.T, runDetail *run_ }, ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experimentId}, - Name: experimentName, Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experimentId}, + Name: experimentName, Relationship: run_model.APIRelationshipOWNER.Pointer(), }, { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION, ID: pipelineVersionId}, - Name: pipelineVersionName, Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: pipelineVersionId}, + Name: pipelineVersionName, Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, }, CreatedAt: runDetail.Run.CreatedAt, @@ -414,12 +414,12 @@ func (s *RunApiTestSuite) checkHelloWorldRunDetail(t *testing.T, runDetail *run_ }, ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experimentId}, - Name: experimentName, Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experimentId}, + Name: experimentName, Relationship: run_model.APIRelationshipOWNER.Pointer(), }, { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION, ID: pipelineVersionId}, - Name: pipelineVersionName, Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: pipelineVersionId}, + Name: pipelineVersionName, Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, }, CreatedAt: runDetail.Run.CreatedAt, @@ -456,8 +456,8 @@ func (s *RunApiTestSuite) checkArgParamsRunDetail(t *testing.T, runDetail *run_m }, ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experimentId}, - Name: experimentName, Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experimentId}, + Name: experimentName, Relationship: run_model.APIRelationshipOWNER.Pointer(), }, }, CreatedAt: runDetail.Run.CreatedAt, diff --git a/backend/test/integration/upgrade_test.go b/backend/test/integration/upgrade_test.go index 02c333c0385..fff4aead61d 100644 --- a/backend/test/integration/upgrade_test.go +++ b/backend/test/integration/upgrade_test.go @@ -186,7 +186,7 @@ func (s *UpgradeTests) PrepareExperiments() { /* ---------- Create a new experiment ---------- */ experiment := test.GetExperiment("training", "my first experiment", s.resourceNamespace) _, err := s.experimentClient.Create(&experimentParams.ExperimentServiceCreateExperimentV1Params{ - Body: experiment, + Experiment: experiment, }) require.Nil(t, err) @@ -195,14 +195,14 @@ func (s *UpgradeTests) PrepareExperiments() { time.Sleep(1 * time.Second) experiment = test.GetExperiment("prediction", "my second experiment", s.resourceNamespace) _, err = s.experimentClient.Create(&experimentParams.ExperimentServiceCreateExperimentV1Params{ - Body: experiment, + Experiment: experiment, }) require.Nil(t, err) time.Sleep(1 * time.Second) experiment = test.GetExperiment("moonshot", "my third experiment", s.resourceNamespace) _, err = s.experimentClient.Create(&experimentParams.ExperimentServiceCreateExperimentV1Params{ - Body: experiment, + Experiment: experiment, }) require.Nil(t, err) } @@ -272,7 +272,7 @@ func (s *UpgradeTests) PreparePipelines() { /* ---------- Import pipeline YAML by URL ---------- */ time.Sleep(1 * time.Second) sequentialPipeline, err := s.pipelineClient.Create(&pipelineParams.PipelineServiceCreatePipelineV1Params{ - Body: &pipeline_model.APIPipeline{Name: "sequential", URL: &pipeline_model.APIURL{ + Pipeline: &pipeline_model.APIPipeline{Name: "sequential", URL: &pipeline_model.APIURL{ PipelineURL: "https://raw.githubusercontent.com/kubeflow/pipelines/refs/heads/master/backend/test/v2/resources/sequential.yaml", }}, }) @@ -295,7 +295,7 @@ func (s *UpgradeTests) PreparePipelines() { time.Sleep(1 * time.Second) argumentUrlPipeline, err := s.pipelineClient.Create(&pipelineParams.PipelineServiceCreatePipelineV1Params{ - Body: &pipeline_model.APIPipeline{ + Pipeline: &pipeline_model.APIPipeline{ URL: &pipeline_model.APIURL{ PipelineURL: pipelineURL, }, @@ -353,7 +353,7 @@ func (s *UpgradeTests) PrepareRuns() { require.Equal(t, hello2, helloWorldExperiment) /* ---------- Create a new hello world run by specifying pipeline ID ---------- */ - createRunRequest := &runParams.RunServiceCreateRunV1Params{Body: &run_model.APIRun{ + createRunRequest := &runParams.RunServiceCreateRunV1Params{Run: &run_model.APIRun{ Name: "hello world", Description: "this is hello world", PipelineSpec: &run_model.APIPipelineSpec{ @@ -361,8 +361,8 @@ func (s *UpgradeTests) PrepareRuns() { }, ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: helloWorldExperiment.ID}, - Name: helloWorldExperiment.Name, Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: helloWorldExperiment.ID}, + Name: helloWorldExperiment.Name, Relationship: run_model.APIRelationshipOWNER.Pointer(), }, }, }} @@ -395,7 +395,7 @@ func (s *UpgradeTests) PrepareJobs() { experiment := s.getHelloWorldExperiment(true) /* ---------- Create a new hello world job by specifying pipeline ID ---------- */ - createJobRequest := &jobparams.JobServiceCreateJobParams{Body: &job_model.APIJob{ + createJobRequest := &jobparams.JobServiceCreateJobParams{Job: &job_model.APIJob{ Name: "hello world", Description: "this is hello world", PipelineSpec: &job_model.APIPipelineSpec{ @@ -403,8 +403,8 @@ func (s *UpgradeTests) PrepareJobs() { }, ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: experiment.ID}, - Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiment.ID}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, }, MaxConcurrency: 10, @@ -440,8 +440,8 @@ func (s *UpgradeTests) VerifyJobs() { }, ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: experiment.ID}, - Name: experiment.Name, Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiment.ID}, + Name: experiment.Name, Relationship: job_model.APIRelationshipOWNER.Pointer(), }, }, ServiceAccount: test.GetDefaultPipelineRunnerServiceAccount(*isKubeflowMode), @@ -478,7 +478,7 @@ func (s *UpgradeTests) VerifyCreatingRunsAndJobs() { assert.Equal(t, "hello world experiment", experiments[4].Name) /* ---------- Create a new run based on the oldest pipeline and its default pipeline version ---------- */ - createRunRequest := &runParams.RunServiceCreateRunV1Params{Body: &run_model.APIRun{ + createRunRequest := &runParams.RunServiceCreateRunV1Params{Run: &run_model.APIRun{ Name: "argument parameter from pipeline", Description: "a run from an old pipeline", PipelineSpec: &run_model.APIPipelineSpec{ @@ -490,19 +490,19 @@ func (s *UpgradeTests) VerifyCreatingRunsAndJobs() { // This run should belong to the newest experiment (created after the upgrade) ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experiments[4].ID}, - Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiments[4].ID}, + Relationship: run_model.APIRelationshipOWNER.Pointer(), }, { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINE, ID: pipelines[0].ID}, - Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINE.Pointer(), ID: pipelines[0].ID}, + Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, }, }} runFromPipeline, _, err := s.runClient.Create(createRunRequest) assert.Nil(t, err) - createRunRequestVersion := &runParams.RunServiceCreateRunV1Params{Body: &run_model.APIRun{ + createRunRequestVersion := &runParams.RunServiceCreateRunV1Params{Run: &run_model.APIRun{ Name: "argument parameter from pipeline version", Description: "a run from an old pipeline version", PipelineSpec: &run_model.APIPipelineSpec{ @@ -514,8 +514,8 @@ func (s *UpgradeTests) VerifyCreatingRunsAndJobs() { // This run should be assigned to Default experiment ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION, ID: pipelines[0].DefaultVersion.ID}, - Relationship: run_model.APIRelationshipCREATOR, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: pipelines[0].DefaultVersion.ID}, + Relationship: run_model.APIRelationshipCREATOR.Pointer(), }, }, }} @@ -533,8 +533,8 @@ func (s *UpgradeTests) VerifyCreatingRunsAndJobs() { runFromPipeline.Run.ResourceReferences, []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experiments[4].ID}, - Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiments[4].ID}, + Relationship: run_model.APIRelationshipOWNER.Pointer(), }, }, )) @@ -542,26 +542,26 @@ func (s *UpgradeTests) VerifyCreatingRunsAndJobs() { runFromPipelineVersion.Run.ResourceReferences, []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: experiments[0].ID}, - Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiments[0].ID}, + Relationship: run_model.APIRelationshipOWNER.Pointer(), }, }, )) /* ---------- Create a new recurring run based on the second oldest pipeline version and belonging to the second oldest experiment ---------- */ - createJobRequest := &jobparams.JobServiceCreateJobParams{Body: &job_model.APIJob{ + createJobRequest := &jobparams.JobServiceCreateJobParams{Job: &job_model.APIJob{ Description: "a recurring run from an old pipeline version", Enabled: true, MaxConcurrency: 10, Name: "sequential job from pipeline version", ResourceReferences: []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: experiments[1].ID}, - Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiments[1].ID}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION, ID: pipelines[0].DefaultVersion.ID}, - Relationship: job_model.APIRelationshipCREATOR, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypePIPELINEVERSION.Pointer(), ID: pipelines[0].DefaultVersion.ID}, + Relationship: job_model.APIRelationshipCREATOR.Pointer(), }, }, }} @@ -573,8 +573,8 @@ func (s *UpgradeTests) VerifyCreatingRunsAndJobs() { createdJob.ResourceReferences, []*job_model.APIResourceReference{ { - Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT, ID: experiments[1].ID}, - Relationship: job_model.APIRelationshipOWNER, + Key: &job_model.APIResourceKey{Type: job_model.APIResourceTypeEXPERIMENT.Pointer(), ID: experiments[1].ID}, + Relationship: job_model.APIRelationshipOWNER.Pointer(), }, }, )) @@ -601,8 +601,8 @@ func checkHelloWorldRunDetail(t *testing.T, runDetail *run_model.APIRunDetail) { }, ResourceReferences: []*run_model.APIResourceReference{ { - Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT, ID: expectedExperimentID}, - Name: "hello world experiment", Relationship: run_model.APIRelationshipOWNER, + Key: &run_model.APIResourceKey{Type: run_model.APIResourceTypeEXPERIMENT.Pointer(), ID: expectedExperimentID}, + Name: "hello world experiment", Relationship: run_model.APIRelationshipOWNER.Pointer(), }, }, ServiceAccount: test.GetDefaultPipelineRunnerServiceAccount(*isKubeflowMode), @@ -619,7 +619,7 @@ func (s *UpgradeTests) createHelloWorldExperiment() *experiment_model.APIExperim t := s.T() experiment := test.GetExperiment("hello world experiment", "", s.resourceNamespace) - helloWorldExperiment, err := s.experimentClient.Create(&experimentParams.ExperimentServiceCreateExperimentV1Params{Body: experiment}) + helloWorldExperiment, err := s.experimentClient.Create(&experimentParams.ExperimentServiceCreateExperimentV1Params{Experiment: experiment}) require.Nil(t, err) return helloWorldExperiment diff --git a/backend/test/integration/visualization_api_test.go b/backend/test/integration/visualization_api_test.go index 0519aaae39d..96e5fdde30b 100644 --- a/backend/test/integration/visualization_api_test.go +++ b/backend/test/integration/visualization_api_test.go @@ -77,10 +77,10 @@ func (s *VisualizationApiTest) TestVisualizationAPI() { /* ---------- Generate custom visualization --------- */ visualization := &visualization_model.APIVisualization{ Arguments: `{"code": ["print(2)"]}`, - Type: visualization_model.APIVisualizationTypeCUSTOM, + Type: visualization_model.APIVisualizationTypeCUSTOM.Pointer(), } customVisualization, err := s.visualizationClient.Create(¶ms.VisualizationServiceCreateVisualizationV1Params{ - Body: visualization, + Visualization: visualization, }) assert.Nil(t, err) assert.NotNil(t, customVisualization.HTML) diff --git a/backend/test/test_utils.go b/backend/test/test_utils.go index fb395ee15a4..f3d79094602 100644 --- a/backend/test/test_utils.go +++ b/backend/test/test_utils.go @@ -124,7 +124,7 @@ func DeleteAllJobs(client *api_server.JobClient, namespace string, t *testing.T) func GetExperimentIDFromV1beta1ResourceReferences(resourceRefs []*run_model.APIResourceReference) string { experimentID := "" for _, resourceRef := range resourceRefs { - if resourceRef.Key.Type == run_model.APIResourceTypeEXPERIMENT { + if resourceRef.Key.Type == run_model.APIResourceTypeEXPERIMENT.Pointer() { experimentID = resourceRef.Key.ID break } @@ -197,10 +197,10 @@ func GetExperiment(name string, description string, namespace string) *experimen experiment.ResourceReferences = []*experiment_model.APIResourceReference{ { Key: &experiment_model.APIResourceKey{ - Type: experiment_model.APIResourceTypeNAMESPACE, + Type: experiment_model.APIResourceTypeNAMESPACE.Pointer(), ID: namespace, }, - Relationship: experiment_model.APIRelationshipOWNER, + Relationship: experiment_model.APIRelationshipOWNER.Pointer(), }, } } diff --git a/backend/test/v2/integration/cache_test.go b/backend/test/v2/integration/cache_test.go index 47a643075ff..77608e3d831 100644 --- a/backend/test/v2/integration/cache_test.go +++ b/backend/test/v2/integration/cache_test.go @@ -122,7 +122,7 @@ func (s *CacheTestSuite) TestCacheRecurringRun() { pipelineVersion := s.preparePipeline() - createRecurringRunRequest := &recurringRunParams.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequest := &recurringRunParams.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "hello world", Description: "this is hello world", PipelineVersionReference: &recurring_run_model.V2beta1PipelineVersionReference{ @@ -130,7 +130,7 @@ func (s *CacheTestSuite) TestCacheRecurringRun() { PipelineVersionID: pipelineVersion.PipelineVersionID, }, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), Trigger: &recurring_run_model.V2beta1Trigger{ PeriodicSchedule: &recurring_run_model.V2beta1PeriodicSchedule{ IntervalSecond: 60, @@ -155,7 +155,7 @@ func (s *CacheTestSuite) TestCacheRecurringRun() { if len(allRuns) >= 2 { for _, run := range allRuns { - if run.State != run_model.V2beta1RuntimeStateSUCCEEDED { + if run.State != run_model.V2beta1RuntimeStateSUCCEEDED.Pointer() { return false } } @@ -249,7 +249,7 @@ func (s *CacheTestSuite) TestCacheSingleRun() { } func (s *CacheTestSuite) createRun(pipelineVersion *pipeline_upload_model.V2beta1PipelineVersion) (*run_model.V2beta1Run, error) { - createRunRequest := &runParams.RunServiceCreateRunParams{Body: &run_model.V2beta1Run{ + createRunRequest := &runParams.RunServiceCreateRunParams{Run: &run_model.V2beta1Run{ DisplayName: "hello-world", Description: "this is hello-world", PipelineVersionReference: &run_model.V2beta1PipelineVersionReference{ @@ -271,7 +271,7 @@ func (s *CacheTestSuite) createRun(pipelineVersion *pipeline_upload_model.V2beta s.T().Logf("Pipeline %v state: %v", pipelineRunDetail.RunID, pipelineRunDetail.State) - return err == nil && pipelineRunDetail.State == expectedState + return err == nil && *pipelineRunDetail.State == expectedState }, 2*time.Minute, 10*time.Second) return pipelineRunDetail, err diff --git a/backend/test/v2/integration/experiment_api_test.go b/backend/test/v2/integration/experiment_api_test.go index e22af6083cd..cf475c971a0 100644 --- a/backend/test/v2/integration/experiment_api_test.go +++ b/backend/test/v2/integration/experiment_api_test.go @@ -143,18 +143,18 @@ func (s *ExperimentApiTest) TestExperimentAPI() { expectedTrainingExperiment := test.MakeExperiment("training", "my first experiment", s.resourceNamespace) trainingExperiment, err := s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentParams{ - Body: experiment, + Experiment: experiment, }) assert.Nil(t, err) expectedTrainingExperiment.ExperimentID = trainingExperiment.ExperimentID expectedTrainingExperiment.CreatedAt = trainingExperiment.CreatedAt - expectedTrainingExperiment.StorageState = "STORAGESTATE_AVAILABLE" + expectedTrainingExperiment.StorageState = (*experiment_model.V2beta1ExperimentStorageState)(util.StringPointer("STORAGESTATE_AVAILABLE")) expectedTrainingExperiment.Namespace = trainingExperiment.Namespace assert.Equal(t, expectedTrainingExperiment, trainingExperiment) /* ---------- Create an experiment with same name. Should fail due to name uniqueness ---------- */ - _, err = s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentParams{Body: experiment}) + _, err = s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.NotNil(t, err) assert.Contains(t, err.Error(), "Please specify a new name") @@ -163,12 +163,12 @@ func (s *ExperimentApiTest) TestExperimentAPI() { time.Sleep(1 * time.Second) experiment = test.MakeExperiment("prediction", "my second experiment", s.resourceNamespace) _, err = s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentParams{ - Body: experiment, + Experiment: experiment, }) time.Sleep(1 * time.Second) experiment = test.MakeExperiment("moonshot", "my second experiment", s.resourceNamespace) _, err = s.experimentClient.Create(¶ms.ExperimentServiceCreateExperimentParams{ - Body: experiment, + Experiment: experiment, }) assert.Nil(t, err) @@ -299,7 +299,7 @@ func (s *ExperimentApiTest) TestExperimentAPI() { Pipelineid: util.StringPointer(pipeline.PipelineID), }) assert.Nil(t, err) - createRunRequest := &run_params.RunServiceCreateRunParams{Body: &run_model.V2beta1Run{ + createRunRequest := &run_params.RunServiceCreateRunParams{Run: &run_model.V2beta1Run{ DisplayName: "hello world", Description: "this is hello world", ExperimentID: experiment.ExperimentID, @@ -313,7 +313,7 @@ func (s *ExperimentApiTest) TestExperimentAPI() { run2, err := s.runClient.Create(createRunRequest) assert.Nil(t, err) /* ---------- Create a new hello world job by specifying pipeline ID ---------- */ - createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "hello world", Description: "this is hello world", ExperimentID: experiment.ExperimentID, @@ -322,7 +322,7 @@ func (s *ExperimentApiTest) TestExperimentAPI() { PipelineVersionID: pipelineVersion.PipelineVersionID, }, MaxConcurrency: 10, - Status: recurring_run_model.V2beta1RecurringRunStatusENABLED, + Status: recurring_run_model.V2beta1RecurringRunStatusENABLED.Pointer(), }} recurringRun1, err := s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) diff --git a/backend/test/v2/integration/pipeline_api_test.go b/backend/test/v2/integration/pipeline_api_test.go index 98dbe9039cb..ea8b269c3f5 100644 --- a/backend/test/v2/integration/pipeline_api_test.go +++ b/backend/test/v2/integration/pipeline_api_test.go @@ -166,13 +166,13 @@ func (s *PipelineApiTest) TestPipelineAPI() { time.Sleep(1 * time.Second) argumentUrlPipeline, err := s.pipelineClient.Create(¶ms.PipelineServiceCreatePipelineParams{ - Body: &model.V2beta1Pipeline{DisplayName: "arguments.pipeline.zip"}, + Pipeline: &model.V2beta1Pipeline{DisplayName: "arguments.pipeline.zip"}, }) require.Nil(t, err) argumentUrlPipelineVersion, err := s.pipelineClient.CreatePipelineVersion( ¶ms.PipelineServiceCreatePipelineVersionParams{ PipelineID: argumentUrlPipeline.PipelineID, - Body: &model.V2beta1PipelineVersion{ + PipelineVersion: &model.V2beta1PipelineVersion{ DisplayName: "argumenturl-v1", Description: "1st version of argument url pipeline", PipelineID: sequentialPipeline.PipelineID, diff --git a/backend/test/v2/integration/pipeline_version_api_test.go b/backend/test/v2/integration/pipeline_version_api_test.go index a25914fb814..6477c7f603c 100644 --- a/backend/test/v2/integration/pipeline_version_api_test.go +++ b/backend/test/v2/integration/pipeline_version_api_test.go @@ -137,7 +137,7 @@ func (s *PipelineVersionApiTest) TestPipelineSpec() { time.Sleep(1 * time.Second) sequentialPipelineVersion, err := s.pipelineClient.CreatePipelineVersion(¶ms.PipelineServiceCreatePipelineVersionParams{ PipelineID: pipelineId, - Body: &pipeline_model.V2beta1PipelineVersion{ + PipelineVersion: &pipeline_model.V2beta1PipelineVersion{ Name: "sequential-v2", DisplayName: "sequential", PackageURL: &pipeline_model.V2beta1URL{ @@ -170,7 +170,7 @@ func (s *PipelineVersionApiTest) TestPipelineSpec() { time.Sleep(1 * time.Second) argumentUrlPipelineVersion, err := s.pipelineClient.CreatePipelineVersion(¶ms.PipelineServiceCreatePipelineVersionParams{ PipelineID: pipelineId, - Body: &pipeline_model.V2beta1PipelineVersion{ + PipelineVersion: &pipeline_model.V2beta1PipelineVersion{ DisplayName: "arguments", PackageURL: &pipeline_model.V2beta1URL{ PipelineURL: pipelineURL, diff --git a/backend/test/v2/integration/proxy_test.go b/backend/test/v2/integration/proxy_test.go index 33b6457c432..164d6587047 100644 --- a/backend/test/v2/integration/proxy_test.go +++ b/backend/test/v2/integration/proxy_test.go @@ -131,11 +131,11 @@ func (s *ProxyTestSuite) TestEnvVar() { /* ---------- Create a new env var experiment ---------- */ experiment := test.MakeExperiment("env var experiment", "", s.resourceNamespace) - envVarExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentParams{Body: experiment}) + envVarExperiment, err := s.experimentClient.Create(&experimentparams.ExperimentServiceCreateExperimentParams{Experiment: experiment}) require.Nil(t, err) /* ---------- Create a new env var run by specifying pipeline version ID ---------- */ - createRunRequest := &runparams.RunServiceCreateRunParams{Body: &run_model.V2beta1Run{ + createRunRequest := &runparams.RunServiceCreateRunParams{Run: &run_model.V2beta1Run{ DisplayName: "env var", Description: "this is env var", ExperimentID: envVarExperiment.ExperimentID, @@ -160,7 +160,7 @@ func (s *ProxyTestSuite) TestEnvVar() { assert.Eventually(t, func() bool { envVarRunDetail, err = s.runClient.Get(&runparams.RunServiceGetRunParams{RunID: envVarRunDetail.RunID}) t.Logf("Pipeline state: %v", envVarRunDetail.State) - return err == nil && envVarRunDetail.State == expectedState + return err == nil && *envVarRunDetail.State == expectedState }, 2*time.Minute, 10*time.Second) } diff --git a/backend/test/v2/integration/recurring_run_api_test.go b/backend/test/v2/integration/recurring_run_api_test.go index e17e826a134..ef51361b3ff 100644 --- a/backend/test/v2/integration/recurring_run_api_test.go +++ b/backend/test/v2/integration/recurring_run_api_test.go @@ -164,11 +164,11 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis() { /* ---------- Create a new hello world experiment ---------- */ experiment := test.MakeExperiment("hello world experiment", "", s.resourceNamespace) - helloWorldExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + helloWorldExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) /* ---------- Create a new hello world recurringRun by specifying pipeline ID ---------- */ - createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "hello world", Description: "this is hello world", ExperimentID: helloWorldExperiment.ExperimentID, @@ -177,7 +177,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis() { PipelineVersionID: helloWorldPipelineVersion.PipelineVersionID, }, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), }} helloWorldRecurringRun, err := s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) @@ -190,7 +190,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis() { /* ---------- Create a new argument parameter experiment ---------- */ experiment = test.MakeExperiment("argument parameter experiment", "", s.resourceNamespace) - argParamsExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + argParamsExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) /* ---------- Create a new argument parameter recurringRun by uploading workflow manifest ---------- */ @@ -203,7 +203,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis() { err = yaml.Unmarshal(argParamsBytes, pipeline_spec) assert.Nil(t, err) - createRecurringRunRequest = &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequest = &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "argument parameter", Description: "this is argument parameter", ExperimentID: argParamsExperiment.ExperimentID, @@ -215,7 +215,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis() { }, }, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), }} argParamsRecurringRun, err := s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) @@ -300,7 +300,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis() { time.Sleep(5 * time.Second) // Sleep for 5 seconds to make sure the previous recurringRuns are created at a different timestamp filterTime := time.Now().Unix() time.Sleep(5 * time.Second) - createRecurringRunRequestNew := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequestNew := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "new hello world recurringRun", Description: "this is a new hello world", ExperimentID: helloWorldExperiment.ExperimentID, @@ -309,7 +309,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis() { PipelineVersionID: helloWorldPipelineVersion.PipelineVersionID, }, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeDISABLE, + Mode: recurring_run_model.RecurringRunModeDISABLE.Pointer(), }} _, err = s.recurringRunClient.Create(createRecurringRunRequestNew) assert.Nil(t, err) @@ -391,11 +391,11 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApisUseLatest() { /* ---------- Create a new hello world experiment ---------- */ experiment := test.MakeExperiment("hello world experiment", "", s.resourceNamespace) - helloWorldExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + helloWorldExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) /* ---------- Create a new hello world recurringRun by specifying pipeline ID without a version ---------- */ - createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "hello world with latest pipeline version", Description: "this is hello world", ExperimentID: helloWorldExperiment.ExperimentID, @@ -403,7 +403,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApisUseLatest() { PipelineID: helloWorldPipelineVersion.PipelineID, }, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), }} helloWorldRecurringRun, err := s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) @@ -460,7 +460,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis_noCatchupOption() { /* ---------- Create a periodic recurringRun with start and end date in the past and catchup = true ---------- */ experiment := test.MakeExperiment("periodic catchup true", "", s.resourceNamespace) - periodicCatchupTrueExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + periodicCatchupTrueExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) recurringRun := recurringRunInThePastForTwoMinutes(recurringRunOptions{ @@ -472,13 +472,13 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis_noCatchupOption() { recurringRun.DisplayName = "periodic-catchup-true-" recurringRun.Description = "A recurringRun with NoCatchup=false will backfill each past interval when behind schedule." recurringRun.NoCatchup = false // This is the key difference. - createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: recurringRun} + createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: recurringRun} _, err = s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) /* -------- Create another periodic recurringRun with start and end date in the past but catchup = false ------ */ experiment = test.MakeExperiment("periodic catchup false", "", s.resourceNamespace) - periodicCatchupFalseExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + periodicCatchupFalseExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) recurringRun = recurringRunInThePastForTwoMinutes(recurringRunOptions{ @@ -490,13 +490,13 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis_noCatchupOption() { recurringRun.DisplayName = "periodic-catchup-false-" recurringRun.Description = "A recurringRun with NoCatchup=true only schedules the last interval when behind schedule." recurringRun.NoCatchup = true // This is the key difference. - createRecurringRunRequest = &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: recurringRun} + createRecurringRunRequest = &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: recurringRun} _, err = s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) /* ---------- Create a cron recurringRun with start and end date in the past and catchup = true ---------- */ experiment = test.MakeExperiment("cron catchup true", "", s.resourceNamespace) - cronCatchupTrueExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + cronCatchupTrueExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) recurringRun = recurringRunInThePastForTwoMinutes(recurringRunOptions{ @@ -508,13 +508,13 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis_noCatchupOption() { recurringRun.DisplayName = "cron-catchup-true-" recurringRun.Description = "A recurringRun with NoCatchup=false will backfill each past interval when behind schedule." recurringRun.NoCatchup = false // This is the key difference. - createRecurringRunRequest = &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: recurringRun} + createRecurringRunRequest = &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: recurringRun} _, err = s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) /* -------- Create another cron recurringRun with start and end date in the past but catchup = false ------ */ experiment = test.MakeExperiment("cron catchup false", "", s.resourceNamespace) - cronCatchupFalseExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + cronCatchupFalseExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) recurringRun = recurringRunInThePastForTwoMinutes(recurringRunOptions{ @@ -526,7 +526,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis_noCatchupOption() { recurringRun.DisplayName = "cron-catchup-false-" recurringRun.Description = "A recurringRun with NoCatchup=true only schedules the last interval when behind schedule." recurringRun.NoCatchup = true // This is the key difference. - createRecurringRunRequest = &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: recurringRun} + createRecurringRunRequest = &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: recurringRun} _, err = s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) @@ -600,7 +600,7 @@ func (s *RecurringRunApiTestSuite) checkHelloWorldRecurringRun(t *testing.T, rec PipelineVersionID: pipelineVersionId, }, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), Namespace: recurringRun.Namespace, CreatedAt: recurringRun.CreatedAt, UpdatedAt: recurringRun.UpdatedAt, @@ -625,7 +625,7 @@ func (s *RecurringRunApiTestSuite) checkArgParamsRecurringRun(t *testing.T, recu }, ExperimentID: experimentID, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), Namespace: recurringRun.Namespace, CreatedAt: recurringRun.CreatedAt, UpdatedAt: recurringRun.UpdatedAt, @@ -649,10 +649,10 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis_SwfNotFound() { /* ---------- Create a new hello world recurringRun by specifying pipeline ID ---------- */ experiment := test.MakeExperiment("test-swf-not-found experiment", "", s.resourceNamespace) - swfNotFoundExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + swfNotFoundExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) - createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "test-swf-not-found", ExperimentID: swfNotFoundExperiment.ExperimentID, PipelineVersionReference: &recurring_run_model.V2beta1PipelineVersionReference{ @@ -660,7 +660,7 @@ func (s *RecurringRunApiTestSuite) TestRecurringRunApis_SwfNotFound() { PipelineVersionID: pipelineVersions[0].PipelineVersionID, }, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeDISABLE, + Mode: recurring_run_model.RecurringRunModeDISABLE.Pointer(), }} recurringRun, err := s.recurringRunClient.Create(createRecurringRunRequest) @@ -755,7 +755,7 @@ func defaultV2beta1RecurringRun(pipelineId, pipelineVersionId, experimentId stri IntervalSecond: 60, }, }, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), } } diff --git a/backend/test/v2/integration/run_api_test.go b/backend/test/v2/integration/run_api_test.go index 6b489c53a5f..5a298577a17 100644 --- a/backend/test/v2/integration/run_api_test.go +++ b/backend/test/v2/integration/run_api_test.go @@ -136,11 +136,11 @@ func (s *RunApiTestSuite) TestRunApis() { /* ---------- Create a new hello world experiment ---------- */ experiment := test.MakeExperiment("hello world experiment", "", s.resourceNamespace) - helloWorldExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + helloWorldExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) assert.Nil(t, err) /* ---------- Create a new hello world run by specifying pipeline version ID ---------- */ - createRunRequest := &run_params.RunServiceCreateRunParams{Body: &run_model.V2beta1Run{ + createRunRequest := &run_params.RunServiceCreateRunParams{Run: &run_model.V2beta1Run{ DisplayName: "hello world", Description: "this is hello world", ExperimentID: helloWorldExperiment.ExperimentID, @@ -160,7 +160,7 @@ func (s *RunApiTestSuite) TestRunApis() { /* ---------- Create a new argument parameter experiment ---------- */ createExperimentRequest := &experiment_params.ExperimentServiceCreateExperimentParams{ - Body: test.MakeExperiment("argument parameter experiment", "", s.resourceNamespace), + Experiment: test.MakeExperiment("argument parameter experiment", "", s.resourceNamespace), } argParamsExperiment, err := s.experimentClient.Create(createExperimentRequest) assert.Nil(t, err) @@ -172,7 +172,7 @@ func (s *RunApiTestSuite) TestRunApis() { err = yaml.Unmarshal(argParamsBytes, pipeline_spec) assert.Nil(t, err) - createRunRequest = &run_params.RunServiceCreateRunParams{Body: &run_model.V2beta1Run{ + createRunRequest = &run_params.RunServiceCreateRunParams{Run: &run_model.V2beta1Run{ DisplayName: "argument parameter", Description: "this is argument parameter", PipelineSpec: pipeline_spec, @@ -266,7 +266,7 @@ func (s *RunApiTestSuite) TestRunApis() { filterTime := time.Now().Unix() time.Sleep(5 * time.Second) // Create a new run - createRunRequest.Body.DisplayName = "argument parameter 2" + createRunRequest.Run.DisplayName = "argument parameter 2" _, err = s.runClient.Create(createRunRequest) assert.Nil(t, err) // Check total number of runs is 3 @@ -314,7 +314,7 @@ func (s *RunApiTestSuite) TestRunApis() { assert.Nil(t, err) /* ---------- Create a new long-running run by specifying pipeline ID ---------- */ - createLongRunningRunRequest := &run_params.RunServiceCreateRunParams{Body: &run_model.V2beta1Run{ + createLongRunningRunRequest := &run_params.RunServiceCreateRunParams{Run: &run_model.V2beta1Run{ DisplayName: "long running", Description: "this pipeline will run long enough for us to manually terminate it before it finishes", ExperimentID: helloWorldExperiment.ExperimentID, @@ -344,7 +344,7 @@ func (s *RunApiTestSuite) checkTerminatedRunDetail(t *testing.T, run *run_model. RunID: run.RunID, DisplayName: "long running", Description: "this pipeline will run long enough for us to manually terminate it before it finishes", - State: run_model.V2beta1RuntimeStateCANCELING, + State: run_model.V2beta1RuntimeStateCANCELING.Pointer(), StateHistory: run.StateHistory, StorageState: run.StorageState, ServiceAccount: test.GetDefaultPipelineRunnerServiceAccount(*isKubeflowMode), diff --git a/backend/test/v2/integration/upgrade_test.go b/backend/test/v2/integration/upgrade_test.go index e010fe320f5..9e5910d9503 100644 --- a/backend/test/v2/integration/upgrade_test.go +++ b/backend/test/v2/integration/upgrade_test.go @@ -188,7 +188,7 @@ func (s *UpgradeTests) PrepareExperiments() { /* ---------- Create a new experiment ---------- */ experiment := test.MakeExperiment("training", "my first experiment", s.resourceNamespace) _, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{ - Body: experiment, + Experiment: experiment, }) require.Nil(t, err) @@ -197,14 +197,14 @@ func (s *UpgradeTests) PrepareExperiments() { time.Sleep(1 * time.Second) experiment = test.MakeExperiment("prediction", "my second experiment", s.resourceNamespace) _, err = s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{ - Body: experiment, + Experiment: experiment, }) require.Nil(t, err) time.Sleep(1 * time.Second) experiment = test.MakeExperiment("moonshot", "my third experiment", s.resourceNamespace) _, err = s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{ - Body: experiment, + Experiment: experiment, }) require.Nil(t, err) } @@ -269,13 +269,13 @@ func (s *UpgradeTests) PreparePipelines() { /* ---------- Import pipeline YAML by URL ---------- */ time.Sleep(1 * time.Second) sequentialPipeline, err := s.pipelineClient.Create(&pipeline_params.PipelineServiceCreatePipelineParams{ - Body: &pipeline_model.V2beta1Pipeline{DisplayName: "sequential"}, + Pipeline: &pipeline_model.V2beta1Pipeline{DisplayName: "sequential"}, }) require.Nil(t, err) assert.Equal(t, "sequential", sequentialPipeline.DisplayName) sequentialPipelineVersion, err := s.pipelineClient.CreatePipelineVersion(¶ms.PipelineServiceCreatePipelineVersionParams{ PipelineID: sequentialPipeline.PipelineID, - Body: &pipeline_model.V2beta1PipelineVersion{ + PipelineVersion: &pipeline_model.V2beta1PipelineVersion{ DisplayName: "sequential", PackageURL: &pipeline_model.V2beta1URL{ PipelineURL: "https://raw.githubusercontent.com/kubeflow/pipelines/refs/heads/master/backend/test/v2/resources/sequential-v2.yaml", @@ -302,13 +302,13 @@ func (s *UpgradeTests) PreparePipelines() { time.Sleep(1 * time.Second) argumentUrlPipeline, err := s.pipelineClient.Create(&pipeline_params.PipelineServiceCreatePipelineParams{ - Body: &pipeline_model.V2beta1Pipeline{DisplayName: "arguments.pipeline.zip"}, + Pipeline: &pipeline_model.V2beta1Pipeline{DisplayName: "arguments.pipeline.zip"}, }) require.Nil(t, err) assert.Equal(t, "arguments.pipeline.zip", argumentUrlPipeline.DisplayName) argumentUrlPipelineVersion, err := s.pipelineClient.CreatePipelineVersion(¶ms.PipelineServiceCreatePipelineVersionParams{ PipelineID: argumentUrlPipeline.PipelineID, - Body: &pipeline_model.V2beta1PipelineVersion{ + PipelineVersion: &pipeline_model.V2beta1PipelineVersion{ DisplayName: "arguments", PackageURL: &pipeline_model.V2beta1URL{ PipelineURL: pipelineURL, @@ -373,7 +373,7 @@ func (s *UpgradeTests) PrepareRuns() { require.Equal(t, hello2, helloWorldExperiment) /* ---------- Create a new hello world run by specifying pipeline ID ---------- */ - createRunRequest := &runParams.RunServiceCreateRunParams{Body: &run_model.V2beta1Run{ + createRunRequest := &runParams.RunServiceCreateRunParams{Run: &run_model.V2beta1Run{ DisplayName: "hello world", Description: "this is hello world", ExperimentID: helloWorldExperiment.ExperimentID, @@ -412,7 +412,7 @@ func (s *UpgradeTests) PrepareRecurringRuns() { experiment := s.getHelloWorldExperiment(true) /* ---------- Create a new hello world job by specifying pipeline ID ---------- */ - createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "hello world", Description: "this is hello world", PipelineVersionReference: &recurring_run_model.V2beta1PipelineVersionReference{ @@ -421,7 +421,7 @@ func (s *UpgradeTests) PrepareRecurringRuns() { }, ExperimentID: experiment.ExperimentID, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), NoCatchup: true, }} _, err := s.recurringRunClient.Create(createRecurringRunRequest) @@ -452,7 +452,7 @@ func (s *UpgradeTests) VerifyRecurringRuns() { ServiceAccount: test.GetDefaultPipelineRunnerServiceAccount(*isKubeflowMode), MaxConcurrency: 10, NoCatchup: true, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), Namespace: recurringRun.Namespace, CreatedAt: recurringRun.CreatedAt, UpdatedAt: recurringRun.UpdatedAt, @@ -488,7 +488,7 @@ func (s *UpgradeTests) VerifyCreatingRunsAndRecurringRuns() { assert.Equal(t, "hello world experiment", experiments[4].DisplayName) /* ---------- Create a new run based on the oldest pipeline and its default pipeline version ---------- */ - createRunRequest := &runParams.RunServiceCreateRunParams{Body: &run_model.V2beta1Run{ + createRunRequest := &runParams.RunServiceCreateRunParams{Run: &run_model.V2beta1Run{ DisplayName: "argument parameter from pipeline", Description: "a run from an old pipeline", // This run should belong to the newest experiment (created after the upgrade) @@ -516,7 +516,7 @@ func (s *UpgradeTests) VerifyCreatingRunsAndRecurringRuns() { require.Nil(t, err) assert.Equal(t, 1, totalSize) - createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{Body: &recurring_run_model.V2beta1RecurringRun{ + createRecurringRunRequest := &recurring_run_params.RecurringRunServiceCreateRecurringRunParams{RecurringRun: &recurring_run_model.V2beta1RecurringRun{ DisplayName: "sequential job from pipeline version", Description: "a recurring run from an old pipeline version", ExperimentID: experiments[1].ExperimentID, @@ -530,7 +530,7 @@ func (s *UpgradeTests) VerifyCreatingRunsAndRecurringRuns() { }, }, MaxConcurrency: 10, - Mode: recurring_run_model.RecurringRunModeENABLE, + Mode: recurring_run_model.RecurringRunModeENABLE.Pointer(), }} createdRecurringRun, err := s.recurringRunClient.Create(createRecurringRunRequest) assert.Nil(t, err) @@ -541,7 +541,7 @@ func (s *UpgradeTests) createHelloWorldExperiment() *experiment_model.V2beta1Exp t := s.T() experiment := test.MakeExperiment("hello world experiment", "", s.resourceNamespace) - helloWorldExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Body: experiment}) + helloWorldExperiment, err := s.experimentClient.Create(&experiment_params.ExperimentServiceCreateExperimentParams{Experiment: experiment}) require.Nil(t, err) return helloWorldExperiment diff --git a/go.mod b/go.mod index a300e223690..5bf5d20c91b 100644 --- a/go.mod +++ b/go.mod @@ -19,14 +19,14 @@ require ( github.com/go-openapi/validate v0.20.3 github.com/go-sql-driver/mysql v1.8.1 github.com/golang/glog v1.2.4 - github.com/golang/protobuf v1.5.4 github.com/google/addlicense v0.0.0-20200906110928-a0294312aa76 github.com/google/cel-go v0.25.0 - github.com/google/go-cmp v0.6.0 + github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 + // Should match GRPC_GATEWAY_VERSION in backend/api/Dockerfile + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 github.com/jackc/pgx/v5 v5.5.4 github.com/jinzhu/gorm v1.9.1 github.com/kubeflow/pipelines/api v0.0.0-20250102152816-873e9dedd766 @@ -45,12 +45,20 @@ require ( github.com/stretchr/testify v1.10.0 go.uber.org/zap v1.27.0 gocloud.dev v0.40.0 - golang.org/x/net v0.38.0 - golang.org/x/oauth2 v0.22.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 - google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 - google.golang.org/grpc v1.67.1 - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 + golang.org/x/net v0.40.0 + golang.org/x/oauth2 v0.30.0 + // Pre-generated Go code (.pb.go files) for a subset of the .proto files found in + // googleapis/googleapis both /api and /rpc should be released relatively close to + // the googleapis proto files used for kfp-pipeline-spec see GOOGLEAPIS_COMMIT in api/Makefile + // The tags are misleading, they are actual releases: + // https://pkg.go.dev/google.golang.org/genproto/googleapis/api?tab=versions + // https://pkg.go.dev/google.golang.org/genproto/googleapis/rpc?tab=versions + google.golang.org/genproto/googleapis/api v0.0.0-20250715232539-7130f93afb79 + google.golang.org/genproto/googleapis/rpc v0.0.0-20250715232539-7130f93afb79 + google.golang.org/grpc v1.73.0 + // These runtime protoc-gen-go-grpc & protobuf versions should be identical to the package versions + // used for the generated code (see PROTOC_GEN_GO_GRPC & PROTOBUF_GO in backend/api/Dockerfile) + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 google.golang.org/protobuf v1.36.6 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.30.1 @@ -66,7 +74,7 @@ require ( cloud.google.com/go v0.115.0 // indirect cloud.google.com/go/auth v0.8.1 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect - cloud.google.com/go/compute/metadata v0.5.0 // indirect + cloud.google.com/go/compute/metadata v0.6.0 // indirect cloud.google.com/go/iam v1.1.13 // indirect cloud.google.com/go/storage v1.43.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect @@ -122,6 +130,7 @@ require ( github.com/goccy/go-json v0.10.5 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.8 // indirect @@ -129,6 +138,7 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.13.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/huandu/xstrings v1.3.3 // indirect @@ -188,21 +198,22 @@ require ( github.com/valyala/fasttemplate v1.2.2 // indirect go.mongodb.org/mongo-driver v1.7.5 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.32.0 // indirect - go.opentelemetry.io/otel/metric v1.32.0 // indirect - go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.36.0 // indirect + golang.org/x/crypto v0.38.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/mod v0.19.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.30.0 // indirect - golang.org/x/text v0.23.0 // indirect + golang.org/x/mod v0.25.0 // indirect + golang.org/x/sync v0.15.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/term v0.32.0 // indirect + golang.org/x/text v0.26.0 // indirect golang.org/x/time v0.6.0 // indirect - golang.org/x/tools v0.23.0 // indirect + golang.org/x/tools v0.33.0 // indirect golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.191.0 // indirect diff --git a/go.sum b/go.sum index 05b95026bef..c57268f7f35 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= +cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= cloud.google.com/go/iam v1.1.13 h1:7zWBXG9ERbMLrzQBRhFliAV+kjcRToDTgQT3CTwYyv4= cloud.google.com/go/iam v1.1.13/go.mod h1:K8mY0uSXwEXS30KrnVb+j54LB/ntfZu1dr+4zFMNbus= cloud.google.com/go/longrunning v0.5.12 h1:5LqSIdERr71CqfUsFlJdBpOkBH8FBCFD7P1nTWy3TYE= @@ -380,8 +380,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/go-replayers/grpcreplay v1.3.0 h1:1Keyy0m1sIpqstQmgz307zhiJ1pV4uIlFds5weTmxbo= github.com/google/go-replayers/grpcreplay v1.3.0/go.mod h1:v6NgKtkijC0d3e3RW8il6Sy5sqRVUwoQa4mHOGEy8DI= github.com/google/go-replayers/httpreplay v1.2.0 h1:VM1wEyyjaoU53BwrOnaf9VhAyQQEEioJvFYxYcLRKzk= @@ -428,6 +428,8 @@ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 h1:sGm2vDRFUrQJO/Veii4h4z github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2/go.mod h1:wd1YpapPLivG6nQgbf7ZkG1hhSOXDhhn4MLTknx2aAc= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 h1:X5VWvz21y3gzm9Nw/kaUeku/1+uBhcekkmy4IkffJww= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -625,8 +627,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= @@ -715,18 +717,22 @@ go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4x go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= -go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= -go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= -go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= -go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= -go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= -go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= -go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -756,8 +762,8 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58 golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= -golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= @@ -771,8 +777,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -812,14 +818,14 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -832,8 +838,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -868,8 +874,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -879,8 +885,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -896,8 +902,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= @@ -924,8 +930,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -949,10 +955,10 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20211221231510-d629cc9a93d5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988 h1:CT2Thj5AuPV9phrYMtzX11k+XkzMGfRAet42PmoTATM= google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988/go.mod h1:7uvplUBj4RjHAxIZ//98LzOvrQ04JBkaixRmCMI29hc= -google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw= -google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20250715232539-7130f93afb79 h1:iOye66xuaAK0WnkPuhQPUFy8eJcmwUXqGGP3om6IxX8= +google.golang.org/genproto/googleapis/api v0.0.0-20250715232539-7130f93afb79/go.mod h1:HKJDgKsFUnv5VAGeQjz8kxcgDP0HoE0iZNp0OdZNlhE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250715232539-7130f93afb79 h1:1ZwqphdOdWYXsUHgMpU/101nCtf/kSp9hOrcvFsnl10= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250715232539-7130f93afb79/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -962,10 +968,10 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok= +google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1/go.mod h1:5KF+wpkbTSbGcR9zteSqZV6fqFOWBl4Yde8En8MryZA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/kubernetes_platform/Makefile b/kubernetes_platform/Makefile index 24620ce69a4..c18e7a52667 100644 --- a/kubernetes_platform/Makefile +++ b/kubernetes_platform/Makefile @@ -12,7 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.1 +PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.2 + +# Set USE_FIND_LINKS=true to use local sdk and pipeline_spec for buildling python builds rather than pulling from pypi +# applies to `make python` and make pythone-dev` commands. +# e.g. make python USE_FIND_LINKS=true FIND_LINKS_PATH="path1 path2 ..." +FIND_LINKS_PATH := /go/src/github.com/kubeflow/pipelines/sdk/python/dist /go/src/github.com/kubeflow/pipelines/api/v2alpha1/python/dist .PHONY: all all: golang python @@ -34,15 +39,27 @@ golang: proto/*.proto clean-go: rm -rf kubernetes_platform/go +.PHONY: fetch-protos +fetch-protos: + make -C ../api fetch-protos -# Build and locally install Python package. +# Build Python package using pre-built image .PHONY: python -python: proto/kubernetes_executor_config.proto - python3 python/generate_proto.py && cd python && python3 setup.py bdist_wheel +python: proto/kubernetes_executor_config.proto fetch-protos + docker run --interactive --rm \ + --user $$(id -u):$$(id -g) \ + -e HOME=/tmp \ + $(if $(USE_FIND_LINKS),-e PIP_FIND_LINKS="$(FIND_LINKS_PATH)") \ + -v "$$(pwd)/..":"/go/src/github.com/kubeflow/pipelines":z \ + $(PREBUILT_REMOTE_IMAGE) \ + sh -c 'cd /go/src/github.com/kubeflow/pipelines/kubernetes_platform/python && \ + python3 -m pip install --user --break-system-packages -r requirements.txt && \ + python3 generate_proto.py && \ + python3 setup.py sdist bdist_wheel --dist-dir ./dist' -# Build and locally install Python package using editable mode for development. +# Build and install in editable mode using pre-built image .PHONY: python-dev -python-dev: proto/kubernetes_executor_config.proto +python-dev: proto/kubernetes_executor_config.proto fetch-protos python3 python/generate_proto.py && cd python && pip install -e .[dev] # Delete all generated Python packages diff --git a/kubernetes_platform/go/kubernetesplatform/kubernetes_executor_config.pb.go b/kubernetes_platform/go/kubernetesplatform/kubernetes_executor_config.pb.go index 7a2e183de91..97d3505b7d6 100644 --- a/kubernetes_platform/go/kubernetesplatform/kubernetes_executor_config.pb.go +++ b/kubernetes_platform/go/kubernetesplatform/kubernetes_executor_config.pb.go @@ -14,8 +14,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 -// protoc v3.20.3 +// protoc-gen-go v1.36.6 +// protoc v6.31.1 // source: kubernetes_executor_config.proto package kubernetesplatform @@ -27,6 +27,7 @@ import ( structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -37,16 +38,13 @@ const ( ) type KubernetesExecutorConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SecretAsVolume []*SecretAsVolume `protobuf:"bytes,1,rep,name=secret_as_volume,json=secretAsVolume,proto3" json:"secret_as_volume,omitempty"` - SecretAsEnv []*SecretAsEnv `protobuf:"bytes,2,rep,name=secret_as_env,json=secretAsEnv,proto3" json:"secret_as_env,omitempty"` - PvcMount []*PvcMount `protobuf:"bytes,3,rep,name=pvc_mount,json=pvcMount,proto3" json:"pvc_mount,omitempty"` - NodeSelector *NodeSelector `protobuf:"bytes,4,opt,name=node_selector,json=nodeSelector,proto3" json:"node_selector,omitempty"` - PodMetadata *PodMetadata `protobuf:"bytes,5,opt,name=pod_metadata,json=podMetadata,proto3" json:"pod_metadata,omitempty"` - ImagePullSecret []*ImagePullSecret `protobuf:"bytes,6,rep,name=image_pull_secret,json=imagePullSecret,proto3" json:"image_pull_secret,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + SecretAsVolume []*SecretAsVolume `protobuf:"bytes,1,rep,name=secret_as_volume,json=secretAsVolume,proto3" json:"secret_as_volume,omitempty"` + SecretAsEnv []*SecretAsEnv `protobuf:"bytes,2,rep,name=secret_as_env,json=secretAsEnv,proto3" json:"secret_as_env,omitempty"` + PvcMount []*PvcMount `protobuf:"bytes,3,rep,name=pvc_mount,json=pvcMount,proto3" json:"pvc_mount,omitempty"` + NodeSelector *NodeSelector `protobuf:"bytes,4,opt,name=node_selector,json=nodeSelector,proto3" json:"node_selector,omitempty"` + PodMetadata *PodMetadata `protobuf:"bytes,5,opt,name=pod_metadata,json=podMetadata,proto3" json:"pod_metadata,omitempty"` + ImagePullSecret []*ImagePullSecret `protobuf:"bytes,6,rep,name=image_pull_secret,json=imagePullSecret,proto3" json:"image_pull_secret,omitempty"` // One of Always, Never, IfNotPresent. ImagePullPolicy string `protobuf:"bytes,7,opt,name=image_pull_policy,json=imagePullPolicy,proto3" json:"image_pull_policy,omitempty"` ConfigMapAsVolume []*ConfigMapAsVolume `protobuf:"bytes,8,rep,name=config_map_as_volume,json=configMapAsVolume,proto3" json:"config_map_as_volume,omitempty"` @@ -59,15 +57,15 @@ type KubernetesExecutorConfig struct { PodAffinity []*PodAffinityTerm `protobuf:"bytes,15,rep,name=pod_affinity,json=podAffinity,proto3" json:"pod_affinity,omitempty"` EnabledSharedMemory *EnabledSharedMemory `protobuf:"bytes,16,opt,name=enabled_shared_memory,json=enabledSharedMemory,proto3" json:"enabled_shared_memory,omitempty"` EmptyDirMounts []*EmptyDirMount `protobuf:"bytes,17,rep,name=empty_dir_mounts,json=emptyDirMounts,proto3" json:"empty_dir_mounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *KubernetesExecutorConfig) Reset() { *x = KubernetesExecutorConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *KubernetesExecutorConfig) String() string { @@ -78,7 +76,7 @@ func (*KubernetesExecutorConfig) ProtoMessage() {} func (x *KubernetesExecutorConfig) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -213,23 +211,20 @@ func (x *KubernetesExecutorConfig) GetEmptyDirMounts() []*EmptyDirMount { } type EnabledSharedMemory struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Name of the Shared Memory Volume. VolumeName string `protobuf:"bytes,1,opt,name=volume_name,json=volumeName,proto3" json:"volume_name,omitempty"` // Size of the Shared Memory. - Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` + Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EnabledSharedMemory) Reset() { *x = EnabledSharedMemory{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnabledSharedMemory) String() string { @@ -240,7 +235,7 @@ func (*EnabledSharedMemory) ProtoMessage() {} func (x *EnabledSharedMemory) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -270,10 +265,7 @@ func (x *EnabledSharedMemory) GetSize() string { } type SecretAsVolume struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated, use secret_name_parameter instead. // // Deprecated: Marked as deprecated in kubernetes_executor_config.proto. @@ -284,15 +276,15 @@ type SecretAsVolume struct { Optional *bool `protobuf:"varint,3,opt,name=optional,proto3,oneof" json:"optional,omitempty"` // Name of the Secret. SecretNameParameter *pipelinespec.TaskInputsSpec_InputParameterSpec `protobuf:"bytes,4,opt,name=secret_name_parameter,json=secretNameParameter,proto3" json:"secret_name_parameter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SecretAsVolume) Reset() { *x = SecretAsVolume{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretAsVolume) String() string { @@ -303,7 +295,7 @@ func (*SecretAsVolume) ProtoMessage() {} func (x *SecretAsVolume) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,10 +340,7 @@ func (x *SecretAsVolume) GetSecretNameParameter() *pipelinespec.TaskInputsSpec_I } type SecretAsEnv struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated, use secret_name_parameter instead. // // Deprecated: Marked as deprecated in kubernetes_executor_config.proto. @@ -359,15 +348,15 @@ type SecretAsEnv struct { KeyToEnv []*SecretAsEnv_SecretKeyToEnvMap `protobuf:"bytes,2,rep,name=key_to_env,json=keyToEnv,proto3" json:"key_to_env,omitempty"` // Name of the Secret. SecretNameParameter *pipelinespec.TaskInputsSpec_InputParameterSpec `protobuf:"bytes,4,opt,name=secret_name_parameter,json=secretNameParameter,proto3" json:"secret_name_parameter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SecretAsEnv) Reset() { *x = SecretAsEnv{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretAsEnv) String() string { @@ -378,7 +367,7 @@ func (*SecretAsEnv) ProtoMessage() {} func (x *SecretAsEnv) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -416,13 +405,10 @@ func (x *SecretAsEnv) GetSecretNameParameter() *pipelinespec.TaskInputsSpec_Inpu } type PvcMount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated, use pvc_name_parameter instead. // - // Types that are assignable to PvcReference: + // Types that are valid to be assigned to PvcReference: // // *PvcMount_TaskOutputParameter // *PvcMount_Constant @@ -432,15 +418,15 @@ type PvcMount struct { MountPath string `protobuf:"bytes,4,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"` // Name of the PVC. PvcNameParameter *pipelinespec.TaskInputsSpec_InputParameterSpec `protobuf:"bytes,5,opt,name=pvc_name_parameter,json=pvcNameParameter,proto3" json:"pvc_name_parameter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PvcMount) Reset() { *x = PvcMount{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PvcMount) String() string { @@ -451,7 +437,7 @@ func (*PvcMount) ProtoMessage() {} func (x *PvcMount) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,33 +452,39 @@ func (*PvcMount) Descriptor() ([]byte, []int) { return file_kubernetes_executor_config_proto_rawDescGZIP(), []int{4} } -func (m *PvcMount) GetPvcReference() isPvcMount_PvcReference { - if m != nil { - return m.PvcReference +func (x *PvcMount) GetPvcReference() isPvcMount_PvcReference { + if x != nil { + return x.PvcReference } return nil } // Deprecated: Marked as deprecated in kubernetes_executor_config.proto. func (x *PvcMount) GetTaskOutputParameter() *pipelinespec.TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec { - if x, ok := x.GetPvcReference().(*PvcMount_TaskOutputParameter); ok { - return x.TaskOutputParameter + if x != nil { + if x, ok := x.PvcReference.(*PvcMount_TaskOutputParameter); ok { + return x.TaskOutputParameter + } } return nil } // Deprecated: Marked as deprecated in kubernetes_executor_config.proto. func (x *PvcMount) GetConstant() string { - if x, ok := x.GetPvcReference().(*PvcMount_Constant); ok { - return x.Constant + if x != nil { + if x, ok := x.PvcReference.(*PvcMount_Constant); ok { + return x.Constant + } } return "" } // Deprecated: Marked as deprecated in kubernetes_executor_config.proto. func (x *PvcMount) GetComponentInputParameter() string { - if x, ok := x.GetPvcReference().(*PvcMount_ComponentInputParameter); ok { - return x.ComponentInputParameter + if x != nil { + if x, ok := x.PvcReference.(*PvcMount_ComponentInputParameter); ok { + return x.ComponentInputParameter + } } return "" } @@ -543,11 +535,8 @@ func (*PvcMount_Constant) isPvcMount_PvcReference() {} func (*PvcMount_ComponentInputParameter) isPvcMount_PvcReference() {} type CreatePvc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Name: + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Name: // // *CreatePvc_PvcName // *CreatePvc_PvcNameSuffix @@ -564,16 +553,16 @@ type CreatePvc struct { // Corresponds to PersistentVolumeClaim.spec.volumeName field. VolumeName string `protobuf:"bytes,7,opt,name=volume_name,json=volumeName,proto3" json:"volume_name,omitempty"` // Corresponds to PersistentVolumeClaim.metadata.annotations field. - Annotations *structpb.Struct `protobuf:"bytes,8,opt,name=annotations,proto3" json:"annotations,omitempty"` + Annotations *structpb.Struct `protobuf:"bytes,8,opt,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreatePvc) Reset() { *x = CreatePvc{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreatePvc) String() string { @@ -584,7 +573,7 @@ func (*CreatePvc) ProtoMessage() {} func (x *CreatePvc) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -599,23 +588,27 @@ func (*CreatePvc) Descriptor() ([]byte, []int) { return file_kubernetes_executor_config_proto_rawDescGZIP(), []int{5} } -func (m *CreatePvc) GetName() isCreatePvc_Name { - if m != nil { - return m.Name +func (x *CreatePvc) GetName() isCreatePvc_Name { + if x != nil { + return x.Name } return nil } func (x *CreatePvc) GetPvcName() string { - if x, ok := x.GetName().(*CreatePvc_PvcName); ok { - return x.PvcName + if x != nil { + if x, ok := x.Name.(*CreatePvc_PvcName); ok { + return x.PvcName + } } return "" } func (x *CreatePvc) GetPvcNameSuffix() string { - if x, ok := x.GetName().(*CreatePvc_PvcNameSuffix); ok { - return x.PvcNameSuffix + if x != nil { + if x, ok := x.Name.(*CreatePvc_PvcNameSuffix); ok { + return x.PvcNameSuffix + } } return "" } @@ -682,28 +675,25 @@ func (*CreatePvc_PvcName) isCreatePvc_Name() {} func (*CreatePvc_PvcNameSuffix) isCreatePvc_Name() {} type DeletePvc struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Identifier for the PVC. // Used like TaskInputsSpec.ml_pipelines.TaskInputsSpec.InputParameterSpec.kind. // - // Types that are assignable to PvcReference: + // Types that are valid to be assigned to PvcReference: // // *DeletePvc_TaskOutputParameter // *DeletePvc_Constant // *DeletePvc_ComponentInputParameter - PvcReference isDeletePvc_PvcReference `protobuf_oneof:"pvc_reference"` + PvcReference isDeletePvc_PvcReference `protobuf_oneof:"pvc_reference"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeletePvc) Reset() { *x = DeletePvc{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeletePvc) String() string { @@ -714,7 +704,7 @@ func (*DeletePvc) ProtoMessage() {} func (x *DeletePvc) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -729,30 +719,36 @@ func (*DeletePvc) Descriptor() ([]byte, []int) { return file_kubernetes_executor_config_proto_rawDescGZIP(), []int{6} } -func (m *DeletePvc) GetPvcReference() isDeletePvc_PvcReference { - if m != nil { - return m.PvcReference +func (x *DeletePvc) GetPvcReference() isDeletePvc_PvcReference { + if x != nil { + return x.PvcReference } return nil } func (x *DeletePvc) GetTaskOutputParameter() *pipelinespec.TaskInputsSpec_InputParameterSpec_TaskOutputParameterSpec { - if x, ok := x.GetPvcReference().(*DeletePvc_TaskOutputParameter); ok { - return x.TaskOutputParameter + if x != nil { + if x, ok := x.PvcReference.(*DeletePvc_TaskOutputParameter); ok { + return x.TaskOutputParameter + } } return nil } func (x *DeletePvc) GetConstant() string { - if x, ok := x.GetPvcReference().(*DeletePvc_Constant); ok { - return x.Constant + if x != nil { + if x, ok := x.PvcReference.(*DeletePvc_Constant); ok { + return x.Constant + } } return "" } func (x *DeletePvc) GetComponentInputParameter() string { - if x, ok := x.GetPvcReference().(*DeletePvc_ComponentInputParameter); ok { - return x.ComponentInputParameter + if x != nil { + if x, ok := x.PvcReference.(*DeletePvc_ComponentInputParameter); ok { + return x.ComponentInputParameter + } } return "" } @@ -783,26 +779,23 @@ func (*DeletePvc_Constant) isDeletePvc_PvcReference() {} func (*DeletePvc_ComponentInputParameter) isDeletePvc_PvcReference() {} type NodeSelector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // map of label key to label value // corresponds to Pod.spec.nodeSelector field https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling - Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Provide a JSON struct of node selector // Takes precedence over labels. // Example: {"disk-type": "ssd", "region": "us-west"} NodeSelectorJson *pipelinespec.TaskInputsSpec_InputParameterSpec `protobuf:"bytes,2,opt,name=node_selector_json,json=nodeSelectorJson,proto3" json:"node_selector_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *NodeSelector) Reset() { *x = NodeSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeSelector) String() string { @@ -813,7 +806,7 @@ func (*NodeSelector) ProtoMessage() {} func (x *NodeSelector) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -843,23 +836,20 @@ func (x *NodeSelector) GetNodeSelectorJson() *pipelinespec.TaskInputsSpec_InputP } type PodMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // values of metadata spec such as labels and annotations for the pod object // corresponds to Pod.metadata field https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Pod - Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Annotations map[string]string `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Annotations map[string]string `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PodMetadata) Reset() { *x = PodMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PodMetadata) String() string { @@ -870,7 +860,7 @@ func (*PodMetadata) ProtoMessage() {} func (x *PodMetadata) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,10 +890,7 @@ func (x *PodMetadata) GetAnnotations() map[string]string { } type ConfigMapAsVolume struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated, use config_name_parameter instead. // // Deprecated: Marked as deprecated in kubernetes_executor_config.proto. @@ -914,15 +901,15 @@ type ConfigMapAsVolume struct { Optional *bool `protobuf:"varint,3,opt,name=optional,proto3,oneof" json:"optional,omitempty"` // Name of the ConfigMap. ConfigMapNameParameter *pipelinespec.TaskInputsSpec_InputParameterSpec `protobuf:"bytes,4,opt,name=config_map_name_parameter,json=configMapNameParameter,proto3" json:"config_map_name_parameter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ConfigMapAsVolume) Reset() { *x = ConfigMapAsVolume{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigMapAsVolume) String() string { @@ -933,7 +920,7 @@ func (*ConfigMapAsVolume) ProtoMessage() {} func (x *ConfigMapAsVolume) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,10 +965,7 @@ func (x *ConfigMapAsVolume) GetConfigMapNameParameter() *pipelinespec.TaskInputs } type ConfigMapAsEnv struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated, use config_name_parameter instead. // // Deprecated: Marked as deprecated in kubernetes_executor_config.proto. @@ -989,15 +973,15 @@ type ConfigMapAsEnv struct { KeyToEnv []*ConfigMapAsEnv_ConfigMapKeyToEnvMap `protobuf:"bytes,2,rep,name=key_to_env,json=keyToEnv,proto3" json:"key_to_env,omitempty"` // Name of the ConfigMap. ConfigMapNameParameter *pipelinespec.TaskInputsSpec_InputParameterSpec `protobuf:"bytes,3,opt,name=config_map_name_parameter,json=configMapNameParameter,proto3" json:"config_map_name_parameter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ConfigMapAsEnv) Reset() { *x = ConfigMapAsEnv{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigMapAsEnv) String() string { @@ -1008,7 +992,7 @@ func (*ConfigMapAsEnv) ProtoMessage() {} func (x *ConfigMapAsEnv) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1046,10 +1030,7 @@ func (x *ConfigMapAsEnv) GetConfigMapNameParameter() *pipelinespec.TaskInputsSpe } type GenericEphemeralVolume struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // more details in https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes // Name of the ephemeral volume. VolumeName string `protobuf:"bytes,1,opt,name=volume_name,json=volumeName,proto3" json:"volume_name,omitempty"` @@ -1066,16 +1047,16 @@ type GenericEphemeralVolume struct { StorageClassName string `protobuf:"bytes,6,opt,name=storage_class_name,json=storageClassName,proto3" json:"storage_class_name,omitempty"` // Corresponds to ephemeral.volumeClaimTemplate.metadata. // This is not exactly a pod metadata but the fields are the same - Metadata *PodMetadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata *PodMetadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GenericEphemeralVolume) Reset() { *x = GenericEphemeralVolume{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenericEphemeralVolume) String() string { @@ -1086,7 +1067,7 @@ func (*GenericEphemeralVolume) ProtoMessage() {} func (x *GenericEphemeralVolume) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1151,24 +1132,21 @@ func (x *GenericEphemeralVolume) GetMetadata() *PodMetadata { } type ImagePullSecret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Name of the image pull secret. // // Deprecated: Marked as deprecated in kubernetes_executor_config.proto. SecretName string `protobuf:"bytes,1,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"` SecretNameParameter *pipelinespec.TaskInputsSpec_InputParameterSpec `protobuf:"bytes,2,opt,name=secret_name_parameter,json=secretNameParameter,proto3" json:"secret_name_parameter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ImagePullSecret) Reset() { *x = ImagePullSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ImagePullSecret) String() string { @@ -1179,7 +1157,7 @@ func (*ImagePullSecret) ProtoMessage() {} func (x *ImagePullSecret) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1210,23 +1188,20 @@ func (x *ImagePullSecret) GetSecretNameParameter() *pipelinespec.TaskInputsSpec_ } type FieldPathAsEnv struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Name of the environment variable Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Value of the field path string - FieldPath string `protobuf:"bytes,2,opt,name=field_path,json=fieldPath,proto3" json:"field_path,omitempty"` + FieldPath string `protobuf:"bytes,2,opt,name=field_path,json=fieldPath,proto3" json:"field_path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FieldPathAsEnv) Reset() { *x = FieldPathAsEnv{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldPathAsEnv) String() string { @@ -1237,7 +1212,7 @@ func (*FieldPathAsEnv) ProtoMessage() {} func (x *FieldPathAsEnv) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1267,15 +1242,12 @@ func (x *FieldPathAsEnv) GetFieldPath() string { } type Toleration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - Effect string `protobuf:"bytes,4,opt,name=effect,proto3" json:"effect,omitempty"` - TolerationSeconds *int64 `protobuf:"varint,5,opt,name=toleration_seconds,json=tolerationSeconds,proto3,oneof" json:"toleration_seconds,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + Effect string `protobuf:"bytes,4,opt,name=effect,proto3" json:"effect,omitempty"` + TolerationSeconds *int64 `protobuf:"varint,5,opt,name=toleration_seconds,json=tolerationSeconds,proto3,oneof" json:"toleration_seconds,omitempty"` // Provide a json struct of the toleration // Takes precedence over key, operator, value, effect. // Example: {"key": "key1", "operator": "Equal", "value": "value1", "effect": "NoSchedule"} @@ -1283,15 +1255,15 @@ type Toleration struct { // Toleration structure: // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core TolerationJson *pipelinespec.TaskInputsSpec_InputParameterSpec `protobuf:"bytes,6,opt,name=toleration_json,json=tolerationJson,proto3" json:"toleration_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Toleration) Reset() { *x = Toleration{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Toleration) String() string { @@ -1302,7 +1274,7 @@ func (*Toleration) ProtoMessage() {} func (x *Toleration) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1362,22 +1334,19 @@ func (x *Toleration) GetTolerationJson() *pipelinespec.TaskInputsSpec_InputParam // Matches https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#labelselectorrequirement-v1-meta and // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#nodeselectorrequirement-v1-core type SelectorRequirement struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` + Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` - Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SelectorRequirement) Reset() { *x = SelectorRequirement{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SelectorRequirement) String() string { @@ -1388,7 +1357,7 @@ func (*SelectorRequirement) ProtoMessage() {} func (x *SelectorRequirement) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1425,23 +1394,20 @@ func (x *SelectorRequirement) GetValues() []string { } type NodeAffinityTerm struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` MatchExpressions []*SelectorRequirement `protobuf:"bytes,1,rep,name=match_expressions,json=matchExpressions,proto3" json:"match_expressions,omitempty"` MatchFields []*SelectorRequirement `protobuf:"bytes,2,rep,name=match_fields,json=matchFields,proto3" json:"match_fields,omitempty"` //Setting the weight makes it use PreferredDuringSchedulingIgnoredDuringExecution rules instead of RequiredDuringSchedulingIgnoredDuringExecution rules - Weight *int32 `protobuf:"varint,3,opt,name=weight,proto3,oneof" json:"weight,omitempty"` + Weight *int32 `protobuf:"varint,3,opt,name=weight,proto3,oneof" json:"weight,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *NodeAffinityTerm) Reset() { *x = NodeAffinityTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NodeAffinityTerm) String() string { @@ -1452,7 +1418,7 @@ func (*NodeAffinityTerm) ProtoMessage() {} func (x *NodeAffinityTerm) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1489,29 +1455,26 @@ func (x *NodeAffinityTerm) GetWeight() int32 { } type PodAffinityTerm struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` MatchPodExpressions []*SelectorRequirement `protobuf:"bytes,1,rep,name=match_pod_expressions,json=matchPodExpressions,proto3" json:"match_pod_expressions,omitempty"` - MatchPodLabels map[string]string `protobuf:"bytes,2,rep,name=match_pod_labels,json=matchPodLabels,proto3" json:"match_pod_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MatchPodLabels map[string]string `protobuf:"bytes,2,rep,name=match_pod_labels,json=matchPodLabels,proto3" json:"match_pod_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` TopologyKey string `protobuf:"bytes,3,opt,name=topology_key,json=topologyKey,proto3" json:"topology_key,omitempty"` Namespaces []string `protobuf:"bytes,4,rep,name=namespaces,proto3" json:"namespaces,omitempty"` MatchNamespaceExpressions []*SelectorRequirement `protobuf:"bytes,5,rep,name=match_namespace_expressions,json=matchNamespaceExpressions,proto3" json:"match_namespace_expressions,omitempty"` - MatchNamespaceLabels map[string]string `protobuf:"bytes,6,rep,name=match_namespace_labels,json=matchNamespaceLabels,proto3" json:"match_namespace_labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MatchNamespaceLabels map[string]string `protobuf:"bytes,6,rep,name=match_namespace_labels,json=matchNamespaceLabels,proto3" json:"match_namespace_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //Setting a weight makes it use PreferredDuringSchedulingIgnoredDuringExecution rules instead of RequiredDuringSchedulingIgnoredDuringExecution rules Weight *int32 `protobuf:"varint,7,opt,name=weight,proto3,oneof" json:"weight,omitempty"` //Flag indicating if it is a podaffinity or podantiaffinity - Anti *bool `protobuf:"varint,8,opt,name=anti,proto3,oneof" json:"anti,omitempty"` + Anti *bool `protobuf:"varint,8,opt,name=anti,proto3,oneof" json:"anti,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *PodAffinityTerm) Reset() { *x = PodAffinityTerm{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PodAffinityTerm) String() string { @@ -1522,7 +1485,7 @@ func (*PodAffinityTerm) ProtoMessage() {} func (x *PodAffinityTerm) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1594,24 +1557,21 @@ func (x *PodAffinityTerm) GetAnti() bool { } type EmptyDirMount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#emptydirvolumesource-v1-core - VolumeName string `protobuf:"bytes,1,opt,name=volume_name,json=volumeName,proto3" json:"volume_name,omitempty"` - MountPath string `protobuf:"bytes,2,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"` - Medium *string `protobuf:"bytes,3,opt,name=medium,proto3,oneof" json:"medium,omitempty"` - SizeLimit *string `protobuf:"bytes,4,opt,name=size_limit,json=sizeLimit,proto3,oneof" json:"size_limit,omitempty"` + VolumeName string `protobuf:"bytes,1,opt,name=volume_name,json=volumeName,proto3" json:"volume_name,omitempty"` + MountPath string `protobuf:"bytes,2,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"` + Medium *string `protobuf:"bytes,3,opt,name=medium,proto3,oneof" json:"medium,omitempty"` + SizeLimit *string `protobuf:"bytes,4,opt,name=size_limit,json=sizeLimit,proto3,oneof" json:"size_limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *EmptyDirMount) Reset() { *x = EmptyDirMount{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EmptyDirMount) String() string { @@ -1622,7 +1582,7 @@ func (*EmptyDirMount) ProtoMessage() {} func (x *EmptyDirMount) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1666,23 +1626,20 @@ func (x *EmptyDirMount) GetSizeLimit() string { } type SecretAsEnv_SecretKeyToEnvMap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Corresponds to a key of the Secret.data field. SecretKey string `protobuf:"bytes,1,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` // Env var to which secret_key's data should be set. - EnvVar string `protobuf:"bytes,2,opt,name=env_var,json=envVar,proto3" json:"env_var,omitempty"` + EnvVar string `protobuf:"bytes,2,opt,name=env_var,json=envVar,proto3" json:"env_var,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SecretAsEnv_SecretKeyToEnvMap) Reset() { *x = SecretAsEnv_SecretKeyToEnvMap{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SecretAsEnv_SecretKeyToEnvMap) String() string { @@ -1693,7 +1650,7 @@ func (*SecretAsEnv_SecretKeyToEnvMap) ProtoMessage() {} func (x *SecretAsEnv_SecretKeyToEnvMap) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1723,23 +1680,20 @@ func (x *SecretAsEnv_SecretKeyToEnvMap) GetEnvVar() string { } type ConfigMapAsEnv_ConfigMapKeyToEnvMap struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Corresponds to a key of the ConfigMap. ConfigMapKey string `protobuf:"bytes,1,opt,name=config_map_key,json=configMapKey,proto3" json:"config_map_key,omitempty"` // Env var to which configmap_key's data should be set. - EnvVar string `protobuf:"bytes,2,opt,name=env_var,json=envVar,proto3" json:"env_var,omitempty"` + EnvVar string `protobuf:"bytes,2,opt,name=env_var,json=envVar,proto3" json:"env_var,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ConfigMapAsEnv_ConfigMapKeyToEnvMap) Reset() { *x = ConfigMapAsEnv_ConfigMapKeyToEnvMap{} - if protoimpl.UnsafeEnabled { - mi := &file_kubernetes_executor_config_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_kubernetes_executor_config_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConfigMapAsEnv_ConfigMapKeyToEnvMap) String() string { @@ -1750,7 +1704,7 @@ func (*ConfigMapAsEnv_ConfigMapKeyToEnvMap) ProtoMessage() {} func (x *ConfigMapAsEnv_ConfigMapKeyToEnvMap) ProtoReflect() protoreflect.Message { mi := &file_kubernetes_executor_config_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1781,405 +1735,184 @@ func (x *ConfigMapAsEnv_ConfigMapKeyToEnvMap) GetEnvVar() string { var File_kubernetes_executor_config_proto protoreflect.FileDescriptor -var file_kubernetes_executor_config_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x65, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x13, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc7, 0x09, 0x0a, 0x18, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x48, 0x0a, 0x10, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, - 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6b, - 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x41, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x0e, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x41, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0d, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x73, 0x45, 0x6e, 0x76, - 0x52, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x73, 0x45, 0x6e, 0x76, 0x12, 0x35, 0x0a, - 0x09, 0x70, 0x76, 0x63, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, - 0x73, 0x2e, 0x50, 0x76, 0x63, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x70, 0x76, 0x63, 0x4d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x66, - 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x0c, 0x70, 0x6f, 0x64, 0x5f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x50, - 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x70, 0x6f, 0x64, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x5f, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x0f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x75, - 0x6c, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x52, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x61, - 0x73, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x41, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x41, 0x73, 0x56, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, - 0x61, 0x70, 0x5f, 0x61, 0x73, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x41, 0x73, 0x45, 0x6e, 0x76, 0x52, - 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x41, 0x73, 0x45, 0x6e, 0x76, 0x12, - 0x36, 0x0a, 0x17, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, - 0x6e, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x15, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, - 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x49, 0x0a, 0x11, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x61, 0x73, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x41, 0x73, 0x45, - 0x6e, 0x76, 0x52, 0x0e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x41, 0x73, 0x45, - 0x6e, 0x76, 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, - 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x60, 0x0a, 0x18, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x65, 0x70, 0x68, 0x65, - 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x45, 0x70, 0x68, 0x65, 0x6d, - 0x65, 0x72, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x16, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x69, 0x63, 0x45, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x66, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6b, 0x66, 0x70, 0x5f, - 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, - 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x65, 0x72, 0x6d, 0x52, 0x0c, 0x6e, 0x6f, 0x64, - 0x65, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0c, 0x70, 0x6f, 0x64, - 0x5f, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x2e, 0x50, 0x6f, 0x64, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x65, 0x72, 0x6d, - 0x52, 0x0b, 0x70, 0x6f, 0x64, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x57, 0x0a, - 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, - 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, - 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, - 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x47, 0x0a, 0x10, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, - 0x64, 0x69, 0x72, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, - 0x73, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x44, 0x69, 0x72, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x0e, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x44, 0x69, 0x72, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, - 0x4a, 0x0a, 0x13, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x53, 0x68, 0x61, 0x72, 0x65, 0x64, - 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x0e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x23, - 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x88, 0x01, 0x01, 0x12, 0x63, 0x0a, 0x15, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, - 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, - 0x70, 0x65, 0x63, 0x52, 0x13, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb1, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x41, 0x73, 0x45, 0x6e, 0x76, 0x12, 0x23, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0a, 0x6b, 0x65, - 0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x73, 0x45, 0x6e, 0x76, 0x2e, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x4b, 0x65, 0x79, 0x54, 0x6f, 0x45, 0x6e, 0x76, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x6b, - 0x65, 0x79, 0x54, 0x6f, 0x45, 0x6e, 0x76, 0x12, 0x63, 0x0a, 0x15, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, - 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x13, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x4b, 0x0a, 0x11, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x54, 0x6f, 0x45, 0x6e, 0x76, 0x4d, 0x61, - 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, - 0x12, 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x22, 0x81, 0x03, 0x0a, 0x08, 0x50, 0x76, - 0x63, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x81, 0x01, 0x0a, 0x15, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, - 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, - 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, - 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x13, 0x74, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x08, 0x63, 0x6f, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, - 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x19, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1d, - 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x5d, 0x0a, - 0x12, 0x70, 0x76, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x10, 0x70, 0x76, 0x63, 0x4e, - 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, - 0x70, 0x76, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xcf, 0x02, - 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x76, 0x63, 0x12, 0x1b, 0x0a, 0x08, 0x70, - 0x76, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x07, 0x70, 0x76, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x76, 0x63, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x76, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x75, 0x66, 0x66, - 0x69, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4d, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x2c, 0x0a, - 0x12, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x76, - 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0xf7, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x76, 0x63, 0x12, 0x7d, 0x0a, - 0x15, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x6d, - 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x13, 0x74, 0x61, 0x73, 0x6b, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x08, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x19, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x70, 0x76, 0x63, 0x5f, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x0c, 0x4e, 0x6f, - 0x64, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6b, 0x66, 0x70, - 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x5d, 0x0a, 0x12, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6a, 0x73, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, - 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x10, 0x6e, 0x6f, 0x64, 0x65, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x02, 0x0a, 0x0b, 0x50, 0x6f, 0x64, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, - 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x50, 0x6f, - 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xf8, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, - 0x41, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x88, 0x01, 0x01, 0x12, 0x6a, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, - 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x16, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x4d, 0x61, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xd2, 0x02, - 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x41, 0x73, 0x45, 0x6e, 0x76, - 0x12, 0x2a, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0d, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0a, - 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x6f, 0x5f, 0x65, 0x6e, 0x76, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x41, 0x73, 0x45, 0x6e, 0x76, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x54, 0x6f, 0x45, - 0x6e, 0x76, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x54, 0x6f, 0x45, 0x6e, 0x76, 0x12, - 0x6a, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, - 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, - 0x70, 0x65, 0x63, 0x52, 0x16, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x4e, 0x61, - 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x55, 0x0a, 0x14, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x54, 0x6f, 0x45, 0x6e, 0x76, - 0x4d, 0x61, 0x70, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, - 0x70, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x6e, 0x76, - 0x5f, 0x76, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x76, 0x56, - 0x61, 0x72, 0x22, 0xaa, 0x02, 0x0a, 0x16, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x45, 0x70, - 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, - 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x73, 0x69, 0x7a, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, - 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x64, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x9b, 0x01, 0x0a, 0x0f, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x15, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, 0x70, 0x69, 0x70, - 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x13, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x22, 0x43, 0x0a, - 0x0e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x41, 0x73, 0x45, 0x6e, 0x76, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, - 0x74, 0x68, 0x22, 0x8d, 0x02, 0x0a, 0x0a, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, - 0x12, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x11, 0x74, 0x6f, 0x6c, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x88, 0x01, - 0x01, 0x12, 0x58, 0x0a, 0x0f, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x6c, 0x5f, - 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x73, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x74, 0x6f, 0x6c, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x73, 0x6f, 0x6e, 0x42, 0x15, 0x0a, 0x13, 0x5f, - 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x22, 0x5b, 0x0a, 0x13, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, - 0xd4, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, - 0x54, 0x65, 0x72, 0x6d, 0x12, 0x50, 0x0a, 0x11, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x78, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x10, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, - 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1b, - 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, - 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xb8, 0x05, 0x0a, 0x0f, 0x50, 0x6f, 0x64, 0x41, 0x66, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x65, 0x72, 0x6d, 0x12, 0x57, 0x0a, 0x15, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x70, 0x6f, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x66, 0x70, 0x5f, - 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x13, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x6f, 0x64, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x10, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x6f, 0x64, - 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x6b, 0x66, 0x70, 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x50, - 0x6f, 0x64, 0x41, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x65, 0x72, 0x6d, 0x2e, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x6f, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x6f, 0x64, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x63, 0x0a, 0x1b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x66, 0x70, - 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x19, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, - 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x6f, 0x0a, 0x16, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6b, 0x66, 0x70, - 0x5f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x64, 0x41, - 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x65, 0x72, 0x6d, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x06, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x04, 0x61, 0x6e, 0x74, 0x69, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x04, 0x61, 0x6e, 0x74, 0x69, 0x88, 0x01, - 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x6f, 0x64, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x47, 0x0a, 0x19, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x09, 0x0a, - 0x07, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x61, 0x6e, 0x74, - 0x69, 0x22, 0xaa, 0x01, 0x0a, 0x0d, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x44, 0x69, 0x72, 0x4d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, - 0x61, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x88, 0x01, 0x01, - 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x42, - 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x49, - 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, - 0x65, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, - 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, - 0x73, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} +const file_kubernetes_executor_config_proto_rawDesc = "" + + "\n" + + " kubernetes_executor_config.proto\x12\x0ekfp_kubernetes\x1a\x1cgoogle/protobuf/struct.proto\x1a\x13pipeline_spec.proto\"\xc7\t\n" + + "\x18KubernetesExecutorConfig\x12H\n" + + "\x10secret_as_volume\x18\x01 \x03(\v2\x1e.kfp_kubernetes.SecretAsVolumeR\x0esecretAsVolume\x12?\n" + + "\rsecret_as_env\x18\x02 \x03(\v2\x1b.kfp_kubernetes.SecretAsEnvR\vsecretAsEnv\x125\n" + + "\tpvc_mount\x18\x03 \x03(\v2\x18.kfp_kubernetes.PvcMountR\bpvcMount\x12A\n" + + "\rnode_selector\x18\x04 \x01(\v2\x1c.kfp_kubernetes.NodeSelectorR\fnodeSelector\x12>\n" + + "\fpod_metadata\x18\x05 \x01(\v2\x1b.kfp_kubernetes.PodMetadataR\vpodMetadata\x12K\n" + + "\x11image_pull_secret\x18\x06 \x03(\v2\x1f.kfp_kubernetes.ImagePullSecretR\x0fimagePullSecret\x12*\n" + + "\x11image_pull_policy\x18\a \x01(\tR\x0fimagePullPolicy\x12R\n" + + "\x14config_map_as_volume\x18\b \x03(\v2!.kfp_kubernetes.ConfigMapAsVolumeR\x11configMapAsVolume\x12I\n" + + "\x11config_map_as_env\x18\t \x03(\v2\x1e.kfp_kubernetes.ConfigMapAsEnvR\x0econfigMapAsEnv\x126\n" + + "\x17active_deadline_seconds\x18\n" + + " \x01(\x03R\x15activeDeadlineSeconds\x12I\n" + + "\x11field_path_as_env\x18\v \x03(\v2\x1e.kfp_kubernetes.FieldPathAsEnvR\x0efieldPathAsEnv\x12<\n" + + "\vtolerations\x18\f \x03(\v2\x1a.kfp_kubernetes.TolerationR\vtolerations\x12`\n" + + "\x18generic_ephemeral_volume\x18\r \x03(\v2&.kfp_kubernetes.GenericEphemeralVolumeR\x16genericEphemeralVolume\x12E\n" + + "\rnode_affinity\x18\x0e \x03(\v2 .kfp_kubernetes.NodeAffinityTermR\fnodeAffinity\x12B\n" + + "\fpod_affinity\x18\x0f \x03(\v2\x1f.kfp_kubernetes.PodAffinityTermR\vpodAffinity\x12W\n" + + "\x15enabled_shared_memory\x18\x10 \x01(\v2#.kfp_kubernetes.EnabledSharedMemoryR\x13enabledSharedMemory\x12G\n" + + "\x10empty_dir_mounts\x18\x11 \x03(\v2\x1d.kfp_kubernetes.EmptyDirMountR\x0eemptyDirMounts\"J\n" + + "\x13EnabledSharedMemory\x12\x1f\n" + + "\vvolume_name\x18\x01 \x01(\tR\n" + + "volumeName\x12\x12\n" + + "\x04size\x18\x02 \x01(\tR\x04size\"\xe7\x01\n" + + "\x0eSecretAsVolume\x12#\n" + + "\vsecret_name\x18\x01 \x01(\tB\x02\x18\x01R\n" + + "secretName\x12\x1d\n" + + "\n" + + "mount_path\x18\x02 \x01(\tR\tmountPath\x12\x1f\n" + + "\boptional\x18\x03 \x01(\bH\x00R\boptional\x88\x01\x01\x12c\n" + + "\x15secret_name_parameter\x18\x04 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x13secretNameParameterB\v\n" + + "\t_optional\"\xb1\x02\n" + + "\vSecretAsEnv\x12#\n" + + "\vsecret_name\x18\x01 \x01(\tB\x02\x18\x01R\n" + + "secretName\x12K\n" + + "\n" + + "key_to_env\x18\x02 \x03(\v2-.kfp_kubernetes.SecretAsEnv.SecretKeyToEnvMapR\bkeyToEnv\x12c\n" + + "\x15secret_name_parameter\x18\x04 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x13secretNameParameter\x1aK\n" + + "\x11SecretKeyToEnvMap\x12\x1d\n" + + "\n" + + "secret_key\x18\x01 \x01(\tR\tsecretKey\x12\x17\n" + + "\aenv_var\x18\x02 \x01(\tR\x06envVar\"\x81\x03\n" + + "\bPvcMount\x12\x81\x01\n" + + "\x15task_output_parameter\x18\x01 \x01(\v2G.ml_pipelines.TaskInputsSpec.InputParameterSpec.TaskOutputParameterSpecB\x02\x18\x01H\x00R\x13taskOutputParameter\x12 \n" + + "\bconstant\x18\x02 \x01(\tB\x02\x18\x01H\x00R\bconstant\x12@\n" + + "\x19component_input_parameter\x18\x03 \x01(\tB\x02\x18\x01H\x00R\x17componentInputParameter\x12\x1d\n" + + "\n" + + "mount_path\x18\x04 \x01(\tR\tmountPath\x12]\n" + + "\x12pvc_name_parameter\x18\x05 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x10pvcNameParameterB\x0f\n" + + "\rpvc_reference\"\xcf\x02\n" + + "\tCreatePvc\x12\x1b\n" + + "\bpvc_name\x18\x01 \x01(\tH\x00R\apvcName\x12(\n" + + "\x0fpvc_name_suffix\x18\x02 \x01(\tH\x00R\rpvcNameSuffix\x12!\n" + + "\faccess_modes\x18\x03 \x03(\tR\vaccessModes\x12\x12\n" + + "\x04size\x18\x04 \x01(\tR\x04size\x122\n" + + "\x15default_storage_class\x18\x05 \x01(\bR\x13defaultStorageClass\x12,\n" + + "\x12storage_class_name\x18\x06 \x01(\tR\x10storageClassName\x12\x1f\n" + + "\vvolume_name\x18\a \x01(\tR\n" + + "volumeName\x129\n" + + "\vannotations\x18\b \x01(\v2\x17.google.protobuf.StructR\vannotationsB\x06\n" + + "\x04name\"\xf7\x01\n" + + "\tDeletePvc\x12}\n" + + "\x15task_output_parameter\x18\x01 \x01(\v2G.ml_pipelines.TaskInputsSpec.InputParameterSpec.TaskOutputParameterSpecH\x00R\x13taskOutputParameter\x12\x1c\n" + + "\bconstant\x18\x02 \x01(\tH\x00R\bconstant\x12<\n" + + "\x19component_input_parameter\x18\x03 \x01(\tH\x00R\x17componentInputParameterB\x0f\n" + + "\rpvc_reference\"\xea\x01\n" + + "\fNodeSelector\x12@\n" + + "\x06labels\x18\x01 \x03(\v2(.kfp_kubernetes.NodeSelector.LabelsEntryR\x06labels\x12]\n" + + "\x12node_selector_json\x18\x02 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x10nodeSelectorJson\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x99\x02\n" + + "\vPodMetadata\x12?\n" + + "\x06labels\x18\x01 \x03(\v2'.kfp_kubernetes.PodMetadata.LabelsEntryR\x06labels\x12N\n" + + "\vannotations\x18\x02 \x03(\v2,.kfp_kubernetes.PodMetadata.AnnotationsEntryR\vannotations\x1a9\n" + + "\vLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" + + "\x10AnnotationsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xf8\x01\n" + + "\x11ConfigMapAsVolume\x12*\n" + + "\x0fconfig_map_name\x18\x01 \x01(\tB\x02\x18\x01R\rconfigMapName\x12\x1d\n" + + "\n" + + "mount_path\x18\x02 \x01(\tR\tmountPath\x12\x1f\n" + + "\boptional\x18\x03 \x01(\bH\x00R\boptional\x88\x01\x01\x12j\n" + + "\x19config_map_name_parameter\x18\x04 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x16configMapNameParameterB\v\n" + + "\t_optional\"\xd2\x02\n" + + "\x0eConfigMapAsEnv\x12*\n" + + "\x0fconfig_map_name\x18\x01 \x01(\tB\x02\x18\x01R\rconfigMapName\x12Q\n" + + "\n" + + "key_to_env\x18\x02 \x03(\v23.kfp_kubernetes.ConfigMapAsEnv.ConfigMapKeyToEnvMapR\bkeyToEnv\x12j\n" + + "\x19config_map_name_parameter\x18\x03 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x16configMapNameParameter\x1aU\n" + + "\x14ConfigMapKeyToEnvMap\x12$\n" + + "\x0econfig_map_key\x18\x01 \x01(\tR\fconfigMapKey\x12\x17\n" + + "\aenv_var\x18\x02 \x01(\tR\x06envVar\"\xaa\x02\n" + + "\x16GenericEphemeralVolume\x12\x1f\n" + + "\vvolume_name\x18\x01 \x01(\tR\n" + + "volumeName\x12\x1d\n" + + "\n" + + "mount_path\x18\x02 \x01(\tR\tmountPath\x12!\n" + + "\faccess_modes\x18\x03 \x03(\tR\vaccessModes\x12\x12\n" + + "\x04size\x18\x04 \x01(\tR\x04size\x122\n" + + "\x15default_storage_class\x18\x05 \x01(\bR\x13defaultStorageClass\x12,\n" + + "\x12storage_class_name\x18\x06 \x01(\tR\x10storageClassName\x127\n" + + "\bmetadata\x18\a \x01(\v2\x1b.kfp_kubernetes.PodMetadataR\bmetadata\"\x9b\x01\n" + + "\x0fImagePullSecret\x12#\n" + + "\vsecret_name\x18\x01 \x01(\tB\x02\x18\x01R\n" + + "secretName\x12c\n" + + "\x15secret_name_parameter\x18\x02 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x13secretNameParameter\"C\n" + + "\x0eFieldPathAsEnv\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" + + "\n" + + "field_path\x18\x02 \x01(\tR\tfieldPath\"\x8d\x02\n" + + "\n" + + "Toleration\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x1a\n" + + "\boperator\x18\x02 \x01(\tR\boperator\x12\x14\n" + + "\x05value\x18\x03 \x01(\tR\x05value\x12\x16\n" + + "\x06effect\x18\x04 \x01(\tR\x06effect\x122\n" + + "\x12toleration_seconds\x18\x05 \x01(\x03H\x00R\x11tolerationSeconds\x88\x01\x01\x12X\n" + + "\x0ftoleration_json\x18\x06 \x01(\v2/.ml_pipelines.TaskInputsSpec.InputParameterSpecR\x0etolerationJsonB\x15\n" + + "\x13_toleration_seconds\"[\n" + + "\x13SelectorRequirement\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x1a\n" + + "\boperator\x18\x02 \x01(\tR\boperator\x12\x16\n" + + "\x06values\x18\x03 \x03(\tR\x06values\"\xd4\x01\n" + + "\x10NodeAffinityTerm\x12P\n" + + "\x11match_expressions\x18\x01 \x03(\v2#.kfp_kubernetes.SelectorRequirementR\x10matchExpressions\x12F\n" + + "\fmatch_fields\x18\x02 \x03(\v2#.kfp_kubernetes.SelectorRequirementR\vmatchFields\x12\x1b\n" + + "\x06weight\x18\x03 \x01(\x05H\x00R\x06weight\x88\x01\x01B\t\n" + + "\a_weight\"\xb8\x05\n" + + "\x0fPodAffinityTerm\x12W\n" + + "\x15match_pod_expressions\x18\x01 \x03(\v2#.kfp_kubernetes.SelectorRequirementR\x13matchPodExpressions\x12]\n" + + "\x10match_pod_labels\x18\x02 \x03(\v23.kfp_kubernetes.PodAffinityTerm.MatchPodLabelsEntryR\x0ematchPodLabels\x12!\n" + + "\ftopology_key\x18\x03 \x01(\tR\vtopologyKey\x12\x1e\n" + + "\n" + + "namespaces\x18\x04 \x03(\tR\n" + + "namespaces\x12c\n" + + "\x1bmatch_namespace_expressions\x18\x05 \x03(\v2#.kfp_kubernetes.SelectorRequirementR\x19matchNamespaceExpressions\x12o\n" + + "\x16match_namespace_labels\x18\x06 \x03(\v29.kfp_kubernetes.PodAffinityTerm.MatchNamespaceLabelsEntryR\x14matchNamespaceLabels\x12\x1b\n" + + "\x06weight\x18\a \x01(\x05H\x00R\x06weight\x88\x01\x01\x12\x17\n" + + "\x04anti\x18\b \x01(\bH\x01R\x04anti\x88\x01\x01\x1aA\n" + + "\x13MatchPodLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aG\n" + + "\x19MatchNamespaceLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\t\n" + + "\a_weightB\a\n" + + "\x05_anti\"\xaa\x01\n" + + "\rEmptyDirMount\x12\x1f\n" + + "\vvolume_name\x18\x01 \x01(\tR\n" + + "volumeName\x12\x1d\n" + + "\n" + + "mount_path\x18\x02 \x01(\tR\tmountPath\x12\x1b\n" + + "\x06medium\x18\x03 \x01(\tH\x00R\x06medium\x88\x01\x01\x12\"\n" + + "\n" + + "size_limit\x18\x04 \x01(\tH\x01R\tsizeLimit\x88\x01\x01B\t\n" + + "\a_mediumB\r\n" + + "\v_size_limitBIZGgithub.com/kubeflow/pipelines/kubernetes_platform/go/kubernetesplatformb\x06proto3" var ( file_kubernetes_executor_config_proto_rawDescOnce sync.Once - file_kubernetes_executor_config_proto_rawDescData = file_kubernetes_executor_config_proto_rawDesc + file_kubernetes_executor_config_proto_rawDescData []byte ) func file_kubernetes_executor_config_proto_rawDescGZIP() []byte { file_kubernetes_executor_config_proto_rawDescOnce.Do(func() { - file_kubernetes_executor_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_kubernetes_executor_config_proto_rawDescData) + file_kubernetes_executor_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kubernetes_executor_config_proto_rawDesc), len(file_kubernetes_executor_config_proto_rawDesc))) }) return file_kubernetes_executor_config_proto_rawDescData } var file_kubernetes_executor_config_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_kubernetes_executor_config_proto_goTypes = []interface{}{ +var file_kubernetes_executor_config_proto_goTypes = []any{ (*KubernetesExecutorConfig)(nil), // 0: kfp_kubernetes.KubernetesExecutorConfig (*EnabledSharedMemory)(nil), // 1: kfp_kubernetes.EnabledSharedMemory (*SecretAsVolume)(nil), // 2: kfp_kubernetes.SecretAsVolume @@ -2261,285 +1994,31 @@ func file_kubernetes_executor_config_proto_init() { if File_kubernetes_executor_config_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_kubernetes_executor_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KubernetesExecutorConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EnabledSharedMemory); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretAsVolume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretAsEnv); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvcMount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePvc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePvc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PodMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigMapAsVolume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigMapAsEnv); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenericEphemeralVolume); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImagePullSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FieldPathAsEnv); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Toleration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SelectorRequirement); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeAffinityTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PodAffinityTerm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EmptyDirMount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecretAsEnv_SecretKeyToEnvMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kubernetes_executor_config_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigMapAsEnv_ConfigMapKeyToEnvMap); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_kubernetes_executor_config_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_kubernetes_executor_config_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_kubernetes_executor_config_proto_msgTypes[2].OneofWrappers = []any{} + file_kubernetes_executor_config_proto_msgTypes[4].OneofWrappers = []any{ (*PvcMount_TaskOutputParameter)(nil), (*PvcMount_Constant)(nil), (*PvcMount_ComponentInputParameter)(nil), } - file_kubernetes_executor_config_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_kubernetes_executor_config_proto_msgTypes[5].OneofWrappers = []any{ (*CreatePvc_PvcName)(nil), (*CreatePvc_PvcNameSuffix)(nil), } - file_kubernetes_executor_config_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_kubernetes_executor_config_proto_msgTypes[6].OneofWrappers = []any{ (*DeletePvc_TaskOutputParameter)(nil), (*DeletePvc_Constant)(nil), (*DeletePvc_ComponentInputParameter)(nil), } - file_kubernetes_executor_config_proto_msgTypes[9].OneofWrappers = []interface{}{} - file_kubernetes_executor_config_proto_msgTypes[14].OneofWrappers = []interface{}{} - file_kubernetes_executor_config_proto_msgTypes[16].OneofWrappers = []interface{}{} - file_kubernetes_executor_config_proto_msgTypes[17].OneofWrappers = []interface{}{} - file_kubernetes_executor_config_proto_msgTypes[18].OneofWrappers = []interface{}{} + file_kubernetes_executor_config_proto_msgTypes[9].OneofWrappers = []any{} + file_kubernetes_executor_config_proto_msgTypes[14].OneofWrappers = []any{} + file_kubernetes_executor_config_proto_msgTypes[16].OneofWrappers = []any{} + file_kubernetes_executor_config_proto_msgTypes[17].OneofWrappers = []any{} + file_kubernetes_executor_config_proto_msgTypes[18].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kubernetes_executor_config_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_kubernetes_executor_config_proto_rawDesc), len(file_kubernetes_executor_config_proto_rawDesc)), NumEnums: 0, NumMessages: 26, NumExtensions: 0, @@ -2550,7 +2029,6 @@ func file_kubernetes_executor_config_proto_init() { MessageInfos: file_kubernetes_executor_config_proto_msgTypes, }.Build() File_kubernetes_executor_config_proto = out.File - file_kubernetes_executor_config_proto_rawDesc = nil file_kubernetes_executor_config_proto_goTypes = nil file_kubernetes_executor_config_proto_depIdxs = nil } diff --git a/kubernetes_platform/python/kfp/kubernetes/kubernetes_executor_config_pb2.py b/kubernetes_platform/python/kfp/kubernetes/kubernetes_executor_config_pb2.py index f77fc8d8c7b..869a30f6186 100644 --- a/kubernetes_platform/python/kfp/kubernetes/kubernetes_executor_config_pb2.py +++ b/kubernetes_platform/python/kfp/kubernetes/kubernetes_executor_config_pb2.py @@ -1,11 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: kubernetes_executor_config.proto +# Protobuf Python Version: 6.31.1 """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'kubernetes_executor_config.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,88 +27,88 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n kubernetes_executor_config.proto\x12\x0ekfp_kubernetes\x1a\x1cgoogle/protobuf/struct.proto\x1a\x13pipeline_spec.proto\"\xb4\x07\n\x18KubernetesExecutorConfig\x12\x38\n\x10secret_as_volume\x18\x01 \x03(\x0b\x32\x1e.kfp_kubernetes.SecretAsVolume\x12\x32\n\rsecret_as_env\x18\x02 \x03(\x0b\x32\x1b.kfp_kubernetes.SecretAsEnv\x12+\n\tpvc_mount\x18\x03 \x03(\x0b\x32\x18.kfp_kubernetes.PvcMount\x12\x33\n\rnode_selector\x18\x04 \x01(\x0b\x32\x1c.kfp_kubernetes.NodeSelector\x12\x31\n\x0cpod_metadata\x18\x05 \x01(\x0b\x32\x1b.kfp_kubernetes.PodMetadata\x12:\n\x11image_pull_secret\x18\x06 \x03(\x0b\x32\x1f.kfp_kubernetes.ImagePullSecret\x12\x19\n\x11image_pull_policy\x18\x07 \x01(\t\x12?\n\x14\x63onfig_map_as_volume\x18\x08 \x03(\x0b\x32!.kfp_kubernetes.ConfigMapAsVolume\x12\x39\n\x11\x63onfig_map_as_env\x18\t \x03(\x0b\x32\x1e.kfp_kubernetes.ConfigMapAsEnv\x12\x1f\n\x17\x61\x63tive_deadline_seconds\x18\n \x01(\x03\x12\x39\n\x11\x66ield_path_as_env\x18\x0b \x03(\x0b\x32\x1e.kfp_kubernetes.FieldPathAsEnv\x12/\n\x0btolerations\x18\x0c \x03(\x0b\x32\x1a.kfp_kubernetes.Toleration\x12H\n\x18generic_ephemeral_volume\x18\r \x03(\x0b\x32&.kfp_kubernetes.GenericEphemeralVolume\x12\x37\n\rnode_affinity\x18\x0e \x03(\x0b\x32 .kfp_kubernetes.NodeAffinityTerm\x12\x35\n\x0cpod_affinity\x18\x0f \x03(\x0b\x32\x1f.kfp_kubernetes.PodAffinityTerm\x12\x42\n\x15\x65nabled_shared_memory\x18\x10 \x01(\x0b\x32#.kfp_kubernetes.EnabledSharedMemory\x12\x37\n\x10\x65mpty_dir_mounts\x18\x11 \x03(\x0b\x32\x1d.kfp_kubernetes.EmptyDirMount\"8\n\x13\x45nabledSharedMemory\x12\x13\n\x0bvolume_name\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\t\"\xb1\x01\n\x0eSecretAsVolume\x12\x17\n\x0bsecret_name\x18\x01 \x01(\tB\x02\x18\x01\x12\x12\n\nmount_path\x18\x02 \x01(\t\x12\x15\n\x08optional\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12N\n\x15secret_name_parameter\x18\x04 \x01(\x0b\x32/.ml_pipelines.TaskInputsSpec.InputParameterSpecB\x0b\n\t_optional\"\xf3\x01\n\x0bSecretAsEnv\x12\x17\n\x0bsecret_name\x18\x01 \x01(\tB\x02\x18\x01\x12\x41\n\nkey_to_env\x18\x02 \x03(\x0b\x32-.kfp_kubernetes.SecretAsEnv.SecretKeyToEnvMap\x12N\n\x15secret_name_parameter\x18\x04 \x01(\x0b\x32/.ml_pipelines.TaskInputsSpec.InputParameterSpec\x1a\x38\n\x11SecretKeyToEnvMap\x12\x12\n\nsecret_key\x18\x01 \x01(\t\x12\x0f\n\x07\x65nv_var\x18\x02 \x01(\t\"\xab\x02\n\x08PvcMount\x12l\n\x15task_output_parameter\x18\x01 \x01(\x0b\x32G.ml_pipelines.TaskInputsSpec.InputParameterSpec.TaskOutputParameterSpecB\x02\x18\x01H\x00\x12\x16\n\x08\x63onstant\x18\x02 \x01(\tB\x02\x18\x01H\x00\x12\'\n\x19\x63omponent_input_parameter\x18\x03 \x01(\tB\x02\x18\x01H\x00\x12\x12\n\nmount_path\x18\x04 \x01(\t\x12K\n\x12pvc_name_parameter\x18\x05 \x01(\x0b\x32/.ml_pipelines.TaskInputsSpec.InputParameterSpecB\x0f\n\rpvc_reference\"\xe4\x01\n\tCreatePvc\x12\x12\n\x08pvc_name\x18\x01 \x01(\tH\x00\x12\x19\n\x0fpvc_name_suffix\x18\x02 \x01(\tH\x00\x12\x14\n\x0c\x61\x63\x63\x65ss_modes\x18\x03 \x03(\t\x12\x0c\n\x04size\x18\x04 \x01(\t\x12\x1d\n\x15\x64\x65\x66\x61ult_storage_class\x18\x05 \x01(\x08\x12\x1a\n\x12storage_class_name\x18\x06 \x01(\t\x12\x13\n\x0bvolume_name\x18\x07 \x01(\t\x12,\n\x0b\x61nnotations\x18\x08 \x01(\x0b\x32\x17.google.protobuf.StructB\x06\n\x04name\"\xbf\x01\n\tDeletePvc\x12h\n\x15task_output_parameter\x18\x01 \x01(\x0b\x32G.ml_pipelines.TaskInputsSpec.InputParameterSpec.TaskOutputParameterSpecH\x00\x12\x12\n\x08\x63onstant\x18\x02 \x01(\tH\x00\x12#\n\x19\x63omponent_input_parameter\x18\x03 \x01(\tH\x00\x42\x0f\n\rpvc_reference\"\xc4\x01\n\x0cNodeSelector\x12\x38\n\x06labels\x18\x01 \x03(\x0b\x32(.kfp_kubernetes.NodeSelector.LabelsEntry\x12K\n\x12node_selector_json\x18\x02 \x01(\x0b\x32/.ml_pipelines.TaskInputsSpec.InputParameterSpec\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xec\x01\n\x0bPodMetadata\x12\x37\n\x06labels\x18\x01 \x03(\x0b\x32\'.kfp_kubernetes.PodMetadata.LabelsEntry\x12\x41\n\x0b\x61nnotations\x18\x02 \x03(\x0b\x32,.kfp_kubernetes.PodMetadata.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbc\x01\n\x11\x43onfigMapAsVolume\x12\x1b\n\x0f\x63onfig_map_name\x18\x01 \x01(\tB\x02\x18\x01\x12\x12\n\nmount_path\x18\x02 \x01(\t\x12\x15\n\x08optional\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12R\n\x19\x63onfig_map_name_parameter\x18\x04 \x01(\x0b\x32/.ml_pipelines.TaskInputsSpec.InputParameterSpecB\x0b\n\t_optional\"\x8b\x02\n\x0e\x43onfigMapAsEnv\x12\x1b\n\x0f\x63onfig_map_name\x18\x01 \x01(\tB\x02\x18\x01\x12G\n\nkey_to_env\x18\x02 \x03(\x0b\x32\x33.kfp_kubernetes.ConfigMapAsEnv.ConfigMapKeyToEnvMap\x12R\n\x19\x63onfig_map_name_parameter\x18\x03 \x01(\x0b\x32/.ml_pipelines.TaskInputsSpec.InputParameterSpec\x1a?\n\x14\x43onfigMapKeyToEnvMap\x12\x16\n\x0e\x63onfig_map_key\x18\x01 \x01(\t\x12\x0f\n\x07\x65nv_var\x18\x02 \x01(\t\"\xcf\x01\n\x16GenericEphemeralVolume\x12\x13\n\x0bvolume_name\x18\x01 \x01(\t\x12\x12\n\nmount_path\x18\x02 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65ss_modes\x18\x03 \x03(\t\x12\x0c\n\x04size\x18\x04 \x01(\t\x12\x1d\n\x15\x64\x65\x66\x61ult_storage_class\x18\x05 \x01(\x08\x12\x1a\n\x12storage_class_name\x18\x06 \x01(\t\x12-\n\x08metadata\x18\x07 \x01(\x0b\x32\x1b.kfp_kubernetes.PodMetadata\"z\n\x0fImagePullSecret\x12\x17\n\x0bsecret_name\x18\x01 \x01(\tB\x02\x18\x01\x12N\n\x15secret_name_parameter\x18\x02 \x01(\x0b\x32/.ml_pipelines.TaskInputsSpec.InputParameterSpec\"2\n\x0e\x46ieldPathAsEnv\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\"\xcc\x01\n\nToleration\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x10\n\x08operator\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\x0e\n\x06\x65\x66\x66\x65\x63t\x18\x04 \x01(\t\x12\x1f\n\x12toleration_seconds\x18\x05 \x01(\x03H\x00\x88\x01\x01\x12H\n\x0ftoleration_json\x18\x06 \x01(\x0b\x32/.ml_pipelines.TaskInputsSpec.InputParameterSpecB\x15\n\x13_toleration_seconds\"D\n\x13SelectorRequirement\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x10\n\x08operator\x18\x02 \x01(\t\x12\x0e\n\x06values\x18\x03 \x03(\t\"\xad\x01\n\x10NodeAffinityTerm\x12>\n\x11match_expressions\x18\x01 \x03(\x0b\x32#.kfp_kubernetes.SelectorRequirement\x12\x39\n\x0cmatch_fields\x18\x02 \x03(\x0b\x32#.kfp_kubernetes.SelectorRequirement\x12\x13\n\x06weight\x18\x03 \x01(\x05H\x00\x88\x01\x01\x42\t\n\x07_weight\"\xa3\x04\n\x0fPodAffinityTerm\x12\x42\n\x15match_pod_expressions\x18\x01 \x03(\x0b\x32#.kfp_kubernetes.SelectorRequirement\x12M\n\x10match_pod_labels\x18\x02 \x03(\x0b\x32\x33.kfp_kubernetes.PodAffinityTerm.MatchPodLabelsEntry\x12\x14\n\x0ctopology_key\x18\x03 \x01(\t\x12\x12\n\nnamespaces\x18\x04 \x03(\t\x12H\n\x1bmatch_namespace_expressions\x18\x05 \x03(\x0b\x32#.kfp_kubernetes.SelectorRequirement\x12Y\n\x16match_namespace_labels\x18\x06 \x03(\x0b\x32\x39.kfp_kubernetes.PodAffinityTerm.MatchNamespaceLabelsEntry\x12\x13\n\x06weight\x18\x07 \x01(\x05H\x00\x88\x01\x01\x12\x11\n\x04\x61nti\x18\x08 \x01(\x08H\x01\x88\x01\x01\x1a\x35\n\x13MatchPodLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a;\n\x19MatchNamespaceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_weightB\x07\n\x05_anti\"\x80\x01\n\rEmptyDirMount\x12\x13\n\x0bvolume_name\x18\x01 \x01(\t\x12\x12\n\nmount_path\x18\x02 \x01(\t\x12\x13\n\x06medium\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nsize_limit\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\t\n\x07_mediumB\r\n\x0b_size_limitBIZGgithub.com/kubeflow/pipelines/kubernetes_platform/go/kubernetesplatformb\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'kubernetes_executor_config_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'ZGgithub.com/kubeflow/pipelines/kubernetes_platform/go/kubernetesplatform' - _SECRETASVOLUME.fields_by_name['secret_name']._options = None - _SECRETASVOLUME.fields_by_name['secret_name']._serialized_options = b'\030\001' - _SECRETASENV.fields_by_name['secret_name']._options = None - _SECRETASENV.fields_by_name['secret_name']._serialized_options = b'\030\001' - _PVCMOUNT.fields_by_name['task_output_parameter']._options = None - _PVCMOUNT.fields_by_name['task_output_parameter']._serialized_options = b'\030\001' - _PVCMOUNT.fields_by_name['constant']._options = None - _PVCMOUNT.fields_by_name['constant']._serialized_options = b'\030\001' - _PVCMOUNT.fields_by_name['component_input_parameter']._options = None - _PVCMOUNT.fields_by_name['component_input_parameter']._serialized_options = b'\030\001' - _NODESELECTOR_LABELSENTRY._options = None - _NODESELECTOR_LABELSENTRY._serialized_options = b'8\001' - _PODMETADATA_LABELSENTRY._options = None - _PODMETADATA_LABELSENTRY._serialized_options = b'8\001' - _PODMETADATA_ANNOTATIONSENTRY._options = None - _PODMETADATA_ANNOTATIONSENTRY._serialized_options = b'8\001' - _CONFIGMAPASVOLUME.fields_by_name['config_map_name']._options = None - _CONFIGMAPASVOLUME.fields_by_name['config_map_name']._serialized_options = b'\030\001' - _CONFIGMAPASENV.fields_by_name['config_map_name']._options = None - _CONFIGMAPASENV.fields_by_name['config_map_name']._serialized_options = b'\030\001' - _IMAGEPULLSECRET.fields_by_name['secret_name']._options = None - _IMAGEPULLSECRET.fields_by_name['secret_name']._serialized_options = b'\030\001' - _PODAFFINITYTERM_MATCHPODLABELSENTRY._options = None - _PODAFFINITYTERM_MATCHPODLABELSENTRY._serialized_options = b'8\001' - _PODAFFINITYTERM_MATCHNAMESPACELABELSENTRY._options = None - _PODAFFINITYTERM_MATCHNAMESPACELABELSENTRY._serialized_options = b'8\001' - _KUBERNETESEXECUTORCONFIG._serialized_start=104 - _KUBERNETESEXECUTORCONFIG._serialized_end=1052 - _ENABLEDSHAREDMEMORY._serialized_start=1054 - _ENABLEDSHAREDMEMORY._serialized_end=1110 - _SECRETASVOLUME._serialized_start=1113 - _SECRETASVOLUME._serialized_end=1290 - _SECRETASENV._serialized_start=1293 - _SECRETASENV._serialized_end=1536 - _SECRETASENV_SECRETKEYTOENVMAP._serialized_start=1480 - _SECRETASENV_SECRETKEYTOENVMAP._serialized_end=1536 - _PVCMOUNT._serialized_start=1539 - _PVCMOUNT._serialized_end=1838 - _CREATEPVC._serialized_start=1841 - _CREATEPVC._serialized_end=2069 - _DELETEPVC._serialized_start=2072 - _DELETEPVC._serialized_end=2263 - _NODESELECTOR._serialized_start=2266 - _NODESELECTOR._serialized_end=2462 - _NODESELECTOR_LABELSENTRY._serialized_start=2417 - _NODESELECTOR_LABELSENTRY._serialized_end=2462 - _PODMETADATA._serialized_start=2465 - _PODMETADATA._serialized_end=2701 - _PODMETADATA_LABELSENTRY._serialized_start=2417 - _PODMETADATA_LABELSENTRY._serialized_end=2462 - _PODMETADATA_ANNOTATIONSENTRY._serialized_start=2651 - _PODMETADATA_ANNOTATIONSENTRY._serialized_end=2701 - _CONFIGMAPASVOLUME._serialized_start=2704 - _CONFIGMAPASVOLUME._serialized_end=2892 - _CONFIGMAPASENV._serialized_start=2895 - _CONFIGMAPASENV._serialized_end=3162 - _CONFIGMAPASENV_CONFIGMAPKEYTOENVMAP._serialized_start=3099 - _CONFIGMAPASENV_CONFIGMAPKEYTOENVMAP._serialized_end=3162 - _GENERICEPHEMERALVOLUME._serialized_start=3165 - _GENERICEPHEMERALVOLUME._serialized_end=3372 - _IMAGEPULLSECRET._serialized_start=3374 - _IMAGEPULLSECRET._serialized_end=3496 - _FIELDPATHASENV._serialized_start=3498 - _FIELDPATHASENV._serialized_end=3548 - _TOLERATION._serialized_start=3551 - _TOLERATION._serialized_end=3755 - _SELECTORREQUIREMENT._serialized_start=3757 - _SELECTORREQUIREMENT._serialized_end=3825 - _NODEAFFINITYTERM._serialized_start=3828 - _NODEAFFINITYTERM._serialized_end=4001 - _PODAFFINITYTERM._serialized_start=4004 - _PODAFFINITYTERM._serialized_end=4551 - _PODAFFINITYTERM_MATCHPODLABELSENTRY._serialized_start=4417 - _PODAFFINITYTERM_MATCHPODLABELSENTRY._serialized_end=4470 - _PODAFFINITYTERM_MATCHNAMESPACELABELSENTRY._serialized_start=4472 - _PODAFFINITYTERM_MATCHNAMESPACELABELSENTRY._serialized_end=4531 - _EMPTYDIRMOUNT._serialized_start=4554 - _EMPTYDIRMOUNT._serialized_end=4682 +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'kubernetes_executor_config_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'ZGgithub.com/kubeflow/pipelines/kubernetes_platform/go/kubernetesplatform' + _globals['_SECRETASVOLUME'].fields_by_name['secret_name']._loaded_options = None + _globals['_SECRETASVOLUME'].fields_by_name['secret_name']._serialized_options = b'\030\001' + _globals['_SECRETASENV'].fields_by_name['secret_name']._loaded_options = None + _globals['_SECRETASENV'].fields_by_name['secret_name']._serialized_options = b'\030\001' + _globals['_PVCMOUNT'].fields_by_name['task_output_parameter']._loaded_options = None + _globals['_PVCMOUNT'].fields_by_name['task_output_parameter']._serialized_options = b'\030\001' + _globals['_PVCMOUNT'].fields_by_name['constant']._loaded_options = None + _globals['_PVCMOUNT'].fields_by_name['constant']._serialized_options = b'\030\001' + _globals['_PVCMOUNT'].fields_by_name['component_input_parameter']._loaded_options = None + _globals['_PVCMOUNT'].fields_by_name['component_input_parameter']._serialized_options = b'\030\001' + _globals['_NODESELECTOR_LABELSENTRY']._loaded_options = None + _globals['_NODESELECTOR_LABELSENTRY']._serialized_options = b'8\001' + _globals['_PODMETADATA_LABELSENTRY']._loaded_options = None + _globals['_PODMETADATA_LABELSENTRY']._serialized_options = b'8\001' + _globals['_PODMETADATA_ANNOTATIONSENTRY']._loaded_options = None + _globals['_PODMETADATA_ANNOTATIONSENTRY']._serialized_options = b'8\001' + _globals['_CONFIGMAPASVOLUME'].fields_by_name['config_map_name']._loaded_options = None + _globals['_CONFIGMAPASVOLUME'].fields_by_name['config_map_name']._serialized_options = b'\030\001' + _globals['_CONFIGMAPASENV'].fields_by_name['config_map_name']._loaded_options = None + _globals['_CONFIGMAPASENV'].fields_by_name['config_map_name']._serialized_options = b'\030\001' + _globals['_IMAGEPULLSECRET'].fields_by_name['secret_name']._loaded_options = None + _globals['_IMAGEPULLSECRET'].fields_by_name['secret_name']._serialized_options = b'\030\001' + _globals['_PODAFFINITYTERM_MATCHPODLABELSENTRY']._loaded_options = None + _globals['_PODAFFINITYTERM_MATCHPODLABELSENTRY']._serialized_options = b'8\001' + _globals['_PODAFFINITYTERM_MATCHNAMESPACELABELSENTRY']._loaded_options = None + _globals['_PODAFFINITYTERM_MATCHNAMESPACELABELSENTRY']._serialized_options = b'8\001' + _globals['_KUBERNETESEXECUTORCONFIG']._serialized_start=104 + _globals['_KUBERNETESEXECUTORCONFIG']._serialized_end=1052 + _globals['_ENABLEDSHAREDMEMORY']._serialized_start=1054 + _globals['_ENABLEDSHAREDMEMORY']._serialized_end=1110 + _globals['_SECRETASVOLUME']._serialized_start=1113 + _globals['_SECRETASVOLUME']._serialized_end=1290 + _globals['_SECRETASENV']._serialized_start=1293 + _globals['_SECRETASENV']._serialized_end=1536 + _globals['_SECRETASENV_SECRETKEYTOENVMAP']._serialized_start=1480 + _globals['_SECRETASENV_SECRETKEYTOENVMAP']._serialized_end=1536 + _globals['_PVCMOUNT']._serialized_start=1539 + _globals['_PVCMOUNT']._serialized_end=1838 + _globals['_CREATEPVC']._serialized_start=1841 + _globals['_CREATEPVC']._serialized_end=2069 + _globals['_DELETEPVC']._serialized_start=2072 + _globals['_DELETEPVC']._serialized_end=2263 + _globals['_NODESELECTOR']._serialized_start=2266 + _globals['_NODESELECTOR']._serialized_end=2462 + _globals['_NODESELECTOR_LABELSENTRY']._serialized_start=2417 + _globals['_NODESELECTOR_LABELSENTRY']._serialized_end=2462 + _globals['_PODMETADATA']._serialized_start=2465 + _globals['_PODMETADATA']._serialized_end=2701 + _globals['_PODMETADATA_LABELSENTRY']._serialized_start=2417 + _globals['_PODMETADATA_LABELSENTRY']._serialized_end=2462 + _globals['_PODMETADATA_ANNOTATIONSENTRY']._serialized_start=2651 + _globals['_PODMETADATA_ANNOTATIONSENTRY']._serialized_end=2701 + _globals['_CONFIGMAPASVOLUME']._serialized_start=2704 + _globals['_CONFIGMAPASVOLUME']._serialized_end=2892 + _globals['_CONFIGMAPASENV']._serialized_start=2895 + _globals['_CONFIGMAPASENV']._serialized_end=3162 + _globals['_CONFIGMAPASENV_CONFIGMAPKEYTOENVMAP']._serialized_start=3099 + _globals['_CONFIGMAPASENV_CONFIGMAPKEYTOENVMAP']._serialized_end=3162 + _globals['_GENERICEPHEMERALVOLUME']._serialized_start=3165 + _globals['_GENERICEPHEMERALVOLUME']._serialized_end=3372 + _globals['_IMAGEPULLSECRET']._serialized_start=3374 + _globals['_IMAGEPULLSECRET']._serialized_end=3496 + _globals['_FIELDPATHASENV']._serialized_start=3498 + _globals['_FIELDPATHASENV']._serialized_end=3548 + _globals['_TOLERATION']._serialized_start=3551 + _globals['_TOLERATION']._serialized_end=3755 + _globals['_SELECTORREQUIREMENT']._serialized_start=3757 + _globals['_SELECTORREQUIREMENT']._serialized_end=3825 + _globals['_NODEAFFINITYTERM']._serialized_start=3828 + _globals['_NODEAFFINITYTERM']._serialized_end=4001 + _globals['_PODAFFINITYTERM']._serialized_start=4004 + _globals['_PODAFFINITYTERM']._serialized_end=4551 + _globals['_PODAFFINITYTERM_MATCHPODLABELSENTRY']._serialized_start=4417 + _globals['_PODAFFINITYTERM_MATCHPODLABELSENTRY']._serialized_end=4470 + _globals['_PODAFFINITYTERM_MATCHNAMESPACELABELSENTRY']._serialized_start=4472 + _globals['_PODAFFINITYTERM_MATCHNAMESPACELABELSENTRY']._serialized_end=4531 + _globals['_EMPTYDIRMOUNT']._serialized_start=4554 + _globals['_EMPTYDIRMOUNT']._serialized_end=4682 # @@protoc_insertion_point(module_scope) diff --git a/kubernetes_platform/python/requirements-dev.txt b/kubernetes_platform/python/requirements-dev.txt new file mode 100644 index 00000000000..debfb23fe07 --- /dev/null +++ b/kubernetes_platform/python/requirements-dev.txt @@ -0,0 +1,8 @@ +docformatter==1.4 +isort==5.10.1 +mypy==0.941 +pre-commit==2.19.0 +pycln==2.1.1 +pytest==7.1.2 +pytest-xdist==2.5.0 +yapf==0.32.0 \ No newline at end of file diff --git a/kubernetes_platform/python/requirements.txt b/kubernetes_platform/python/requirements.txt new file mode 100644 index 00000000000..a8bbaad08ea --- /dev/null +++ b/kubernetes_platform/python/requirements.txt @@ -0,0 +1,2 @@ +protobuf>=4.21.1,<=6.31.1 +kfp>=2.6.0,<3 \ No newline at end of file diff --git a/kubernetes_platform/python/setup.py b/kubernetes_platform/python/setup.py index ad56ad76e1d..b694fe4c90d 100644 --- a/kubernetes_platform/python/setup.py +++ b/kubernetes_platform/python/setup.py @@ -14,25 +14,21 @@ import os import re +from typing import List import setuptools NAME = 'kfp-kubernetes' -REQUIREMENTS = [ - 'protobuf>=4.21.1,<5', - 'kfp>=2.6.0,<3', -] -DEV_REQUIREMENTS = [ - 'docformatter==1.4', - 'isort==5.10.1', - 'mypy==0.941', - 'pre-commit==2.19.0', - 'pycln==2.1.1', - 'pytest==7.1.2', - 'pytest-xdist==2.5.0', - 'yapf==0.32.0', -] +def get_requirements(requirements_file: str) -> List[str]: + """Read requirements from requirements.in.""" + + file_path = os.path.join(os.path.dirname(__file__), requirements_file) + with open(file_path, 'r') as f: + lines = f.readlines() + lines = [line.strip() for line in lines] + lines = [line for line in lines if not line.startswith('#') and line] + return lines def find_version(*file_path_parts: str) -> str: """Get version from kfp.__init__.__version__.""" @@ -77,10 +73,10 @@ def read_readme() -> str: }, packages=setuptools.find_namespace_packages(include=['kfp.*']), python_requires='>=3.9.0', - install_requires=REQUIREMENTS, + install_requires=get_requirements('requirements.txt'), include_package_data=True, extras_require={ - 'dev': DEV_REQUIREMENTS, + 'dev': get_requirements('requirements-dev.txt'), }, license='Apache 2.0', ) diff --git a/sdk/python/requirements.in b/sdk/python/requirements.in index 2e1ded6a982..57bcae0f98d 100644 --- a/sdk/python/requirements.in +++ b/sdk/python/requirements.in @@ -11,7 +11,9 @@ google-api-core>=1.31.5,<3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0 google-auth>=1.6.1,<3 # https://github.com/googleapis/python-storage/blob/main/CHANGELOG.md#221-2022-03-15 google-cloud-storage>=2.2.1,<4 -# pin kfp-pipeline-spec to an exact version, since this is the contract between a given KFP SDK version and the BE. we don't want old version of the SDK to write new fields and to have the BE reject the new unsupported field (even if the new field backward compatible from a proto perspective) +# pin kfp-pipeline-spec to an exact version, since this is the contract between a given KFP +# SDK version and the BE. we don't want old version of the SDK to write new fields and to +# have the BE reject the new unsupported field (even if the new field backward compatible from a proto perspective) kfp-pipeline-spec==0.7.0 # Update the upper version whenever a new major version of the # kfp-server-api package is released. @@ -19,7 +21,7 @@ kfp-pipeline-spec==0.7.0 # kfp-server-api kfp-server-api>=2.1.0,<2.5.0 kubernetes>=8.0.0,<31 -protobuf>=4.21.1,<5 +protobuf>=4.21.1,<=6.31 PyYAML>=5.3,<7 requests-toolbelt>=0.8.0,<2 tabulate>=0.8.6,<1 diff --git a/sdk/python/requirements.txt b/sdk/python/requirements.txt index 285a4ddd70f..c9da4579534 100644 --- a/sdk/python/requirements.txt +++ b/sdk/python/requirements.txt @@ -6,7 +6,7 @@ # cachetools==5.5.2 # via google-auth -certifi==2025.4.26 +certifi==2025.7.14 # via # kfp-server-api # kubernetes @@ -14,17 +14,19 @@ certifi==2025.4.26 charset-normalizer==3.4.2 # via requests click==8.1.8 - # via -r requirements.in + # via + # -r requirements.in + # click-option-group click-option-group==0.5.7 # via -r requirements.in docstring-parser==0.16 # via -r requirements.in -google-api-core==2.24.2 +google-api-core==2.25.1 # via # -r requirements.in # google-cloud-core # google-cloud-storage -google-auth==2.40.2 +google-auth==2.40.3 # via # -r requirements.in # google-api-core @@ -33,7 +35,7 @@ google-auth==2.40.2 # kubernetes google-cloud-core==2.4.3 # via google-cloud-storage -google-cloud-storage==3.1.0 +google-cloud-storage==3.2.0 # via -r requirements.in google-crc32c==1.7.1 # via @@ -51,7 +53,7 @@ kfp-server-api==2.4.0 # via -r requirements.in kubernetes==30.1.0 # via -r requirements.in -oauthlib==3.2.2 +oauthlib==3.3.1 # via # kubernetes # requests-oauthlib @@ -78,7 +80,7 @@ pyyaml==6.0.2 # via # -r requirements.in # kubernetes -requests==2.32.3 +requests==2.32.4 # via # google-api-core # google-cloud-storage @@ -106,3 +108,4 @@ urllib3==2.5.0 # requests websocket-client==1.8.0 # via kubernetes +zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/test/presubmit-tests-sdk.sh b/test/presubmit-tests-sdk.sh index 110d595af90..35ca2a03623 100755 --- a/test/presubmit-tests-sdk.sh +++ b/test/presubmit-tests-sdk.sh @@ -25,7 +25,15 @@ python3 -m pip install -r sdk/python/requirements-dev.txt python3 -m pip install setuptools python3 -m pip install wheel==0.42.0 python3 -m pip install coveralls==1.9.2 -python3 -m pip install --upgrade protobuf + +PROTOBUF_VERSION="${PROTOBUF_VERSION:-latest}" + +if [[ "$PROTOBUF_VERSION" == "latest" ]]; then + python3 -m pip install --upgrade protobuf +else + python3 -m pip install "protobuf==$PROTOBUF_VERSION" +fi +python3 -c "import google.protobuf; print('✅ Protobuf version:', google.protobuf.__version__)" python3 -m pip install sdk/python # regenerate the kfp-pipeline-spec diff --git a/test/release/Dockerfile.release b/test/release/Dockerfile.release index 51522f8fc0e..926c3f8efc1 100644 --- a/test/release/Dockerfile.release +++ b/test/release/Dockerfile.release @@ -14,7 +14,7 @@ # Based on KFP backend api client generator dockerfile # Keep in sync with the version used in backend/api/Makefile -FROM ghcr.io/kubeflow/kfp-api-generator:1.1 +FROM ghcr.io/kubeflow/kfp-api-generator:1.2 # install nvm & node 12 # Reference: https://stackoverflow.com/a/28390848 diff --git a/test/release/Makefile b/test/release/Makefile index 0a5e83e57cb..d1c9fa26a8b 100644 --- a/test/release/Makefile +++ b/test/release/Makefile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -REMOTE=ghcr.io/kubeflow/kfp-release:1.1 +REMOTE=ghcr.io/kubeflow/kfp-release:1.2 CONTAINER_ENGINE ?= docker diff --git a/test/release/bump-version-docker.sh b/test/release/bump-version-docker.sh index b7f6bf7ad68..2bdf3f4ba38 100755 --- a/test/release/bump-version-docker.sh +++ b/test/release/bump-version-docker.sh @@ -31,7 +31,7 @@ if [[ -z "$TAG_NAME" ]]; then fi pushd "${REPO_ROOT}" -RELEASE_IMAGE=${RELEASE_IMAGE:-ghcr.io/kubeflow/kfp-release:1.1} +RELEASE_IMAGE=${RELEASE_IMAGE:-ghcr.io/kubeflow/kfp-release:1.2} docker run -it --rm \ --user $(id -u):$(id -g) \ --mount type=bind,source="$(pwd)",target=/go/src/github.com/kubeflow/pipelines \ diff --git a/test/release/release.sh b/test/release/release.sh index 2e84eddb128..5ac304957f8 100755 --- a/test/release/release.sh +++ b/test/release/release.sh @@ -52,7 +52,7 @@ fi echo "Running the bump version script in cloned repo" echo -n "$TAG" > ./VERSION -PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-release:1.1 +PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-release:1.2 pushd ./test/release make release-in-place popd