From 3548eab07dca4a44f0262db93be013414ffa1cbc Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Tue, 26 Mar 2024 16:11:06 +0000 Subject: [PATCH 1/6] More controlled environment in the build Signed-off-by: Andrea Peruffo --- .dockerignore | 2 ++ .gitignore | 4 ++++ Dockerfile | 16 +++++--------- Makefile | 46 +++++++++++++++++++++++---------------- docker-compose-local.yaml | 16 ++++++++++---- scripts/install_protoc.sh | 20 +++++++++++++++++ 6 files changed, 70 insertions(+), 34 deletions(-) create mode 100644 .dockerignore create mode 100755 scripts/install_protoc.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..f732a0b2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +bin +include diff --git a/.gitignore b/.gitignore index 0d0c4601..01ceb11b 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,7 @@ log.html output.xml report.html __pycache__ + +# Protoc files +include/ +readme.txt diff --git a/Dockerfile b/Dockerfile index e12191d6..8f94195a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,25 +19,19 @@ RUN yum install -y nodejs npm java-11 # Copy the go source COPY ["Makefile", "main.go", ".openapi-generator-ignore", "openapitools.json", "./"] -# Download protoc compiler v24.3 -RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip -O protoc.zip && \ - unzip -q protoc.zip && \ - bin/protoc --version && \ - rm protoc.zip - -# Download tools -RUN make deps - # Copy rest of the source -COPY bin/ bin/ +COPY .git/ .git/ COPY cmd/ cmd/ COPY api/ api/ COPY internal/ internal/ -COPY pkg/ pkg/ COPY scripts/ scripts/ +COPY pkg/ pkg/ COPY patches/ patches/ COPY templates/ templates/ +# Download tools +RUN make deps + # Build USER root RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 make clean model-registry diff --git a/Makefile b/Makefile index 24b1345d..20a65905 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH))) PROJECT_BIN := $(PROJECT_PATH)/bin +GO := $(PROJECT_BIN)/go1.19 # add tools bin directory PATH := $(PROJECT_BIN):$(PATH) @@ -56,7 +57,7 @@ api/grpc/ml_metadata/proto/metadata_store_service.proto: sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/kubeflow/model-registry/internal/ml_metadata/proto";#' metadata_store_service.proto internal/ml_metadata/proto/%.pb.go: api/grpc/ml_metadata/proto/%.proto - protoc -I./api/grpc --go_out=./internal --go_opt=paths=source_relative \ + bin/protoc -I./api/grpc --go_out=./internal --go_opt=paths=source_relative \ --go-grpc_out=./internal --go-grpc_opt=paths=source_relative $< .PHONY: gen/grpc @@ -76,8 +77,8 @@ openapi/validate: bin/openapi-generator-cli # generate the openapi server implementation .PHONY: gen/openapi-server gen/openapi-server: bin/openapi-generator-cli openapi/validate - @if git diff --cached --name-only | grep -q "api/openapi/model-registry.yaml" || \ - git diff --name-only | grep -q "api/openapi/model-registry.yaml" || \ + @if git diff --exit-code --name-only | grep -q "api/openapi/model-registry.yaml" || \ + git diff --exit-code --name-only | grep -q "api/openapi/model-registry.yaml" || \ [ -n "${FORCE_SERVER_GENERATION}" ]; then \ ROOT_FOLDER="." ./scripts/gen_openapi_server.sh; \ else \ @@ -97,7 +98,7 @@ pkg/openapi/client.go: bin/openapi-generator-cli api/openapi/model-registry.yaml .PHONY: vet vet: - go vet ./... + ${GO} vet ./... .PHONY: clean clean: @@ -107,14 +108,21 @@ clean: clean/odh: rm -Rf ./model-registry +bin/go: + GOBIN=$(PROJECT_BIN) go install golang.org/dl/go1.19@latest + $(PROJECT_BIN)/go1.19 download + +bin/protoc: + ./scripts/install_protoc.sh + bin/go-enum: - GOBIN=$(PROJECT_BIN) go install github.com/searKing/golang/tools/go-enum@v1.2.97 + GOBIN=$(PROJECT_BIN) ${GO} install github.com/searKing/golang/tools/go-enum@v1.2.97 bin/protoc-gen-go: - GOBIN=$(PROJECT_BIN) go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0 + GOBIN=$(PROJECT_BIN) ${GO} install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0 bin/protoc-gen-go-grpc: - GOBIN=$(PROJECT_BIN) go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 + GOBIN=$(PROJECT_BIN) ${GO} install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 GOLANGCI_LINT ?= ${PROJECT_BIN}/golangci-lint bin/golangci-lint: @@ -122,7 +130,7 @@ bin/golangci-lint: GOVERTER ?= ${PROJECT_BIN}/goverter bin/goverter: - GOBIN=$(PROJECT_PATH)/bin go install github.com/jmattheis/goverter/cmd/goverter@v1.1.1 + GOBIN=$(PROJECT_PATH)/bin ${GO} install github.com/jmattheis/goverter/cmd/goverter@v1.1.1 OPENAPI_GENERATOR ?= ${PROJECT_BIN}/openapi-generator-cli NPM ?= "$(shell which npm)" @@ -147,23 +155,23 @@ clean/deps: rm -Rf bin/* .PHONY: deps -deps: bin/go-enum bin/protoc-gen-go bin/protoc-gen-go-grpc bin/golangci-lint bin/goverter bin/openapi-generator-cli +deps: bin/go bin/protoc bin/go-enum bin/protoc-gen-go bin/protoc-gen-go-grpc bin/golangci-lint bin/goverter bin/openapi-generator-cli .PHONY: vendor vendor: - go mod vendor + ${GO} mod vendor .PHONY: build build: gen vet lint - go build + ${GO} build -buildvcs=false .PHONY: build/odh build/odh: vet - go build + ${GO} build -buildvcs=false .PHONY: gen gen: deps gen/grpc gen/openapi gen/openapi-server gen/converter - go generate ./... + ${GO} generate ./... .PHONY: lint lint: @@ -172,20 +180,20 @@ lint: .PHONY: test test: gen - go test ./internal/... ./pkg/... + ${GO} test ./internal/... ./pkg/... .PHONY: test-nocache test-nocache: gen - go test ./internal/... ./pkg/... -count=1 + ${GO} test ./internal/... ./pkg/... -count=1 .PHONY: test-cover test-cover: gen - go test ./internal/... ./pkg/... -coverprofile=coverage.txt - go tool cover -html=coverage.txt -o coverage.html + ${GO} test ./internal/... ./pkg/... -coverprofile=coverage.txt + ${GO} tool cover -html=coverage.txt -o coverage.html .PHONY: run/proxy run/proxy: gen - go run main.go proxy --logtostderr=true + ${GO} run main.go proxy --logtostderr=true .PHONY: proxy proxy: build @@ -204,7 +212,7 @@ endif # build docker image .PHONY: image/build image/build: - ${DOCKER} build . -f ${DOCKERFILE} -t ${IMG}:$(IMG_VERSION) + ${DOCKER} build . -f ${DOCKERFILE} -t ${IMG}:$(IMG_VERSION) --network host # push docker image .PHONY: image/push diff --git a/docker-compose-local.yaml b/docker-compose-local.yaml index 52b7601f..7e41366a 100644 --- a/docker-compose-local.yaml +++ b/docker-compose-local.yaml @@ -1,10 +1,13 @@ -version: '3' +version: '3.4' services: mlmd-server: image: gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0 container_name: mlmd-server ports: - - "9090:8080" + - target: 8080 + published: 9090 + protocol: tcp + mode: host environment: - METADATA_STORE_SERVER_CONFIG_FILE=/tmp/shared/conn_config.pb volumes: @@ -13,8 +16,13 @@ services: build: context: . dockerfile: Dockerfile - command: ["proxy", "--mlmd-hostname", "localhost", "--mlmd-port", "9090"] + network: host + command: ["proxy", "--hostname", "0.0.0.0", "--mlmd-hostname", "mlmd-server", "--mlmd-port", "8080"] container_name: model-registry - network_mode: host + ports: + - target: 8080 + published: 8080 + protocol: tcp + mode: host depends_on: - mlmd-server diff --git a/scripts/install_protoc.sh b/scripts/install_protoc.sh new file mode 100755 index 00000000..d8ce2a18 --- /dev/null +++ b/scripts/install_protoc.sh @@ -0,0 +1,20 @@ +#! /bin/bash +set -euxo pipefail + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +VERSION="24.3" +OS="linux" +if [[ "$OSTYPE" == "darwin"* ]]; then + # Mac OSX + OS="osx" +fi +# TODO: support for arm +ARCH="x86_64" + +mkdir -p ${SCRIPT_DIR}/../bin + +wget -q https://github.com/protocolbuffers/protobuf/releases/download/v${VERSION}/protoc-${VERSION}-${OS}-${ARCH}.zip -O ${SCRIPT_DIR}/../protoc.zip && \ + unzip -qo ${SCRIPT_DIR}/../protoc.zip -d ${SCRIPT_DIR}/.. && \ + bin/protoc --version && \ + rm ${SCRIPT_DIR}/../protoc.zip From 9650fbbfe25aaca26a583ddef43d164c4bf540e0 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Tue, 26 Mar 2024 18:33:54 +0000 Subject: [PATCH 2/6] [wip] Testing the Kiota generated Http calls --- api/openapi/model-registry.yaml | 459 ++++++------ test/python-kiota/.gitignore | 5 + test/python-kiota/Makefile | 37 + test/python-kiota/README.md | 27 + test/python-kiota/apisdk/__init__.py | 0 test/python-kiota/kiota-gen.py | 93 +++ test/python-kiota/kiota-version.csproj | 5 + test/python-kiota/poetry.lock | 923 +++++++++++++++++++++++++ test/python-kiota/pyproject.toml | 51 ++ test/python-kiota/tests/basic_test.py | 103 +++ 10 files changed, 1489 insertions(+), 214 deletions(-) create mode 100644 test/python-kiota/.gitignore create mode 100644 test/python-kiota/Makefile create mode 100644 test/python-kiota/README.md create mode 100644 test/python-kiota/apisdk/__init__.py create mode 100644 test/python-kiota/kiota-gen.py create mode 100644 test/python-kiota/kiota-version.csproj create mode 100644 test/python-kiota/poetry.lock create mode 100644 test/python-kiota/pyproject.toml create mode 100644 test/python-kiota/tests/basic_test.py diff --git a/api/openapi/model-registry.yaml b/api/openapi/model-registry.yaml index a7a22c71..6e4082b8 100644 --- a/api/openapi/model-registry.yaml +++ b/api/openapi/model-registry.yaml @@ -978,8 +978,11 @@ components: type: string default: "model-artifact" allOf: - - $ref: "#/components/schemas/BaseArtifact" - - $ref: "#/components/schemas/ModelArtifactCreate" + - $ref: "#/components/schemas/WithBaseArtifactUpdate" + - $ref: "#/components/schemas/WithBaseResource" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithModelArtifactUpdate" DocArtifact: description: A document. type: object @@ -990,112 +993,106 @@ components: type: string default: "doc-artifact" allOf: - - $ref: "#/components/schemas/BaseArtifact" + - $ref: "#/components/schemas/WithBaseArtifactUpdate" + - $ref: "#/components/schemas/WithBaseResource" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" RegisteredModel: description: A registered model in model registry. A registered model has ModelVersion children. allOf: - - $ref: "#/components/schemas/BaseResource" - - type: object - - $ref: "#/components/schemas/RegisteredModelCreate" + - $ref: "#/components/schemas/WithBaseResource" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithRegisteredModelUpdate" ModelVersionList: description: List of ModelVersion entities. type: object + properties: + items: + description: Array of `ModelVersion` entities. + type: array + items: + $ref: "#/components/schemas/ModelVersion" allOf: - - type: object - properties: - items: - description: Array of `ModelVersion` entities. - type: array - items: - $ref: "#/components/schemas/ModelVersion" - $ref: "#/components/schemas/BaseResourceList" ModelArtifactList: description: List of ModelArtifact entities. type: object + properties: + items: + description: Array of `ModelArtifact` entities. + type: array + items: + $ref: "#/components/schemas/ModelArtifact" allOf: - - type: object - properties: - items: - description: Array of `ModelArtifact` entities. - type: array - items: - $ref: "#/components/schemas/ModelArtifact" - $ref: "#/components/schemas/BaseResourceList" RegisteredModelCreate: description: A registered model in model registry. A registered model has ModelVersion children. allOf: - - type: object - - $ref: "#/components/schemas/BaseResourceCreate" - - $ref: "#/components/schemas/RegisteredModelUpdate" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithRegisteredModelUpdate" + WithRegisteredModelUpdate: + description: A registered model in model registry. A registered model has ModelVersion children. + type: object + properties: + state: + $ref: "#/components/schemas/RegisteredModelState" RegisteredModelUpdate: description: A registered model in model registry. A registered model has ModelVersion children. allOf: - - $ref: "#/components/schemas/BaseResourceUpdate" - - type: object - properties: - state: - $ref: "#/components/schemas/RegisteredModelState" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithRegisteredModelUpdate" ModelVersion: + description: Represents a ModelVersion belonging to a RegisteredModel. + required: + - registeredModelId + allOf: + - $ref: "#/components/schemas/WithBaseResource" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithModelVersionUpdate" + ModelVersionUpdate: description: Represents a ModelVersion belonging to a RegisteredModel. allOf: - - $ref: "#/components/schemas/ModelVersionCreate" - - $ref: "#/components/schemas/BaseResource" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithModelVersionUpdate" ModelVersionCreate: description: Represents a ModelVersion belonging to a RegisteredModel. required: - registeredModelId allOf: - - $ref: "#/components/schemas/BaseResourceCreate" - - $ref: "#/components/schemas/ModelVersionUpdate" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithModelVersionUpdate" properties: registeredModelId: description: ID of the `RegisteredModel` to which this version belongs. type: string - ModelVersionUpdate: + WithModelVersionUpdate: description: Represents a ModelVersion belonging to a RegisteredModel. - allOf: - - $ref: "#/components/schemas/BaseResourceUpdate" - - type: object - properties: - state: - $ref: "#/components/schemas/ModelVersionState" - author: - description: Name of the author. - type: string - BaseArtifactCreate: - allOf: - - $ref: "#/components/schemas/BaseArtifactUpdate" - - $ref: "#/components/schemas/BaseResourceCreate" - BaseArtifactUpdate: - allOf: - - $ref: "#/components/schemas/BaseResourceUpdate" - - type: object - properties: - uri: - description: |- - The uniform resource identifier of the physical artifact. - May be empty if there is no physical artifact. - type: string - state: - $ref: "#/components/schemas/ArtifactState" - BaseExecution: - allOf: - - $ref: "#/components/schemas/BaseExecutionCreate" - - type: object - - $ref: "#/components/schemas/BaseResource" - BaseExecutionCreate: - allOf: - - $ref: "#/components/schemas/BaseExecutionUpdate" - - type: object - - $ref: "#/components/schemas/BaseResourceCreate" - BaseExecutionUpdate: type: object - allOf: - - type: object - properties: - lastKnownState: - $ref: "#/components/schemas/ExecutionState" - - $ref: "#/components/schemas/BaseResourceUpdate" + properties: + state: + $ref: "#/components/schemas/ModelVersionState" + author: + description: Name of the author. + type: string + WithBaseArtifactUpdate: + type: object + properties: + uri: + description: |- + The uniform resource identifier of the physical artifact. + May be empty if there is no physical artifact. + type: string + state: + $ref: "#/components/schemas/ArtifactState" + WithBaseExecutionUpdate: + type: object + properties: + lastKnownState: + $ref: "#/components/schemas/ExecutionState" MetadataValue: oneOf: - $ref: "#/components/schemas/MetadataIntValue" @@ -1200,40 +1197,36 @@ components: type: string example: MetadataBoolValue default: MetadataBoolValue - BaseResource: - allOf: - - $ref: "#/components/schemas/BaseResourceCreate" - - type: object - properties: - id: - format: int64 - description: Output only. The unique server generated id of the resource. - type: string - readOnly: true - createTimeSinceEpoch: - format: int64 - description: Output only. Create time of the resource in millisecond since epoch. - type: string - readOnly: true - lastUpdateTimeSinceEpoch: - format: int64 - description: |- - Output only. Last update time of the resource since epoch in millisecond - since epoch. - type: string - readOnly: true - BaseResourceCreate: - allOf: - - $ref: "#/components/schemas/BaseResourceUpdate" - - type: object - properties: - name: - description: |- - The client provided name of the artifact. This field is optional. If set, - it must be unique among all the artifacts of the same artifact type within - a database instance and cannot be changed once set. - type: string - BaseResourceUpdate: + WithBaseResource: + type: object + properties: + id: + format: int64 + description: Output only. The unique server generated id of the resource. + type: string + readOnly: true + createTimeSinceEpoch: + format: int64 + description: Output only. Create time of the resource in millisecond since epoch. + type: string + readOnly: true + lastUpdateTimeSinceEpoch: + format: int64 + description: |- + Output only. Last update time of the resource since epoch in millisecond + since epoch. + type: string + readOnly: true + WithBaseResourceCreate: + type: object + properties: + name: + description: |- + The client provided name of the artifact. This field is optional. If set, + it must be unique among all the artifacts of the same artifact type within + a database instance and cannot be changed once set. + type: string + WithBaseResourceUpdate: type: object properties: customProperties: @@ -1271,42 +1264,68 @@ components: ArtifactList: description: A list of Artifact entities. type: object + properties: + items: + description: Array of `Artifact` entities. + type: array + items: + $ref: "#/components/schemas/Artifact" allOf: - - type: object - properties: - items: - description: Array of `Artifact` entities. - type: array - items: - $ref: "#/components/schemas/Artifact" - $ref: "#/components/schemas/BaseResourceList" + WithModelArtifactUpdate: + description: An ML model artifact. + type: object + properties: + modelFormatName: + description: Name of the model format. + type: string + storageKey: + description: Storage secret name. + type: string + storagePath: + description: Path for model in storage provided by `storageKey`. + type: string + modelFormatVersion: + description: Version of the model format. + type: string + serviceAccountName: + description: Name of the service account with storage secret. + type: string ModelArtifactUpdate: description: An ML model artifact. + type: object allOf: - - $ref: "#/components/schemas/BaseArtifactUpdate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithModelArtifactUpdate" + # TODO: WORKAROUND: WithBaseArtifactUpdate got picked up as direct parent - inlining it for now + # - $ref: "#/components/schemas/WithBaseArtifactUpdate" - type: object properties: - modelFormatName: - description: Name of the model format. - type: string - storageKey: - description: Storage secret name. - type: string - storagePath: - description: Path for model in storage provided by `storageKey`. - type: string - modelFormatVersion: - description: Version of the model format. - type: string - serviceAccountName: - description: Name of the service account with storage secret. + uri: + description: |- + The uniform resource identifier of the physical artifact. + May be empty if there is no physical artifact. type: string + state: + $ref: "#/components/schemas/ArtifactState" ModelArtifactCreate: description: An ML model artifact. type: object allOf: - - $ref: "#/components/schemas/BaseArtifactCreate" - - $ref: "#/components/schemas/ModelArtifactUpdate" + - $ref: "#/components/schemas/WithModelArtifactUpdate" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + # TODO: WORKAROUND: WithBaseArtifactUpdate got picked up as direct parent - inlining it for now + # - $ref: "#/components/schemas/WithBaseArtifactUpdate" + - type: object + properties: + uri: + description: |- + The uniform resource identifier of the physical artifact. + May be empty if there is no physical artifact. + type: string + state: + $ref: "#/components/schemas/ArtifactState" Error: description: Error code and message. required: @@ -1343,138 +1362,150 @@ components: model-artifact: "#/components/schemas/ModelArtifact" doc-artifact: "#/components/schemas/DocArtifact" description: A metadata Artifact Entity. - BaseArtifact: - allOf: - - $ref: "#/components/schemas/BaseArtifactCreate" - - $ref: "#/components/schemas/BaseResource" ServingEnvironmentList: description: List of ServingEnvironments. type: object + properties: + items: + description: "" + type: array + items: + $ref: "#/components/schemas/ServingEnvironment" + readOnly: false allOf: - - type: object - properties: - items: - description: "" - type: array - items: - $ref: "#/components/schemas/ServingEnvironment" - readOnly: false - $ref: "#/components/schemas/BaseResourceList" RegisteredModelList: description: List of RegisteredModels. type: object + properties: + items: + description: "" + type: array + items: + $ref: "#/components/schemas/RegisteredModel" + readOnly: false allOf: - - type: object - properties: - items: - description: "" - type: array - items: - $ref: "#/components/schemas/RegisteredModel" - readOnly: false - $ref: "#/components/schemas/BaseResourceList" ServingEnvironment: description: A Model Serving environment for serving `RegisteredModels`. allOf: - - $ref: "#/components/schemas/BaseResource" - - type: object - - $ref: "#/components/schemas/ServingEnvironmentCreate" + - $ref: "#/components/schemas/WithBaseResource" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" ServingEnvironmentUpdate: description: A Model Serving environment for serving `RegisteredModels`. allOf: - - $ref: "#/components/schemas/BaseResourceUpdate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" ServingEnvironmentCreate: description: A Model Serving environment for serving `RegisteredModels`. allOf: - - type: object - - $ref: "#/components/schemas/BaseResourceCreate" - - $ref: "#/components/schemas/ServingEnvironmentUpdate" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" InferenceService: description: >- An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. allOf: - - $ref: "#/components/schemas/BaseResource" - - $ref: "#/components/schemas/InferenceServiceCreate" + - $ref: "#/components/schemas/WithBaseResource" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithInferenceServiceUpdate" + - $ref: "#/components/schemas/WithInferenceServiceCreate" InferenceServiceList: description: List of InferenceServices. type: object + properties: + items: + description: "" + type: array + items: + $ref: "#/components/schemas/InferenceService" + readOnly: false allOf: - - type: object - properties: - items: - description: "" - type: array - items: - $ref: "#/components/schemas/InferenceService" - readOnly: false - $ref: "#/components/schemas/BaseResourceList" ServeModelList: description: List of ServeModel entities. type: object + properties: + items: + description: Array of `ModelArtifact` entities. + type: array + items: + $ref: "#/components/schemas/ServeModel" allOf: - - type: object - properties: - items: - description: Array of `ModelArtifact` entities. - type: array - items: - $ref: "#/components/schemas/ServeModel" - $ref: "#/components/schemas/BaseResourceList" ServeModel: description: An ML model serving action. type: object allOf: - - $ref: "#/components/schemas/BaseExecution" - - $ref: "#/components/schemas/ServeModelCreate" + - $ref: "#/components/schemas/WithBaseExecutionUpdate" + - $ref: "#/components/schemas/WithBaseResource" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithServeModelCreate" + # unlinked in the endpoint but necessary for conversions ServeModelUpdate: description: An ML model serving action. allOf: - - $ref: "#/components/schemas/BaseExecutionUpdate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithBaseExecutionUpdate" + WithServeModelCreate: + description: An ML model serving action. + required: + - modelVersionId + type: object + properties: + modelVersionId: + description: ID of the `ModelVersion` that was served in `InferenceService`. + type: string ServeModelCreate: description: An ML model serving action. allOf: - - $ref: "#/components/schemas/BaseExecutionCreate" - - $ref: "#/components/schemas/ServeModelUpdate" - - required: - - modelVersionId - type: object - properties: - modelVersionId: - description: ID of the `ModelVersion` that was served in `InferenceService`. - type: string + - $ref: "#/components/schemas/WithBaseExecutionUpdate" + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithServeModelCreate" + WithInferenceServiceUpdate: + description: >- + An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. + type: object + properties: + modelVersionId: + description: >- + ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served. + type: string + runtime: + description: Model runtime. + type: string + desiredState: + $ref: "#/components/schemas/InferenceServiceState" InferenceServiceUpdate: description: >- An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. allOf: - - $ref: "#/components/schemas/BaseResourceUpdate" - - type: object - properties: - modelVersionId: - description: >- - ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served. - type: string - runtime: - description: Model runtime. - type: string - desiredState: - $ref: "#/components/schemas/InferenceServiceState" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithInferenceServiceUpdate" + WithInferenceServiceCreate: + description: >- + An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. + required: + - registeredModelId + - servingEnvironmentId + type: object + properties: + registeredModelId: + description: ID of the `RegisteredModel` to serve. + type: string + servingEnvironmentId: + description: ID of the parent `ServingEnvironment` for this `InferenceService` entity. + type: string InferenceServiceCreate: description: >- An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. allOf: - - $ref: "#/components/schemas/BaseResourceCreate" - - $ref: "#/components/schemas/InferenceServiceUpdate" - - required: - - registeredModelId - - servingEnvironmentId - type: object - properties: - registeredModelId: - description: ID of the `RegisteredModel` to serve. - type: string - servingEnvironmentId: - description: ID of the parent `ServingEnvironment` for this `InferenceService` entity. - type: string + - $ref: "#/components/schemas/WithBaseResourceCreate" + - $ref: "#/components/schemas/WithBaseResourceUpdate" + - $ref: "#/components/schemas/WithInferenceServiceUpdate" + - $ref: "#/components/schemas/WithInferenceServiceCreate" responses: NotFound: content: diff --git a/test/python-kiota/.gitignore b/test/python-kiota/.gitignore new file mode 100644 index 00000000..ae14bc7e --- /dev/null +++ b/test/python-kiota/.gitignore @@ -0,0 +1,5 @@ +__pycache__ +.pytest_cache +apisdk/client +kiota_tmp +model-registry.yaml diff --git a/test/python-kiota/Makefile b/test/python-kiota/Makefile new file mode 100644 index 00000000..a74b364e --- /dev/null +++ b/test/python-kiota/Makefile @@ -0,0 +1,37 @@ + +.PHONY: clean +clean: + rm -rf openapi.yaml apisdk/client kiota_tmp .venv dist + +.PHONY: install +install: + poetry install + +.PHONY: test +test: + poetry run pytest -s + +.PHONY: lint-check +lint-check: + poetry run black ./ --check + +.PHONY: lint-apply +lint-apply: + poetry run black ./ + +.PHONY: build +build: install + poetry build + +.PHONY: publish +publish: install + poetry publish --build -u __token__ -p ${PYPI_TOKEN} + +.PHONY: update +update: + poetry add microsoft-kiota-abstractions@latest + poetry add microsoft-kiota-http@latest + poetry add microsoft-kiota-serialization-json@latest + poetry add microsoft-kiota-serialization-text@latest + poetry add microsoft-kiota-serialization-form@latest + poetry add microsoft-kiota-serialization-multipart@latest diff --git a/test/python-kiota/README.md b/test/python-kiota/README.md new file mode 100644 index 00000000..c95af376 --- /dev/null +++ b/test/python-kiota/README.md @@ -0,0 +1,27 @@ +# Model Registry Python SDK + +This is a generated SDK for easily interacting with Registry from a Python program. + +## Kiota library updates + +The Kiota libraries updates should happen when Kiota is upgraded, to get the correct values run: + +``` +kiota info --language python +``` + +## Requirements + +This package is built with [Poetry](https://python-poetry.org/) make sure it's available by following the [installation guide](https://python-poetry.org/docs/#installation). + +## Build + +``` +make install +``` + +## Test + +``` +make test +``` diff --git a/test/python-kiota/apisdk/__init__.py b/test/python-kiota/apisdk/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test/python-kiota/kiota-gen.py b/test/python-kiota/kiota-gen.py new file mode 100644 index 00000000..903da91b --- /dev/null +++ b/test/python-kiota/kiota-gen.py @@ -0,0 +1,93 @@ +import requests +import zipfile +import io +import os +import stat +import sys +import shutil +import platform +from pathlib import Path +import xml.etree.ElementTree as ET + +KIOTA_OS_NAMES = {"Windows": "win", "Darwin": "osx", "Linux": "linux"} +KIOTA_ARCH_NAMES = { + "x86_64": "x64", + "amd64": "x64", + "i386": "x86", + "x86": "x86", + "x86_64": "x64", + "amd64": "x64", + "aarch64": "arm64", + "arm64": "arm64", +} + + +def generate_kiota_client_files(setup_kwargs): + kiota_os_name = KIOTA_OS_NAMES.get(platform.system(), None) + if kiota_os_name is None: + print("Unsupported operating system.") + exit(1) + + machine = platform.machine().lower() + kiota_arch_name = KIOTA_ARCH_NAMES.get(machine, None) + if kiota_arch_name is None: + print("Unsupported architecture.") + exit(1) + + kiota_release_name = f"{kiota_os_name}-{kiota_arch_name}.zip" + # Detecting the Kiota version from a .csproj file so that it can be updated by automatic tool (e.g. Dependabot) + kiota_version = ( + ET.parse(os.path.join(sys.path[0], "kiota-version.csproj")) + .getroot() + .find(".//*[@Include='Microsoft.OpenApi.Kiota.Builder']") + .get("Version") + ) + print(f"Using Kiota version: {kiota_version}") + # Download the Kiota release archive + url = f"https://github.com/microsoft/kiota/releases/download/v{kiota_version}/{kiota_release_name}" + + tmpdir = os.path.join(sys.path[0], "kiota_tmp", kiota_version) + if not os.path.exists(tmpdir): + print(f"Downloading Kiota from URL: {url}") + response = requests.get(url) + zip_archive = zipfile.ZipFile(io.BytesIO(response.content)) + os.makedirs(tmpdir) + zip_archive.extractall(tmpdir) + else: + print( + f"Using kiota already available on path if something goes wrong, please clean the local 'kiota_tmp' folder." + ) + + kiota_bin = os.path.join(tmpdir, "kiota") + st = os.stat(kiota_bin) + os.chmod(kiota_bin, st.st_mode | stat.S_IEXEC) + + openapi_doc = Path(__file__).parent.joinpath("model-registry.yaml") + if not os.path.exists(openapi_doc): + shutil.copyfile( + os.path.join( + sys.path[0], + "..", + "..", + "api", + "openapi", + "model-registry.yaml", + ), + openapi_doc, + ) + + output = Path(__file__).parent.joinpath("apisdk", "client") + + command = f'{kiota_bin} generate --language=python --openapi="{openapi_doc}" --output="{output}" --class-name=RegistryClient --namespace-name=client --clean-output --clear-cache' + print(f"Executing kiota command: {command}") + + os.system(command) + print("Kiota client generation has been successful") + return setup_kwargs + + +if __name__ == "__main__": + if not os.path.exists( + os.path.join(sys.path[0], "apisdk", "client", "kiota-lock.json") + ): + generate_kiota_client_files({}) diff --git a/test/python-kiota/kiota-version.csproj b/test/python-kiota/kiota-version.csproj new file mode 100644 index 00000000..ad4d9978 --- /dev/null +++ b/test/python-kiota/kiota-version.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/test/python-kiota/poetry.lock b/test/python-kiota/poetry.lock new file mode 100644 index 00000000..fe349315 --- /dev/null +++ b/test/python-kiota/poetry.lock @@ -0,0 +1,923 @@ +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. + +[[package]] +name = "anyio" +version = "4.3.0" +description = "High level compatibility layer for multiple asynchronous event loop implementations" +optional = false +python-versions = ">=3.8" +files = [ + {file = "anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8"}, + {file = "anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6"}, +] + +[package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} +idna = ">=2.8" +sniffio = ">=1.1" +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} + +[package.extras] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] + +[[package]] +name = "black" +version = "23.12.1" +description = "The uncompromising code formatter." +optional = false +python-versions = ">=3.8" +files = [ + {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"}, + {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"}, + {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"}, + {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"}, + {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"}, + {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"}, + {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"}, + {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"}, + {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"}, + {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"}, + {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"}, + {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"}, + {file = "black-23.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f"}, + {file = "black-23.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d"}, + {file = "black-23.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a"}, + {file = "black-23.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e"}, + {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"}, + {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"}, + {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"}, + {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"}, + {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"}, + {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"}, +] + +[package.dependencies] +click = ">=8.0.0" +mypy-extensions = ">=0.4.3" +packaging = ">=22.0" +pathspec = ">=0.9.0" +platformdirs = ">=2" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} + +[package.extras] +colorama = ["colorama (>=0.4.3)"] +d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] +jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] +uvloop = ["uvloop (>=0.15.2)"] + +[[package]] +name = "certifi" +version = "2024.2.2" +description = "Python package for providing Mozilla's CA Bundle." +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, + {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, +] + +[[package]] +name = "charset-normalizer" +version = "3.3.2" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, + {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, +] + +[[package]] +name = "click" +version = "8.1.7" +description = "Composable command line interface toolkit" +optional = false +python-versions = ">=3.7" +files = [ + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "deprecated" +version = "1.2.14" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Deprecated-1.2.14-py2.py3-none-any.whl", hash = "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c"}, + {file = "Deprecated-1.2.14.tar.gz", hash = "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3"}, +] + +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] + +[[package]] +name = "exceptiongroup" +version = "1.2.0" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, + {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, +] + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "h11" +version = "0.14.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +optional = false +python-versions = ">=3.7" +files = [ + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, +] + +[[package]] +name = "h2" +version = "4.1.0" +description = "HTTP/2 State-Machine based protocol implementation" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "h2-4.1.0-py3-none-any.whl", hash = "sha256:03a46bcf682256c95b5fd9e9a99c1323584c3eec6440d379b9903d709476bc6d"}, + {file = "h2-4.1.0.tar.gz", hash = "sha256:a83aca08fbe7aacb79fec788c9c0bac936343560ed9ec18b82a13a12c28d2abb"}, +] + +[package.dependencies] +hpack = ">=4.0,<5" +hyperframe = ">=6.0,<7" + +[[package]] +name = "hpack" +version = "4.0.0" +description = "Pure-Python HPACK header compression" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "hpack-4.0.0-py3-none-any.whl", hash = "sha256:84a076fad3dc9a9f8063ccb8041ef100867b1878b25ef0ee63847a5d53818a6c"}, + {file = "hpack-4.0.0.tar.gz", hash = "sha256:fc41de0c63e687ebffde81187a948221294896f6bdc0ae2312708df339430095"}, +] + +[[package]] +name = "httpcore" +version = "1.0.4" +description = "A minimal low-level HTTP client." +optional = false +python-versions = ">=3.8" +files = [ + {file = "httpcore-1.0.4-py3-none-any.whl", hash = "sha256:ac418c1db41bade2ad53ae2f3834a3a0f5ae76b56cf5aa497d2d033384fc7d73"}, + {file = "httpcore-1.0.4.tar.gz", hash = "sha256:cb2839ccfcba0d2d3c1131d3c3e26dfc327326fbe7a5dc0dbfe9f6c9151bb022"}, +] + +[package.dependencies] +certifi = "*" +h11 = ">=0.13,<0.15" + +[package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<0.25.0)"] + +[[package]] +name = "httpx" +version = "0.27.0" +description = "The next generation HTTP client." +optional = false +python-versions = ">=3.8" +files = [ + {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, + {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, +] + +[package.dependencies] +anyio = "*" +certifi = "*" +h2 = {version = ">=3,<5", optional = true, markers = "extra == \"http2\""} +httpcore = "==1.*" +idna = "*" +sniffio = "*" + +[package.extras] +brotli = ["brotli", "brotlicffi"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] + +[[package]] +name = "hyperframe" +version = "6.0.1" +description = "HTTP/2 framing layer for Python" +optional = false +python-versions = ">=3.6.1" +files = [ + {file = "hyperframe-6.0.1-py3-none-any.whl", hash = "sha256:0ec6bafd80d8ad2195c4f03aacba3a8265e57bc4cff261e802bf39970ed02a15"}, + {file = "hyperframe-6.0.1.tar.gz", hash = "sha256:ae510046231dc8e9ecb1a6586f63d2347bf4c8905914aa84ba585ae85f28a914"}, +] + +[[package]] +name = "idna" +version = "3.6" +description = "Internationalized Domain Names in Applications (IDNA)" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, + {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, +] + +[[package]] +name = "importlib-metadata" +version = "6.11.0" +description = "Read metadata from Python packages" +optional = false +python-versions = ">=3.8" +files = [ + {file = "importlib_metadata-6.11.0-py3-none-any.whl", hash = "sha256:f0afba6205ad8f8947c7d338b5342d5db2afbfd82f9cbef7879a9539cc12eb9b"}, + {file = "importlib_metadata-6.11.0.tar.gz", hash = "sha256:1231cf92d825c9e03cfc4da076a16de6422c863558229ea0b22b675657463443"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "microsoft-kiota-abstractions" +version = "1.3.2" +description = "Core abstractions for kiota generated libraries in Python" +optional = false +python-versions = "*" +files = [ + {file = "microsoft_kiota_abstractions-1.3.2-py2.py3-none-any.whl", hash = "sha256:ec4335df425874b1c0171a97c4b5ccdc4a9d076e1ecd3a5c2582af1cacc25016"}, + {file = "microsoft_kiota_abstractions-1.3.2.tar.gz", hash = "sha256:acac0b34b443d3fc10a3a86dd996cdf92248080553a3768a77c23350541f1aa2"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.19.0" +opentelemetry-sdk = ">=1.19.0" +std-uritemplate = ">=0.0.38" + +[[package]] +name = "microsoft-kiota-http" +version = "1.3.1" +description = "Kiota http request adapter implementation for httpx library" +optional = false +python-versions = "*" +files = [ + {file = "microsoft_kiota_http-1.3.1-py2.py3-none-any.whl", hash = "sha256:d62972c6ed4c785f9808a15479a7421abb38a9519b39e6933e5d05555b9fb427"}, + {file = "microsoft_kiota_http-1.3.1.tar.gz", hash = "sha256:09d85310379f88af0a0967925d1fcbe82f2520a9fe6fa1fd50e79af813bc451d"}, +] + +[package.dependencies] +httpx = {version = ">=0.23.0", extras = ["http2"]} +microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" +opentelemetry-api = ">=1.20.0" +opentelemetry-sdk = ">=1.20.0" + +[[package]] +name = "microsoft-kiota-serialization-form" +version = "0.1.0" +description = "Implementation of Kiota Serialization Interfaces for URI-Form encoded serialization" +optional = false +python-versions = "*" +files = [ + {file = "microsoft_kiota_serialization_form-0.1.0-py2.py3-none-any.whl", hash = "sha256:5bc76fb2fc67d7c1f878f876d252ea814e4fc38df505099b9b86de52d974380a"}, + {file = "microsoft_kiota_serialization_form-0.1.0.tar.gz", hash = "sha256:663ece0cb1a41fe9ddfc9195aa3f15f219e14d2a1ee51e98c53ad8d795b2785d"}, +] + +[package.dependencies] +microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" +pendulum = ">=3.0.0" + +[[package]] +name = "microsoft-kiota-serialization-json" +version = "1.1.0" +description = "Implementation of Kiota Serialization interfaces for JSON" +optional = false +python-versions = "*" +files = [ + {file = "microsoft_kiota_serialization_json-1.1.0-py2.py3-none-any.whl", hash = "sha256:a32c73dd92ef2677dbf1deca2fb44b5111c0ef572b15c47205bff521800cd750"}, + {file = "microsoft_kiota_serialization_json-1.1.0.tar.gz", hash = "sha256:72bf65d81c0356ad87c229694733f4eb558628a13c5ee8dd274980c4b2d9b64b"}, +] + +[package.dependencies] +microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" +pendulum = ">=3.0.0b1" + +[[package]] +name = "microsoft-kiota-serialization-multipart" +version = "0.1.0" +description = "Implementation of Kiota Serialization Interfaces for Multipart serialization" +optional = false +python-versions = "*" +files = [ + {file = "microsoft_kiota_serialization_multipart-0.1.0-py2.py3-none-any.whl", hash = "sha256:ef183902e77807806b8a181cdde53ba5bc04c6c9bdb2f7d80f8bad5d720e0015"}, + {file = "microsoft_kiota_serialization_multipart-0.1.0.tar.gz", hash = "sha256:14e89e92582e6630ddbc70ac67b70bf189dacbfc41a96d3e1d10339e86c8dde5"}, +] + +[package.dependencies] +microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" + +[[package]] +name = "microsoft-kiota-serialization-text" +version = "1.0.0" +description = "Implementation of Kiota Serialization interfaces for text/plain" +optional = false +python-versions = "*" +files = [ + {file = "microsoft_kiota_serialization_text-1.0.0-py2.py3-none-any.whl", hash = "sha256:1d3789e012b603e059a36cc675d1fd08cb81e0dde423d970c0af2eabce9c0d43"}, + {file = "microsoft_kiota_serialization_text-1.0.0.tar.gz", hash = "sha256:c3dd3f409b1c4f4963bd1e41d51b65f7e53e852130bb441d79b77dad88ee76ed"}, +] + +[package.dependencies] +microsoft-kiota_abstractions = ">=1.0.0,<2.0.0" +python-dateutil = ">=2.8.2" + +[[package]] +name = "mypy-extensions" +version = "1.0.0" +description = "Type system extensions for programs checked with the mypy type checker." +optional = false +python-versions = ">=3.5" +files = [ + {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, + {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, +] + +[[package]] +name = "opentelemetry-api" +version = "1.23.0" +description = "OpenTelemetry Python API" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_api-1.23.0-py3-none-any.whl", hash = "sha256:cc03ea4025353048aadb9c64919099663664672ea1c6be6ddd8fee8e4cd5e774"}, + {file = "opentelemetry_api-1.23.0.tar.gz", hash = "sha256:14a766548c8dd2eb4dfc349739eb4c3893712a0daa996e5dbf945f9da665da9d"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +importlib-metadata = ">=6.0,<7.0" + +[[package]] +name = "opentelemetry-sdk" +version = "1.23.0" +description = "OpenTelemetry Python SDK" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_sdk-1.23.0-py3-none-any.whl", hash = "sha256:a93c96990ac0f07c6d679e2f1015864ff7a4f5587122dd5af968034436efb1fd"}, + {file = "opentelemetry_sdk-1.23.0.tar.gz", hash = "sha256:9ddf60195837b59e72fd2033d6a47e2b59a0f74f0ec37d89387d89e3da8cab7f"}, +] + +[package.dependencies] +opentelemetry-api = "1.23.0" +opentelemetry-semantic-conventions = "0.44b0" +typing-extensions = ">=3.7.4" + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.44b0" +description = "OpenTelemetry Semantic Conventions" +optional = false +python-versions = ">=3.8" +files = [ + {file = "opentelemetry_semantic_conventions-0.44b0-py3-none-any.whl", hash = "sha256:7c434546c9cbd797ab980cc88bf9ff3f4a5a28f941117cad21694e43d5d92019"}, + {file = "opentelemetry_semantic_conventions-0.44b0.tar.gz", hash = "sha256:2e997cb28cd4ca81a25a9a43365f593d0c2b76be0685015349a89abdf1aa4ffa"}, +] + +[[package]] +name = "packaging" +version = "24.0" +description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, + {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, +] + +[[package]] +name = "pathspec" +version = "0.12.1" +description = "Utility library for gitignore style pattern matching of file paths." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] + +[[package]] +name = "pendulum" +version = "3.0.0" +description = "Python datetimes made easy" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pendulum-3.0.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2cf9e53ef11668e07f73190c805dbdf07a1939c3298b78d5a9203a86775d1bfd"}, + {file = "pendulum-3.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fb551b9b5e6059377889d2d878d940fd0bbb80ae4810543db18e6f77b02c5ef6"}, + {file = "pendulum-3.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c58227ac260d5b01fc1025176d7b31858c9f62595737f350d22124a9a3ad82d"}, + {file = "pendulum-3.0.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:60fb6f415fea93a11c52578eaa10594568a6716602be8430b167eb0d730f3332"}, + {file = "pendulum-3.0.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b69f6b4dbcb86f2c2fe696ba991e67347bcf87fe601362a1aba6431454b46bde"}, + {file = "pendulum-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:138afa9c373ee450ede206db5a5e9004fd3011b3c6bbe1e57015395cd076a09f"}, + {file = "pendulum-3.0.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:83d9031f39c6da9677164241fd0d37fbfc9dc8ade7043b5d6d62f56e81af8ad2"}, + {file = "pendulum-3.0.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0c2308af4033fa534f089595bcd40a95a39988ce4059ccd3dc6acb9ef14ca44a"}, + {file = "pendulum-3.0.0-cp310-none-win_amd64.whl", hash = "sha256:9a59637cdb8462bdf2dbcb9d389518c0263799189d773ad5c11db6b13064fa79"}, + {file = "pendulum-3.0.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:3725245c0352c95d6ca297193192020d1b0c0f83d5ee6bb09964edc2b5a2d508"}, + {file = "pendulum-3.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6c035f03a3e565ed132927e2c1b691de0dbf4eb53b02a5a3c5a97e1a64e17bec"}, + {file = "pendulum-3.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:597e66e63cbd68dd6d58ac46cb7a92363d2088d37ccde2dae4332ef23e95cd00"}, + {file = "pendulum-3.0.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99a0f8172e19f3f0c0e4ace0ad1595134d5243cf75985dc2233e8f9e8de263ca"}, + {file = "pendulum-3.0.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:77d8839e20f54706aed425bec82a83b4aec74db07f26acd039905d1237a5e1d4"}, + {file = "pendulum-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afde30e8146292b059020fbc8b6f8fd4a60ae7c5e6f0afef937bbb24880bdf01"}, + {file = "pendulum-3.0.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:660434a6fcf6303c4efd36713ca9212c753140107ee169a3fc6c49c4711c2a05"}, + {file = "pendulum-3.0.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dee9e5a48c6999dc1106eb7eea3e3a50e98a50651b72c08a87ee2154e544b33e"}, + {file = "pendulum-3.0.0-cp311-none-win_amd64.whl", hash = "sha256:d4cdecde90aec2d67cebe4042fd2a87a4441cc02152ed7ed8fb3ebb110b94ec4"}, + {file = "pendulum-3.0.0-cp311-none-win_arm64.whl", hash = "sha256:773c3bc4ddda2dda9f1b9d51fe06762f9200f3293d75c4660c19b2614b991d83"}, + {file = "pendulum-3.0.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:409e64e41418c49f973d43a28afe5df1df4f1dd87c41c7c90f1a63f61ae0f1f7"}, + {file = "pendulum-3.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a38ad2121c5ec7c4c190c7334e789c3b4624798859156b138fcc4d92295835dc"}, + {file = "pendulum-3.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fde4d0b2024b9785f66b7f30ed59281bd60d63d9213cda0eb0910ead777f6d37"}, + {file = "pendulum-3.0.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4b2c5675769fb6d4c11238132962939b960fcb365436b6d623c5864287faa319"}, + {file = "pendulum-3.0.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8af95e03e066826f0f4c65811cbee1b3123d4a45a1c3a2b4fc23c4b0dff893b5"}, + {file = "pendulum-3.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2165a8f33cb15e06c67070b8afc87a62b85c5a273e3aaa6bc9d15c93a4920d6f"}, + {file = "pendulum-3.0.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ad5e65b874b5e56bd942546ea7ba9dd1d6a25121db1c517700f1c9de91b28518"}, + {file = "pendulum-3.0.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:17fe4b2c844bbf5f0ece69cfd959fa02957c61317b2161763950d88fed8e13b9"}, + {file = "pendulum-3.0.0-cp312-none-win_amd64.whl", hash = "sha256:78f8f4e7efe5066aca24a7a57511b9c2119f5c2b5eb81c46ff9222ce11e0a7a5"}, + {file = "pendulum-3.0.0-cp312-none-win_arm64.whl", hash = "sha256:28f49d8d1e32aae9c284a90b6bb3873eee15ec6e1d9042edd611b22a94ac462f"}, + {file = "pendulum-3.0.0-cp37-cp37m-macosx_10_12_x86_64.whl", hash = "sha256:d4e2512f4e1a4670284a153b214db9719eb5d14ac55ada5b76cbdb8c5c00399d"}, + {file = "pendulum-3.0.0-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:3d897eb50883cc58d9b92f6405245f84b9286cd2de6e8694cb9ea5cb15195a32"}, + {file = "pendulum-3.0.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e169cc2ca419517f397811bbe4589cf3cd13fca6dc38bb352ba15ea90739ebb"}, + {file = "pendulum-3.0.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f17c3084a4524ebefd9255513692f7e7360e23c8853dc6f10c64cc184e1217ab"}, + {file = "pendulum-3.0.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:826d6e258052715f64d05ae0fc9040c0151e6a87aae7c109ba9a0ed930ce4000"}, + {file = "pendulum-3.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2aae97087872ef152a0c40e06100b3665d8cb86b59bc8471ca7c26132fccd0f"}, + {file = "pendulum-3.0.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ac65eeec2250d03106b5e81284ad47f0d417ca299a45e89ccc69e36130ca8bc7"}, + {file = "pendulum-3.0.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a5346d08f3f4a6e9e672187faa179c7bf9227897081d7121866358af369f44f9"}, + {file = "pendulum-3.0.0-cp37-none-win_amd64.whl", hash = "sha256:235d64e87946d8f95c796af34818c76e0f88c94d624c268693c85b723b698aa9"}, + {file = "pendulum-3.0.0-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:6a881d9c2a7f85bc9adafcfe671df5207f51f5715ae61f5d838b77a1356e8b7b"}, + {file = "pendulum-3.0.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d7762d2076b9b1cb718a6631ad6c16c23fc3fac76cbb8c454e81e80be98daa34"}, + {file = "pendulum-3.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e8e36a8130819d97a479a0e7bf379b66b3b1b520e5dc46bd7eb14634338df8c"}, + {file = "pendulum-3.0.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7dc843253ac373358ffc0711960e2dd5b94ab67530a3e204d85c6e8cb2c5fa10"}, + {file = "pendulum-3.0.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0a78ad3635d609ceb1e97d6aedef6a6a6f93433ddb2312888e668365908c7120"}, + {file = "pendulum-3.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b30a137e9e0d1f751e60e67d11fc67781a572db76b2296f7b4d44554761049d6"}, + {file = "pendulum-3.0.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c95984037987f4a457bb760455d9ca80467be792236b69d0084f228a8ada0162"}, + {file = "pendulum-3.0.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d29c6e578fe0f893766c0d286adbf0b3c726a4e2341eba0917ec79c50274ec16"}, + {file = "pendulum-3.0.0-cp38-none-win_amd64.whl", hash = "sha256:deaba8e16dbfcb3d7a6b5fabdd5a38b7c982809567479987b9c89572df62e027"}, + {file = "pendulum-3.0.0-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b11aceea5b20b4b5382962b321dbc354af0defe35daa84e9ff3aae3c230df694"}, + {file = "pendulum-3.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a90d4d504e82ad236afac9adca4d6a19e4865f717034fc69bafb112c320dcc8f"}, + {file = "pendulum-3.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:825799c6b66e3734227756fa746cc34b3549c48693325b8b9f823cb7d21b19ac"}, + {file = "pendulum-3.0.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad769e98dc07972e24afe0cff8d365cb6f0ebc7e65620aa1976fcfbcadc4c6f3"}, + {file = "pendulum-3.0.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a6fc26907eb5fb8cc6188cc620bc2075a6c534d981a2f045daa5f79dfe50d512"}, + {file = "pendulum-3.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c717eab1b6d898c00a3e0fa7781d615b5c5136bbd40abe82be100bb06df7a56"}, + {file = "pendulum-3.0.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3ddd1d66d1a714ce43acfe337190be055cdc221d911fc886d5a3aae28e14b76d"}, + {file = "pendulum-3.0.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:822172853d7a9cf6da95d7b66a16c7160cb99ae6df55d44373888181d7a06edc"}, + {file = "pendulum-3.0.0-cp39-none-win_amd64.whl", hash = "sha256:840de1b49cf1ec54c225a2a6f4f0784d50bd47f68e41dc005b7f67c7d5b5f3ae"}, + {file = "pendulum-3.0.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3b1f74d1e6ffe5d01d6023870e2ce5c2191486928823196f8575dcc786e107b1"}, + {file = "pendulum-3.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:729e9f93756a2cdfa77d0fc82068346e9731c7e884097160603872686e570f07"}, + {file = "pendulum-3.0.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e586acc0b450cd21cbf0db6bae386237011b75260a3adceddc4be15334689a9a"}, + {file = "pendulum-3.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22e7944ffc1f0099a79ff468ee9630c73f8c7835cd76fdb57ef7320e6a409df4"}, + {file = "pendulum-3.0.0-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:fa30af36bd8e50686846bdace37cf6707bdd044e5cb6e1109acbad3277232e04"}, + {file = "pendulum-3.0.0-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:440215347b11914ae707981b9a57ab9c7b6983ab0babde07063c6ee75c0dc6e7"}, + {file = "pendulum-3.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:314c4038dc5e6a52991570f50edb2f08c339debdf8cea68ac355b32c4174e820"}, + {file = "pendulum-3.0.0-pp37-pypy37_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5acb1d386337415f74f4d1955c4ce8d0201978c162927d07df8eb0692b2d8533"}, + {file = "pendulum-3.0.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a789e12fbdefaffb7b8ac67f9d8f22ba17a3050ceaaa635cd1cc4645773a4b1e"}, + {file = "pendulum-3.0.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:860aa9b8a888e5913bd70d819306749e5eb488e6b99cd6c47beb701b22bdecf5"}, + {file = "pendulum-3.0.0-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:5ebc65ea033ef0281368217fbf59f5cb05b338ac4dd23d60959c7afcd79a60a0"}, + {file = "pendulum-3.0.0-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:d9fef18ab0386ef6a9ac7bad7e43ded42c83ff7ad412f950633854f90d59afa8"}, + {file = "pendulum-3.0.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:1c134ba2f0571d0b68b83f6972e2307a55a5a849e7dac8505c715c531d2a8795"}, + {file = "pendulum-3.0.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:385680812e7e18af200bb9b4a49777418c32422d05ad5a8eb85144c4a285907b"}, + {file = "pendulum-3.0.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9eec91cd87c59fb32ec49eb722f375bd58f4be790cae11c1b70fac3ee4f00da0"}, + {file = "pendulum-3.0.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4386bffeca23c4b69ad50a36211f75b35a4deb6210bdca112ac3043deb7e494a"}, + {file = "pendulum-3.0.0-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:dfbcf1661d7146d7698da4b86e7f04814221081e9fe154183e34f4c5f5fa3bf8"}, + {file = "pendulum-3.0.0-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:04a1094a5aa1daa34a6b57c865b25f691848c61583fb22722a4df5699f6bf74c"}, + {file = "pendulum-3.0.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:5b0ec85b9045bd49dd3a3493a5e7ddfd31c36a2a60da387c419fa04abcaecb23"}, + {file = "pendulum-3.0.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:0a15b90129765b705eb2039062a6daf4d22c4e28d1a54fa260892e8c3ae6e157"}, + {file = "pendulum-3.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:bb8f6d7acd67a67d6fedd361ad2958ff0539445ef51cbe8cd288db4306503cd0"}, + {file = "pendulum-3.0.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fd69b15374bef7e4b4440612915315cc42e8575fcda2a3d7586a0d88192d0c88"}, + {file = "pendulum-3.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc00f8110db6898360c53c812872662e077eaf9c75515d53ecc65d886eec209a"}, + {file = "pendulum-3.0.0-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:83a44e8b40655d0ba565a5c3d1365d27e3e6778ae2a05b69124db9e471255c4a"}, + {file = "pendulum-3.0.0-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:1a3604e9fbc06b788041b2a8b78f75c243021e0f512447806a6d37ee5214905d"}, + {file = "pendulum-3.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:92c307ae7accebd06cbae4729f0ba9fa724df5f7d91a0964b1b972a22baa482b"}, + {file = "pendulum-3.0.0.tar.gz", hash = "sha256:5d034998dea404ec31fae27af6b22cff1708f830a1ed7353be4d1019bb9f584e"}, +] + +[package.dependencies] +python-dateutil = ">=2.6" +tzdata = ">=2020.1" + +[package.extras] +test = ["time-machine (>=2.6.0)"] + +[[package]] +name = "platformdirs" +version = "4.2.0" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +optional = false +python-versions = ">=3.8" +files = [ + {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, + {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, +] + +[package.extras] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] + +[[package]] +name = "pluggy" +version = "1.4.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "pytest" +version = "7.4.4" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, + {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "pytest-asyncio" +version = "0.21.1" +description = "Pytest support for asyncio" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-asyncio-0.21.1.tar.gz", hash = "sha256:40a7eae6dded22c7b604986855ea48400ab15b069ae38116e8c01238e9eeb64d"}, + {file = "pytest_asyncio-0.21.1-py3-none-any.whl", hash = "sha256:8666c1c8ac02631d7c51ba282e0c69a8a452b211ffedf2599099845da5c5c37b"}, +] + +[package.dependencies] +pytest = ">=7.0.0" + +[package.extras] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy (>=0.931)", "pytest-trio (>=0.7.0)"] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +description = "Extensions to the standard Python datetime module" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, + {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, +] + +[package.dependencies] +six = ">=1.5" + +[[package]] +name = "requests" +version = "2.31.0" +description = "Python HTTP for Humans." +optional = false +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "sniffio" +version = "1.3.1" +description = "Sniff out which async library your code is running under" +optional = false +python-versions = ">=3.7" +files = [ + {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, + {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, +] + +[[package]] +name = "std-uritemplate" +version = "0.0.55" +description = "std-uritemplate implementation for Python" +optional = false +python-versions = ">=3.8,<4.0" +files = [ + {file = "std_uritemplate-0.0.55-py3-none-any.whl", hash = "sha256:4c5e3c068db007697c11e6047d16c9b64f07e8259ffa4dd4d9248ed8491ad430"}, + {file = "std_uritemplate-0.0.55.tar.gz", hash = "sha256:9073f56a77e44d0583fb6645c37e4a640a34f22a255d00e3793cd3f30da58a68"}, +] + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + +[[package]] +name = "typing-extensions" +version = "4.10.0" +description = "Backported and Experimental Type Hints for Python 3.8+" +optional = false +python-versions = ">=3.8" +files = [ + {file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"}, + {file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"}, +] + +[[package]] +name = "tzdata" +version = "2024.1" +description = "Provider of IANA time zone data" +optional = false +python-versions = ">=2" +files = [ + {file = "tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"}, + {file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"}, +] + +[[package]] +name = "urllib3" +version = "2.2.1" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.8" +files = [ + {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, + {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "wrapt" +version = "1.16.0" +description = "Module for decorators, wrappers and monkey patching." +optional = false +python-versions = ">=3.6" +files = [ + {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, + {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487"}, + {file = "wrapt-1.16.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0"}, + {file = "wrapt-1.16.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136"}, + {file = "wrapt-1.16.0-cp310-cp310-win32.whl", hash = "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d"}, + {file = "wrapt-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09"}, + {file = "wrapt-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060"}, + {file = "wrapt-1.16.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956"}, + {file = "wrapt-1.16.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d"}, + {file = "wrapt-1.16.0-cp311-cp311-win32.whl", hash = "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362"}, + {file = "wrapt-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b"}, + {file = "wrapt-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809"}, + {file = "wrapt-1.16.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9"}, + {file = "wrapt-1.16.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c"}, + {file = "wrapt-1.16.0-cp312-cp312-win32.whl", hash = "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc"}, + {file = "wrapt-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8"}, + {file = "wrapt-1.16.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c"}, + {file = "wrapt-1.16.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e"}, + {file = "wrapt-1.16.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465"}, + {file = "wrapt-1.16.0-cp36-cp36m-win32.whl", hash = "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e"}, + {file = "wrapt-1.16.0-cp36-cp36m-win_amd64.whl", hash = "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966"}, + {file = "wrapt-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5"}, + {file = "wrapt-1.16.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f"}, + {file = "wrapt-1.16.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win32.whl", hash = "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c"}, + {file = "wrapt-1.16.0-cp37-cp37m-win_amd64.whl", hash = "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0"}, + {file = "wrapt-1.16.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e"}, + {file = "wrapt-1.16.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca"}, + {file = "wrapt-1.16.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6"}, + {file = "wrapt-1.16.0-cp38-cp38-win32.whl", hash = "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b"}, + {file = "wrapt-1.16.0-cp38-cp38-win_amd64.whl", hash = "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2"}, + {file = "wrapt-1.16.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c"}, + {file = "wrapt-1.16.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f"}, + {file = "wrapt-1.16.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537"}, + {file = "wrapt-1.16.0-cp39-cp39-win32.whl", hash = "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3"}, + {file = "wrapt-1.16.0-cp39-cp39-win_amd64.whl", hash = "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35"}, + {file = "wrapt-1.16.0-py3-none-any.whl", hash = "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1"}, + {file = "wrapt-1.16.0.tar.gz", hash = "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d"}, +] + +[[package]] +name = "zipp" +version = "3.18.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b"}, + {file = "zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] + +[metadata] +lock-version = "2.0" +python-versions = "^3.9" +content-hash = "c9d924333cf954b634a7f322e46e58bd672606cf7b4879322070d74ea6784bab" diff --git a/test/python-kiota/pyproject.toml b/test/python-kiota/pyproject.toml new file mode 100644 index 00000000..5b57b0cd --- /dev/null +++ b/test/python-kiota/pyproject.toml @@ -0,0 +1,51 @@ +[tool.poetry] +name = "modelregistrysdk" +version = "1.0.0" +description = "" +authors = ["Andrea Peruffo "] +readme = "README.md" +packages = [{include = "apisdk"}] +include = [ + { path = "openapi.yaml", format=["sdist", "wheel"] }, + { path = "apisdk/client/**/*", format=["sdist", "wheel"] }, +] +exclude = [ + { path = "apisdk/__pycache__", format=["sdist", "wheel"] }, +] +license = "Apache 2.0" +homepage = "https://github.com/kubeflow/model-registry" +repository = "https://github.com/kubeflow/model-registry" +keywords = ["model", "registry"] + +[tool.poetry.dependencies] +python = "^3.9" +microsoft-kiota-abstractions = "^1.3.2" +microsoft-kiota-http = "^1.3.1" +microsoft-kiota-serialization-json = "^1.1.0" +microsoft-kiota-serialization-text = "^1.0.0" +microsoft-kiota-serialization-form = "^0.1.0" +microsoft-kiota-serialization-multipart = "^0.1.0" + +[tool.poetry.group.test.dependencies] +pytest = "^7.3.1" +pytest-asyncio = "^0.21.0" +requests = "2.31.0" + + +[tool.poetry.group.dev.dependencies] +black = "^23.3.0" + +[build-system] +requires = ["poetry-core", "requests", "shutils"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry.build] +generate-setup-file = false +script = "kiota-gen.py" + +[tool.pytest.ini_options] +pythonpath = [ "apisdk" ] +asyncio_mode = "auto" + +[tool.black] +extend-exclude = 'client' diff --git a/test/python-kiota/tests/basic_test.py b/test/python-kiota/tests/basic_test.py new file mode 100644 index 00000000..a7075eda --- /dev/null +++ b/test/python-kiota/tests/basic_test.py @@ -0,0 +1,103 @@ +import asyncio +from dataclasses import dataclass +from typing import Optional +from httpx import QueryParams +import pytest +import subprocess +import time +import os +import sys +import requests +import json +from kiota_abstractions.headers_collection import HeadersCollection +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.authentication.anonymous_authentication_provider import ( + AnonymousAuthenticationProvider, +) +from kiota_http.httpx_request_adapter import HttpxRequestAdapter +from apisdk.client.registry_client import RegistryClient +from apisdk.client.models.registered_model_create import RegisteredModelCreate +from apisdk.client.models.registered_model_state import RegisteredModelState +from apisdk.client.api.model_registry.v1alpha3.registered_model.registered_model_request_builder import Registered_modelRequestBuilder +# from apisdk.client.models.model_artifact_create import ModelArtifactCreate +# from apisdk.client.api.model_registry.v1alpha3.model_artifact.model_artifact_request_builder import Model_artifactRequestBuilder + + +REGISTRY_HOST = "localhost" +REGISTRY_PORT = 8080 +REGISTRY_URL = f"http://{REGISTRY_HOST}:{REGISTRY_PORT}" +MAX_POLL_TIME = 1200 # the first build is extremely slow +POLL_INTERVAL = 1 +DOCKER = os.getenv("DOCKER", "docker") +start_time = time.time() + + +def poll_for_ready(): + while True: + elapsed_time = time.time() - start_time + if elapsed_time >= MAX_POLL_TIME: + print("Polling timed out.") + break + + print("Attempt to connect") + try: + response = requests.get(REGISTRY_URL) + if response.status_code == 404: + print("Server is up!") + break + except requests.exceptions.ConnectionError: + pass + + # Wait for the specified poll interval before trying again + time.sleep(POLL_INTERVAL) + + +@pytest.fixture(scope="session", autouse=True) +def registry_server(request): + root_folder = os.path.join(sys.path[0], "..", "..", "..") + print(f" Starting Docker Compose in folder {root_folder}") + subprocess.call(f"{DOCKER} compose -f docker-compose-local.yaml build", shell=True, cwd=root_folder) + p = subprocess.Popen(f"{DOCKER} compose -f docker-compose-local.yaml up", shell=True, cwd=root_folder) + request.addfinalizer(p.kill) + request.addfinalizer(cleanup) + poll_for_ready() + +def cleanup(): + root_folder = os.path.join(sys.path[0], "..", "..", "..") + print(f" Closing Docker Compose in folder {root_folder}") + subprocess.Popen(f"{DOCKER} compose -f docker-compose-local.yaml down", shell=False, cwd=root_folder) + +# workaround: https://stackoverflow.com/a/72104554 +@pytest.fixture(scope="session", autouse=True) +def event_loop(): + try: + loop = asyncio.get_running_loop() + except RuntimeError: + loop = asyncio.new_event_loop() + yield loop + loop.close() + +# registered Model +# registered version +# model artifact + +@pytest.mark.asyncio +async def test_registered_model_create_and_retrieve(): + auth_provider = AnonymousAuthenticationProvider() + request_adapter = HttpxRequestAdapter(auth_provider) + request_adapter.base_url = REGISTRY_URL + client = RegistryClient(request_adapter) + + payload = RegisteredModelCreate() + payload.name = "FOO" + payload.description = "a foo" + + # TODO: doesn't work it infer type_id = 10 for some reasons + create_registered_model = await client.api.model_registry.v1alpha3.registered_models.post(payload) + assert create_registered_model is not None + + query_params = Registered_modelRequestBuilder.Registered_modelRequestBuilderGetQueryParameters( + name= create_registered_model.name + ) + return_model_artifact = await client.api.model_registry.v1alpha3.registered_model.get(RequestConfiguration(query_params=query_params)) + print(return_model_artifact) From d3194ace76d0a3acc36c673eba2897b2aac790c1 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Wed, 27 Mar 2024 11:20:54 +0000 Subject: [PATCH 3/6] start to test the Kiota generated client --- .../generated/mlmd_openapi_converter.gen.go | 112 ++--- .../generated/openapi_converter.gen.go | 204 ++++----- internal/server/openapi/type_asserts.go | 323 +++++++------ pkg/openapi/.openapi-generator/FILES | 20 +- pkg/openapi/model_artifact_list.go | 74 +-- pkg/openapi/model_base_artifact.go | 424 ------------------ pkg/openapi/model_base_artifact_create.go | 313 ------------- pkg/openapi/model_base_artifact_update.go | 276 ------------ pkg/openapi/model_base_execution.go | 387 ---------------- pkg/openapi/model_base_execution_create.go | 276 ------------ pkg/openapi/model_base_execution_update.go | 239 ---------- pkg/openapi/model_base_resource.go | 347 -------------- pkg/openapi/model_base_resource_create.go | 236 ---------- pkg/openapi/model_doc_artifact.go | 272 +++++------ pkg/openapi/model_inference_service.go | 212 ++++----- pkg/openapi/model_inference_service_create.go | 74 +-- pkg/openapi/model_inference_service_list.go | 74 +-- pkg/openapi/model_model_artifact.go | 272 +++++------ pkg/openapi/model_model_artifact_create.go | 346 +++++++------- pkg/openapi/model_model_artifact_list.go | 74 +-- pkg/openapi/model_model_artifact_update.go | 146 +++--- pkg/openapi/model_model_version.go | 274 +++++------ pkg/openapi/model_model_version_create.go | 78 ++-- pkg/openapi/model_model_version_list.go | 74 +-- pkg/openapi/model_registered_model.go | 216 ++++----- pkg/openapi/model_registered_model_create.go | 78 ++-- pkg/openapi/model_registered_model_list.go | 74 +-- pkg/openapi/model_serve_model.go | 212 ++++----- pkg/openapi/model_serve_model_create.go | 74 +-- pkg/openapi/model_serve_model_list.go | 74 +-- pkg/openapi/model_serve_model_update.go | 74 +-- pkg/openapi/model_serving_environment.go | 212 ++++----- .../model_serving_environment_create.go | 74 +-- pkg/openapi/model_serving_environment_list.go | 74 +-- .../model_with_base_artifact_update.go | 165 +++++++ .../model_with_base_execution_update.go | 128 ++++++ pkg/openapi/model_with_base_resource.go | 199 ++++++++ .../model_with_base_resource_create.go | 125 ++++++ ....go => model_with_base_resource_update.go} | 68 +-- .../model_with_inference_service_create.go | 144 ++++++ .../model_with_inference_service_update.go | 202 +++++++++ .../model_with_model_artifact_update.go | 273 +++++++++++ .../model_with_model_version_update.go | 165 +++++++ .../model_with_registered_model_update.go | 128 ++++++ pkg/openapi/model_with_serve_model_create.go | 116 +++++ test/python-kiota/tests/basic_test.py | 35 +- 46 files changed, 3620 insertions(+), 4417 deletions(-) delete mode 100644 pkg/openapi/model_base_artifact.go delete mode 100644 pkg/openapi/model_base_artifact_create.go delete mode 100644 pkg/openapi/model_base_artifact_update.go delete mode 100644 pkg/openapi/model_base_execution.go delete mode 100644 pkg/openapi/model_base_execution_create.go delete mode 100644 pkg/openapi/model_base_execution_update.go delete mode 100644 pkg/openapi/model_base_resource.go delete mode 100644 pkg/openapi/model_base_resource_create.go create mode 100644 pkg/openapi/model_with_base_artifact_update.go create mode 100644 pkg/openapi/model_with_base_execution_update.go create mode 100644 pkg/openapi/model_with_base_resource.go create mode 100644 pkg/openapi/model_with_base_resource_create.go rename pkg/openapi/{model_base_resource_update.go => model_with_base_resource_update.go} (63%) create mode 100644 pkg/openapi/model_with_inference_service_create.go create mode 100644 pkg/openapi/model_with_inference_service_update.go create mode 100644 pkg/openapi/model_with_model_artifact_update.go create mode 100644 pkg/openapi/model_with_model_version_update.go create mode 100644 pkg/openapi/model_with_registered_model_update.go create mode 100644 pkg/openapi/model_with_serve_model_create.go diff --git a/internal/converter/generated/mlmd_openapi_converter.gen.go b/internal/converter/generated/mlmd_openapi_converter.gen.go index 3152711d..f99d7c35 100755 --- a/internal/converter/generated/mlmd_openapi_converter.gen.go +++ b/internal/converter/generated/mlmd_openapi_converter.gen.go @@ -20,29 +20,29 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertDocArtifact(source *proto.Artifact) return nil, fmt.Errorf("error setting field ArtifactType: %w", err) } openapiDocArtifact.ArtifactType = xstring + var pString *string + if (*source).Uri != nil { + xstring2 := *(*source).Uri + pString = &xstring2 + } + openapiDocArtifact.Uri = pString + openapiDocArtifact.State = converter.MapMLMDArtifactState((*source).State) + openapiDocArtifact.Id = converter.Int64ToString((*source).Id) + openapiDocArtifact.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) + openapiDocArtifact.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiDocArtifact.Name = converter.MapNameFromOwned((*source).Name) mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties) if err != nil { return nil, err } openapiDocArtifact.CustomProperties = &mapStringOpenapiMetadataValue openapiDocArtifact.Description = converter.MapDescription((*source).Properties) - var pString *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId - pString = &xstring2 - } - openapiDocArtifact.ExternalId = pString var pString2 *string - if (*source).Uri != nil { - xstring3 := *(*source).Uri + if (*source).ExternalId != nil { + xstring3 := *(*source).ExternalId pString2 = &xstring3 } - openapiDocArtifact.Uri = pString2 - openapiDocArtifact.State = converter.MapMLMDArtifactState((*source).State) - openapiDocArtifact.Name = converter.MapNameFromOwned((*source).Name) - openapiDocArtifact.Id = converter.Int64ToString((*source).Id) - openapiDocArtifact.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) - openapiDocArtifact.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiDocArtifact.ExternalId = pString2 pOpenapiDocArtifact = &openapiDocArtifact } return pOpenapiDocArtifact, nil @@ -51,6 +51,10 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertInferenceService(source *proto.Conte var pOpenapiInferenceService *openapi.InferenceService if source != nil { var openapiInferenceService openapi.InferenceService + openapiInferenceService.Id = converter.Int64ToString((*source).Id) + openapiInferenceService.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) + openapiInferenceService.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiInferenceService.Name = converter.MapNameFromOwned((*source).Name) mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties) if err != nil { return nil, err @@ -63,10 +67,6 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertInferenceService(source *proto.Conte pString = &xstring } openapiInferenceService.ExternalId = pString - openapiInferenceService.Name = converter.MapNameFromOwned((*source).Name) - openapiInferenceService.Id = converter.Int64ToString((*source).Id) - openapiInferenceService.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) - openapiInferenceService.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) openapiInferenceService.ModelVersionId = converter.MapPropertyModelVersionId((*source).Properties) openapiInferenceService.Runtime = converter.MapPropertyRuntime((*source).Properties) openapiInferenceService.DesiredState = converter.MapInferenceServiceDesiredState((*source).Properties) @@ -85,29 +85,29 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertModelArtifact(source *proto.Artifact return nil, fmt.Errorf("error setting field ArtifactType: %w", err) } openapiModelArtifact.ArtifactType = xstring + var pString *string + if (*source).Uri != nil { + xstring2 := *(*source).Uri + pString = &xstring2 + } + openapiModelArtifact.Uri = pString + openapiModelArtifact.State = converter.MapMLMDArtifactState((*source).State) + openapiModelArtifact.Id = converter.Int64ToString((*source).Id) + openapiModelArtifact.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) + openapiModelArtifact.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiModelArtifact.Name = converter.MapNameFromOwned((*source).Name) mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties) if err != nil { return nil, err } openapiModelArtifact.CustomProperties = &mapStringOpenapiMetadataValue openapiModelArtifact.Description = converter.MapDescription((*source).Properties) - var pString *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId - pString = &xstring2 - } - openapiModelArtifact.ExternalId = pString var pString2 *string - if (*source).Uri != nil { - xstring3 := *(*source).Uri + if (*source).ExternalId != nil { + xstring3 := *(*source).ExternalId pString2 = &xstring3 } - openapiModelArtifact.Uri = pString2 - openapiModelArtifact.State = converter.MapMLMDArtifactState((*source).State) - openapiModelArtifact.Name = converter.MapNameFromOwned((*source).Name) - openapiModelArtifact.Id = converter.Int64ToString((*source).Id) - openapiModelArtifact.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) - openapiModelArtifact.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiModelArtifact.ExternalId = pString2 openapiModelArtifact.ModelFormatName = converter.MapModelArtifactFormatName((*source).Properties) openapiModelArtifact.StorageKey = converter.MapModelArtifactStorageKey((*source).Properties) openapiModelArtifact.StoragePath = converter.MapModelArtifactStoragePath((*source).Properties) @@ -121,6 +121,10 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertModelVersion(source *proto.Context) var pOpenapiModelVersion *openapi.ModelVersion if source != nil { var openapiModelVersion openapi.ModelVersion + openapiModelVersion.Id = converter.Int64ToString((*source).Id) + openapiModelVersion.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) + openapiModelVersion.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiModelVersion.Name = converter.MapNameFromOwned((*source).Name) mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties) if err != nil { return nil, err @@ -133,12 +137,8 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertModelVersion(source *proto.Context) pString = &xstring } openapiModelVersion.ExternalId = pString - openapiModelVersion.Name = converter.MapNameFromOwned((*source).Name) openapiModelVersion.State = converter.MapModelVersionState((*source).Properties) openapiModelVersion.Author = converter.MapPropertyAuthor((*source).Properties) - openapiModelVersion.Id = converter.Int64ToString((*source).Id) - openapiModelVersion.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) - openapiModelVersion.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) pOpenapiModelVersion = &openapiModelVersion } return pOpenapiModelVersion, nil @@ -147,27 +147,27 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertRegisteredModel(source *proto.Contex var pOpenapiRegisteredModel *openapi.RegisteredModel if source != nil { var openapiRegisteredModel openapi.RegisteredModel + openapiRegisteredModel.Id = converter.Int64ToString((*source).Id) + openapiRegisteredModel.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) + openapiRegisteredModel.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + var pString *string + if (*source).Name != nil { + xstring := *(*source).Name + pString = &xstring + } + openapiRegisteredModel.Name = pString mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties) if err != nil { return nil, err } openapiRegisteredModel.CustomProperties = &mapStringOpenapiMetadataValue openapiRegisteredModel.Description = converter.MapDescription((*source).Properties) - var pString *string - if (*source).ExternalId != nil { - xstring := *(*source).ExternalId - pString = &xstring - } - openapiRegisteredModel.ExternalId = pString var pString2 *string - if (*source).Name != nil { - xstring2 := *(*source).Name + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiRegisteredModel.Name = pString2 - openapiRegisteredModel.Id = converter.Int64ToString((*source).Id) - openapiRegisteredModel.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) - openapiRegisteredModel.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiRegisteredModel.ExternalId = pString2 openapiRegisteredModel.State = converter.MapRegisteredModelState((*source).Properties) pOpenapiRegisteredModel = &openapiRegisteredModel } @@ -178,6 +178,10 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertServeModel(source *proto.Execution) if source != nil { var openapiServeModel openapi.ServeModel openapiServeModel.LastKnownState = converter.MapMLMDServeModelLastKnownState((*source).LastKnownState) + openapiServeModel.Id = converter.Int64ToString((*source).Id) + openapiServeModel.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) + openapiServeModel.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiServeModel.Name = converter.MapNameFromOwned((*source).Name) mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties) if err != nil { return nil, err @@ -190,10 +194,6 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertServeModel(source *proto.Execution) pString = &xstring } openapiServeModel.ExternalId = pString - openapiServeModel.Name = converter.MapNameFromOwned((*source).Name) - openapiServeModel.Id = converter.Int64ToString((*source).Id) - openapiServeModel.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) - openapiServeModel.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) openapiServeModel.ModelVersionId = converter.MapPropertyModelVersionIdAsValue((*source).Properties) pOpenapiServeModel = &openapiServeModel } @@ -203,6 +203,10 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertServingEnvironment(source *proto.Con var pOpenapiServingEnvironment *openapi.ServingEnvironment if source != nil { var openapiServingEnvironment openapi.ServingEnvironment + openapiServingEnvironment.Id = converter.Int64ToString((*source).Id) + openapiServingEnvironment.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) + openapiServingEnvironment.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) + openapiServingEnvironment.Name = converter.MapNameFromOwned((*source).Name) mapStringOpenapiMetadataValue, err := converter.MapMLMDCustomProperties((*source).CustomProperties) if err != nil { return nil, err @@ -215,10 +219,6 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertServingEnvironment(source *proto.Con pString = &xstring } openapiServingEnvironment.ExternalId = pString - openapiServingEnvironment.Name = converter.MapNameFromOwned((*source).Name) - openapiServingEnvironment.Id = converter.Int64ToString((*source).Id) - openapiServingEnvironment.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) - openapiServingEnvironment.LastUpdateTimeSinceEpoch = converter.Int64ToString((*source).LastUpdateTimeSinceEpoch) pOpenapiServingEnvironment = &openapiServingEnvironment } return pOpenapiServingEnvironment, nil diff --git a/internal/converter/generated/openapi_converter.gen.go b/internal/converter/generated/openapi_converter.gen.go index f88ef4ac..103de1ab 100755 --- a/internal/converter/generated/openapi_converter.gen.go +++ b/internal/converter/generated/openapi_converter.gen.go @@ -13,6 +13,12 @@ func (c *OpenAPIConverterImpl) ConvertInferenceServiceCreate(source *openapi.Inf var pOpenapiInferenceService *openapi.InferenceService if source != nil { var openapiInferenceService openapi.InferenceService + var pString *string + if (*source).Name != nil { + xstring := *(*source).Name + pString = &xstring + } + openapiInferenceService.Name = pString var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue if (*source).CustomProperties != nil { mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties))) @@ -22,24 +28,18 @@ func (c *OpenAPIConverterImpl) ConvertInferenceServiceCreate(source *openapi.Inf pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue } openapiInferenceService.CustomProperties = pMapStringOpenapiMetadataValue - var pString *string - if (*source).Description != nil { - xstring := *(*source).Description - pString = &xstring - } - openapiInferenceService.Description = pString var pString2 *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId + if (*source).Description != nil { + xstring2 := *(*source).Description pString2 = &xstring2 } - openapiInferenceService.ExternalId = pString2 + openapiInferenceService.Description = pString2 var pString3 *string - if (*source).Name != nil { - xstring3 := *(*source).Name + if (*source).ExternalId != nil { + xstring3 := *(*source).ExternalId pString3 = &xstring3 } - openapiInferenceService.Name = pString3 + openapiInferenceService.ExternalId = pString3 var pString4 *string if (*source).ModelVersionId != nil { xstring4 := *(*source).ModelVersionId @@ -115,6 +115,24 @@ func (c *OpenAPIConverterImpl) ConvertModelArtifactCreate(source *openapi.ModelA var pOpenapiModelArtifact *openapi.ModelArtifact if source != nil { var openapiModelArtifact openapi.ModelArtifact + var pString *string + if (*source).Uri != nil { + xstring := *(*source).Uri + pString = &xstring + } + openapiModelArtifact.Uri = pString + var pOpenapiArtifactState *openapi.ArtifactState + if (*source).State != nil { + openapiArtifactState := openapi.ArtifactState(*(*source).State) + pOpenapiArtifactState = &openapiArtifactState + } + openapiModelArtifact.State = pOpenapiArtifactState + var pString2 *string + if (*source).Name != nil { + xstring2 := *(*source).Name + pString2 = &xstring2 + } + openapiModelArtifact.Name = pString2 var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue if (*source).CustomProperties != nil { mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties))) @@ -124,36 +142,18 @@ func (c *OpenAPIConverterImpl) ConvertModelArtifactCreate(source *openapi.ModelA pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue } openapiModelArtifact.CustomProperties = pMapStringOpenapiMetadataValue - var pString *string - if (*source).Description != nil { - xstring := *(*source).Description - pString = &xstring - } - openapiModelArtifact.Description = pString - var pString2 *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId - pString2 = &xstring2 - } - openapiModelArtifact.ExternalId = pString2 var pString3 *string - if (*source).Uri != nil { - xstring3 := *(*source).Uri + if (*source).Description != nil { + xstring3 := *(*source).Description pString3 = &xstring3 } - openapiModelArtifact.Uri = pString3 - var pOpenapiArtifactState *openapi.ArtifactState - if (*source).State != nil { - openapiArtifactState := openapi.ArtifactState(*(*source).State) - pOpenapiArtifactState = &openapiArtifactState - } - openapiModelArtifact.State = pOpenapiArtifactState + openapiModelArtifact.Description = pString3 var pString4 *string - if (*source).Name != nil { - xstring4 := *(*source).Name + if (*source).ExternalId != nil { + xstring4 := *(*source).ExternalId pString4 = &xstring4 } - openapiModelArtifact.Name = pString4 + openapiModelArtifact.ExternalId = pString4 var pString5 *string if (*source).ModelFormatName != nil { xstring5 := *(*source).ModelFormatName @@ -192,6 +192,18 @@ func (c *OpenAPIConverterImpl) ConvertModelArtifactUpdate(source *openapi.ModelA var pOpenapiModelArtifact *openapi.ModelArtifact if source != nil { var openapiModelArtifact openapi.ModelArtifact + var pString *string + if (*source).Uri != nil { + xstring := *(*source).Uri + pString = &xstring + } + openapiModelArtifact.Uri = pString + var pOpenapiArtifactState *openapi.ArtifactState + if (*source).State != nil { + openapiArtifactState := openapi.ArtifactState(*(*source).State) + pOpenapiArtifactState = &openapiArtifactState + } + openapiModelArtifact.State = pOpenapiArtifactState var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue if (*source).CustomProperties != nil { mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties))) @@ -201,30 +213,18 @@ func (c *OpenAPIConverterImpl) ConvertModelArtifactUpdate(source *openapi.ModelA pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue } openapiModelArtifact.CustomProperties = pMapStringOpenapiMetadataValue - var pString *string - if (*source).Description != nil { - xstring := *(*source).Description - pString = &xstring - } - openapiModelArtifact.Description = pString var pString2 *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId + if (*source).Description != nil { + xstring2 := *(*source).Description pString2 = &xstring2 } - openapiModelArtifact.ExternalId = pString2 + openapiModelArtifact.Description = pString2 var pString3 *string - if (*source).Uri != nil { - xstring3 := *(*source).Uri + if (*source).ExternalId != nil { + xstring3 := *(*source).ExternalId pString3 = &xstring3 } - openapiModelArtifact.Uri = pString3 - var pOpenapiArtifactState *openapi.ArtifactState - if (*source).State != nil { - openapiArtifactState := openapi.ArtifactState(*(*source).State) - pOpenapiArtifactState = &openapiArtifactState - } - openapiModelArtifact.State = pOpenapiArtifactState + openapiModelArtifact.ExternalId = pString3 var pString4 *string if (*source).ModelFormatName != nil { xstring4 := *(*source).ModelFormatName @@ -263,6 +263,12 @@ func (c *OpenAPIConverterImpl) ConvertModelVersionCreate(source *openapi.ModelVe var pOpenapiModelVersion *openapi.ModelVersion if source != nil { var openapiModelVersion openapi.ModelVersion + var pString *string + if (*source).Name != nil { + xstring := *(*source).Name + pString = &xstring + } + openapiModelVersion.Name = pString var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue if (*source).CustomProperties != nil { mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties))) @@ -272,24 +278,18 @@ func (c *OpenAPIConverterImpl) ConvertModelVersionCreate(source *openapi.ModelVe pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue } openapiModelVersion.CustomProperties = pMapStringOpenapiMetadataValue - var pString *string - if (*source).Description != nil { - xstring := *(*source).Description - pString = &xstring - } - openapiModelVersion.Description = pString var pString2 *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId + if (*source).Description != nil { + xstring2 := *(*source).Description pString2 = &xstring2 } - openapiModelVersion.ExternalId = pString2 + openapiModelVersion.Description = pString2 var pString3 *string - if (*source).Name != nil { - xstring3 := *(*source).Name + if (*source).ExternalId != nil { + xstring3 := *(*source).ExternalId pString3 = &xstring3 } - openapiModelVersion.Name = pString3 + openapiModelVersion.ExternalId = pString3 var pOpenapiModelVersionState *openapi.ModelVersionState if (*source).State != nil { openapiModelVersionState := openapi.ModelVersionState(*(*source).State) @@ -351,6 +351,12 @@ func (c *OpenAPIConverterImpl) ConvertRegisteredModelCreate(source *openapi.Regi var pOpenapiRegisteredModel *openapi.RegisteredModel if source != nil { var openapiRegisteredModel openapi.RegisteredModel + var pString *string + if (*source).Name != nil { + xstring := *(*source).Name + pString = &xstring + } + openapiRegisteredModel.Name = pString var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue if (*source).CustomProperties != nil { mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties))) @@ -360,24 +366,18 @@ func (c *OpenAPIConverterImpl) ConvertRegisteredModelCreate(source *openapi.Regi pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue } openapiRegisteredModel.CustomProperties = pMapStringOpenapiMetadataValue - var pString *string - if (*source).Description != nil { - xstring := *(*source).Description - pString = &xstring - } - openapiRegisteredModel.Description = pString var pString2 *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId + if (*source).Description != nil { + xstring2 := *(*source).Description pString2 = &xstring2 } - openapiRegisteredModel.ExternalId = pString2 + openapiRegisteredModel.Description = pString2 var pString3 *string - if (*source).Name != nil { - xstring3 := *(*source).Name + if (*source).ExternalId != nil { + xstring3 := *(*source).ExternalId pString3 = &xstring3 } - openapiRegisteredModel.Name = pString3 + openapiRegisteredModel.ExternalId = pString3 var pOpenapiRegisteredModelState *openapi.RegisteredModelState if (*source).State != nil { openapiRegisteredModelState := openapi.RegisteredModelState(*(*source).State) @@ -433,6 +433,12 @@ func (c *OpenAPIConverterImpl) ConvertServeModelCreate(source *openapi.ServeMode pOpenapiExecutionState = &openapiExecutionState } openapiServeModel.LastKnownState = pOpenapiExecutionState + var pString *string + if (*source).Name != nil { + xstring := *(*source).Name + pString = &xstring + } + openapiServeModel.Name = pString var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue if (*source).CustomProperties != nil { mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties))) @@ -442,24 +448,18 @@ func (c *OpenAPIConverterImpl) ConvertServeModelCreate(source *openapi.ServeMode pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue } openapiServeModel.CustomProperties = pMapStringOpenapiMetadataValue - var pString *string - if (*source).Description != nil { - xstring := *(*source).Description - pString = &xstring - } - openapiServeModel.Description = pString var pString2 *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId + if (*source).Description != nil { + xstring2 := *(*source).Description pString2 = &xstring2 } - openapiServeModel.ExternalId = pString2 + openapiServeModel.Description = pString2 var pString3 *string - if (*source).Name != nil { - xstring3 := *(*source).Name + if (*source).ExternalId != nil { + xstring3 := *(*source).ExternalId pString3 = &xstring3 } - openapiServeModel.Name = pString3 + openapiServeModel.ExternalId = pString3 openapiServeModel.ModelVersionId = (*source).ModelVersionId pOpenapiServeModel = &openapiServeModel } @@ -504,6 +504,12 @@ func (c *OpenAPIConverterImpl) ConvertServingEnvironmentCreate(source *openapi.S var pOpenapiServingEnvironment *openapi.ServingEnvironment if source != nil { var openapiServingEnvironment openapi.ServingEnvironment + var pString *string + if (*source).Name != nil { + xstring := *(*source).Name + pString = &xstring + } + openapiServingEnvironment.Name = pString var pMapStringOpenapiMetadataValue *map[string]openapi.MetadataValue if (*source).CustomProperties != nil { mapStringOpenapiMetadataValue := make(map[string]openapi.MetadataValue, len((*(*source).CustomProperties))) @@ -513,24 +519,18 @@ func (c *OpenAPIConverterImpl) ConvertServingEnvironmentCreate(source *openapi.S pMapStringOpenapiMetadataValue = &mapStringOpenapiMetadataValue } openapiServingEnvironment.CustomProperties = pMapStringOpenapiMetadataValue - var pString *string - if (*source).Description != nil { - xstring := *(*source).Description - pString = &xstring - } - openapiServingEnvironment.Description = pString var pString2 *string - if (*source).ExternalId != nil { - xstring2 := *(*source).ExternalId + if (*source).Description != nil { + xstring2 := *(*source).Description pString2 = &xstring2 } - openapiServingEnvironment.ExternalId = pString2 + openapiServingEnvironment.Description = pString2 var pString3 *string - if (*source).Name != nil { - xstring3 := *(*source).Name + if (*source).ExternalId != nil { + xstring3 := *(*source).ExternalId pString3 = &xstring3 } - openapiServingEnvironment.Name = pString3 + openapiServingEnvironment.ExternalId = pString3 pOpenapiServingEnvironment = &openapiServingEnvironment } return pOpenapiServingEnvironment, nil diff --git a/internal/server/openapi/type_asserts.go b/internal/server/openapi/type_asserts.go index fa32e4c3..3803ed7b 100644 --- a/internal/server/openapi/type_asserts.go +++ b/internal/server/openapi/type_asserts.go @@ -62,86 +62,6 @@ func AssertArtifactStateConstraints(obj model.ArtifactState) error { return nil } -// AssertBaseArtifactCreateRequired checks if the required fields are not zero-ed -func AssertBaseArtifactCreateRequired(obj model.BaseArtifactCreate) error { - return nil -} - -// AssertBaseArtifactCreateConstraints checks if the values respects the defined constraints -func AssertBaseArtifactCreateConstraints(obj model.BaseArtifactCreate) error { - return nil -} - -// AssertBaseArtifactRequired checks if the required fields are not zero-ed -func AssertBaseArtifactRequired(obj model.BaseArtifact) error { - return nil -} - -// AssertBaseArtifactConstraints checks if the values respects the defined constraints -func AssertBaseArtifactConstraints(obj model.BaseArtifact) error { - return nil -} - -// AssertBaseArtifactUpdateRequired checks if the required fields are not zero-ed -func AssertBaseArtifactUpdateRequired(obj model.BaseArtifactUpdate) error { - return nil -} - -// AssertBaseArtifactUpdateConstraints checks if the values respects the defined constraints -func AssertBaseArtifactUpdateConstraints(obj model.BaseArtifactUpdate) error { - return nil -} - -// AssertBaseExecutionCreateRequired checks if the required fields are not zero-ed -func AssertBaseExecutionCreateRequired(obj model.BaseExecutionCreate) error { - return nil -} - -// AssertBaseExecutionCreateConstraints checks if the values respects the defined constraints -func AssertBaseExecutionCreateConstraints(obj model.BaseExecutionCreate) error { - return nil -} - -// AssertBaseExecutionRequired checks if the required fields are not zero-ed -func AssertBaseExecutionRequired(obj model.BaseExecution) error { - return nil -} - -// AssertBaseExecutionConstraints checks if the values respects the defined constraints -func AssertBaseExecutionConstraints(obj model.BaseExecution) error { - return nil -} - -// AssertBaseExecutionUpdateRequired checks if the required fields are not zero-ed -func AssertBaseExecutionUpdateRequired(obj model.BaseExecutionUpdate) error { - return nil -} - -// AssertBaseExecutionUpdateConstraints checks if the values respects the defined constraints -func AssertBaseExecutionUpdateConstraints(obj model.BaseExecutionUpdate) error { - return nil -} - -// AssertBaseResourceCreateRequired checks if the required fields are not zero-ed -func AssertBaseResourceCreateRequired(obj model.BaseResourceCreate) error { - return nil -} - -// AssertBaseResourceCreateConstraints checks if the values respects the defined constraints -func AssertBaseResourceCreateConstraints(obj model.BaseResourceCreate) error { - return nil -} - -// AssertBaseResourceRequired checks if the required fields are not zero-ed -func AssertBaseResourceRequired(obj model.BaseResource) error { - return nil -} - -// AssertBaseResourceConstraints checks if the values respects the defined constraints -func AssertBaseResourceConstraints(obj model.BaseResource) error { - return nil -} - // AssertBaseResourceListRequired checks if the required fields are not zero-ed func AssertBaseResourceListRequired(obj model.BaseResourceList) error { elements := map[string]interface{}{ @@ -163,16 +83,6 @@ func AssertBaseResourceListConstraints(obj model.BaseResourceList) error { return nil } -// AssertBaseResourceUpdateRequired checks if the required fields are not zero-ed -func AssertBaseResourceUpdateRequired(obj model.BaseResourceUpdate) error { - return nil -} - -// AssertBaseResourceUpdateConstraints checks if the values respects the defined constraints -func AssertBaseResourceUpdateConstraints(obj model.BaseResourceUpdate) error { - return nil -} - // AssertDocArtifactRequired checks if the required fields are not zero-ed func AssertDocArtifactRequired(obj model.DocArtifact) error { elements := map[string]interface{}{ @@ -222,8 +132,8 @@ func AssertExecutionStateConstraints(obj model.ExecutionState) error { return nil } -// AssertInferenceServiceCreateRequired checks if the required fields are not zero-ed -func AssertInferenceServiceCreateRequired(obj model.InferenceServiceCreate) error { +// AssertInferenceServiceRequired checks if the required fields are not zero-ed +func AssertInferenceServiceRequired(obj model.InferenceService) error { elements := map[string]interface{}{ "registeredModelId": obj.RegisteredModelId, "servingEnvironmentId": obj.ServingEnvironmentId, @@ -237,13 +147,13 @@ func AssertInferenceServiceCreateRequired(obj model.InferenceServiceCreate) erro return nil } -// AssertInferenceServiceCreateConstraints checks if the values respects the defined constraints -func AssertInferenceServiceCreateConstraints(obj model.InferenceServiceCreate) error { +// AssertInferenceServiceConstraints checks if the values respects the defined constraints +func AssertInferenceServiceConstraints(obj model.InferenceService) error { return nil } -// AssertInferenceServiceRequired checks if the required fields are not zero-ed -func AssertInferenceServiceRequired(obj model.InferenceService) error { +// AssertInferenceServiceCreateRequired checks if the required fields are not zero-ed +func AssertInferenceServiceCreateRequired(obj model.InferenceServiceCreate) error { elements := map[string]interface{}{ "registeredModelId": obj.RegisteredModelId, "servingEnvironmentId": obj.ServingEnvironmentId, @@ -257,8 +167,8 @@ func AssertInferenceServiceRequired(obj model.InferenceService) error { return nil } -// AssertInferenceServiceConstraints checks if the values respects the defined constraints -func AssertInferenceServiceConstraints(obj model.InferenceService) error { +// AssertInferenceServiceCreateConstraints checks if the values respects the defined constraints +func AssertInferenceServiceCreateConstraints(obj model.InferenceServiceCreate) error { return nil } @@ -456,16 +366,6 @@ func AssertMetadataValueConstraints(obj model.MetadataValue) error { return nil } -// AssertModelArtifactCreateRequired checks if the required fields are not zero-ed -func AssertModelArtifactCreateRequired(obj model.ModelArtifactCreate) error { - return nil -} - -// AssertModelArtifactCreateConstraints checks if the values respects the defined constraints -func AssertModelArtifactCreateConstraints(obj model.ModelArtifactCreate) error { - return nil -} - // AssertModelArtifactRequired checks if the required fields are not zero-ed func AssertModelArtifactRequired(obj model.ModelArtifact) error { elements := map[string]interface{}{ @@ -485,6 +385,16 @@ func AssertModelArtifactConstraints(obj model.ModelArtifact) error { return nil } +// AssertModelArtifactCreateRequired checks if the required fields are not zero-ed +func AssertModelArtifactCreateRequired(obj model.ModelArtifactCreate) error { + return nil +} + +// AssertModelArtifactCreateConstraints checks if the values respects the defined constraints +func AssertModelArtifactCreateConstraints(obj model.ModelArtifactCreate) error { + return nil +} + // AssertModelArtifactListRequired checks if the required fields are not zero-ed func AssertModelArtifactListRequired(obj model.ModelArtifactList) error { elements := map[string]interface{}{ @@ -521,6 +431,16 @@ func AssertModelArtifactUpdateConstraints(obj model.ModelArtifactUpdate) error { return nil } +// AssertModelVersionRequired checks if the required fields are not zero-ed +func AssertModelVersionRequired(obj model.ModelVersion) error { + return nil +} + +// AssertModelVersionConstraints checks if the values respects the defined constraints +func AssertModelVersionConstraints(obj model.ModelVersion) error { + return nil +} + // AssertModelVersionCreateRequired checks if the required fields are not zero-ed func AssertModelVersionCreateRequired(obj model.ModelVersionCreate) error { elements := map[string]interface{}{ @@ -540,16 +460,6 @@ func AssertModelVersionCreateConstraints(obj model.ModelVersionCreate) error { return nil } -// AssertModelVersionRequired checks if the required fields are not zero-ed -func AssertModelVersionRequired(obj model.ModelVersion) error { - return nil -} - -// AssertModelVersionConstraints checks if the values respects the defined constraints -func AssertModelVersionConstraints(obj model.ModelVersion) error { - return nil -} - // AssertModelVersionListRequired checks if the required fields are not zero-ed func AssertModelVersionListRequired(obj model.ModelVersionList) error { elements := map[string]interface{}{ @@ -606,23 +516,23 @@ func AssertOrderByFieldConstraints(obj model.OrderByField) error { return nil } -// AssertRegisteredModelCreateRequired checks if the required fields are not zero-ed -func AssertRegisteredModelCreateRequired(obj model.RegisteredModelCreate) error { +// AssertRegisteredModelRequired checks if the required fields are not zero-ed +func AssertRegisteredModelRequired(obj model.RegisteredModel) error { return nil } -// AssertRegisteredModelCreateConstraints checks if the values respects the defined constraints -func AssertRegisteredModelCreateConstraints(obj model.RegisteredModelCreate) error { +// AssertRegisteredModelConstraints checks if the values respects the defined constraints +func AssertRegisteredModelConstraints(obj model.RegisteredModel) error { return nil } -// AssertRegisteredModelRequired checks if the required fields are not zero-ed -func AssertRegisteredModelRequired(obj model.RegisteredModel) error { +// AssertRegisteredModelCreateRequired checks if the required fields are not zero-ed +func AssertRegisteredModelCreateRequired(obj model.RegisteredModelCreate) error { return nil } -// AssertRegisteredModelConstraints checks if the values respects the defined constraints -func AssertRegisteredModelConstraints(obj model.RegisteredModel) error { +// AssertRegisteredModelCreateConstraints checks if the values respects the defined constraints +func AssertRegisteredModelCreateConstraints(obj model.RegisteredModelCreate) error { return nil } @@ -672,8 +582,8 @@ func AssertRegisteredModelUpdateConstraints(obj model.RegisteredModelUpdate) err return nil } -// AssertServeModelCreateRequired checks if the required fields are not zero-ed -func AssertServeModelCreateRequired(obj model.ServeModelCreate) error { +// AssertServeModelRequired checks if the required fields are not zero-ed +func AssertServeModelRequired(obj model.ServeModel) error { elements := map[string]interface{}{ "modelVersionId": obj.ModelVersionId, } @@ -686,13 +596,13 @@ func AssertServeModelCreateRequired(obj model.ServeModelCreate) error { return nil } -// AssertServeModelCreateConstraints checks if the values respects the defined constraints -func AssertServeModelCreateConstraints(obj model.ServeModelCreate) error { +// AssertServeModelConstraints checks if the values respects the defined constraints +func AssertServeModelConstraints(obj model.ServeModel) error { return nil } -// AssertServeModelRequired checks if the required fields are not zero-ed -func AssertServeModelRequired(obj model.ServeModel) error { +// AssertServeModelCreateRequired checks if the required fields are not zero-ed +func AssertServeModelCreateRequired(obj model.ServeModelCreate) error { elements := map[string]interface{}{ "modelVersionId": obj.ModelVersionId, } @@ -705,8 +615,8 @@ func AssertServeModelRequired(obj model.ServeModel) error { return nil } -// AssertServeModelConstraints checks if the values respects the defined constraints -func AssertServeModelConstraints(obj model.ServeModel) error { +// AssertServeModelCreateConstraints checks if the values respects the defined constraints +func AssertServeModelCreateConstraints(obj model.ServeModelCreate) error { return nil } @@ -746,23 +656,23 @@ func AssertServeModelUpdateConstraints(obj model.ServeModelUpdate) error { return nil } -// AssertServingEnvironmentCreateRequired checks if the required fields are not zero-ed -func AssertServingEnvironmentCreateRequired(obj model.ServingEnvironmentCreate) error { +// AssertServingEnvironmentRequired checks if the required fields are not zero-ed +func AssertServingEnvironmentRequired(obj model.ServingEnvironment) error { return nil } -// AssertServingEnvironmentCreateConstraints checks if the values respects the defined constraints -func AssertServingEnvironmentCreateConstraints(obj model.ServingEnvironmentCreate) error { +// AssertServingEnvironmentConstraints checks if the values respects the defined constraints +func AssertServingEnvironmentConstraints(obj model.ServingEnvironment) error { return nil } -// AssertServingEnvironmentRequired checks if the required fields are not zero-ed -func AssertServingEnvironmentRequired(obj model.ServingEnvironment) error { +// AssertServingEnvironmentCreateRequired checks if the required fields are not zero-ed +func AssertServingEnvironmentCreateRequired(obj model.ServingEnvironmentCreate) error { return nil } -// AssertServingEnvironmentConstraints checks if the values respects the defined constraints -func AssertServingEnvironmentConstraints(obj model.ServingEnvironment) error { +// AssertServingEnvironmentCreateConstraints checks if the values respects the defined constraints +func AssertServingEnvironmentCreateConstraints(obj model.ServingEnvironmentCreate) error { return nil } @@ -811,3 +721,132 @@ func AssertSortOrderRequired(obj model.SortOrder) error { func AssertSortOrderConstraints(obj model.SortOrder) error { return nil } + +// AssertWithBaseArtifactUpdateRequired checks if the required fields are not zero-ed +func AssertWithBaseArtifactUpdateRequired(obj model.WithBaseArtifactUpdate) error { + return nil +} + +// AssertWithBaseArtifactUpdateConstraints checks if the values respects the defined constraints +func AssertWithBaseArtifactUpdateConstraints(obj model.WithBaseArtifactUpdate) error { + return nil +} + +// AssertWithBaseExecutionUpdateRequired checks if the required fields are not zero-ed +func AssertWithBaseExecutionUpdateRequired(obj model.WithBaseExecutionUpdate) error { + return nil +} + +// AssertWithBaseExecutionUpdateConstraints checks if the values respects the defined constraints +func AssertWithBaseExecutionUpdateConstraints(obj model.WithBaseExecutionUpdate) error { + return nil +} + +// AssertWithBaseResourceRequired checks if the required fields are not zero-ed +func AssertWithBaseResourceRequired(obj model.WithBaseResource) error { + return nil +} + +// AssertWithBaseResourceConstraints checks if the values respects the defined constraints +func AssertWithBaseResourceConstraints(obj model.WithBaseResource) error { + return nil +} + +// AssertWithBaseResourceCreateRequired checks if the required fields are not zero-ed +func AssertWithBaseResourceCreateRequired(obj model.WithBaseResourceCreate) error { + return nil +} + +// AssertWithBaseResourceCreateConstraints checks if the values respects the defined constraints +func AssertWithBaseResourceCreateConstraints(obj model.WithBaseResourceCreate) error { + return nil +} + +// AssertWithBaseResourceUpdateRequired checks if the required fields are not zero-ed +func AssertWithBaseResourceUpdateRequired(obj model.WithBaseResourceUpdate) error { + return nil +} + +// AssertWithBaseResourceUpdateConstraints checks if the values respects the defined constraints +func AssertWithBaseResourceUpdateConstraints(obj model.WithBaseResourceUpdate) error { + return nil +} + +// AssertWithInferenceServiceCreateRequired checks if the required fields are not zero-ed +func AssertWithInferenceServiceCreateRequired(obj model.WithInferenceServiceCreate) error { + elements := map[string]interface{}{ + "registeredModelId": obj.RegisteredModelId, + "servingEnvironmentId": obj.ServingEnvironmentId, + } + for name, el := range elements { + if isZero := IsZeroValue(el); isZero { + return &RequiredError{Field: name} + } + } + + return nil +} + +// AssertWithInferenceServiceCreateConstraints checks if the values respects the defined constraints +func AssertWithInferenceServiceCreateConstraints(obj model.WithInferenceServiceCreate) error { + return nil +} + +// AssertWithInferenceServiceUpdateRequired checks if the required fields are not zero-ed +func AssertWithInferenceServiceUpdateRequired(obj model.WithInferenceServiceUpdate) error { + return nil +} + +// AssertWithInferenceServiceUpdateConstraints checks if the values respects the defined constraints +func AssertWithInferenceServiceUpdateConstraints(obj model.WithInferenceServiceUpdate) error { + return nil +} + +// AssertWithModelArtifactUpdateRequired checks if the required fields are not zero-ed +func AssertWithModelArtifactUpdateRequired(obj model.WithModelArtifactUpdate) error { + return nil +} + +// AssertWithModelArtifactUpdateConstraints checks if the values respects the defined constraints +func AssertWithModelArtifactUpdateConstraints(obj model.WithModelArtifactUpdate) error { + return nil +} + +// AssertWithModelVersionUpdateRequired checks if the required fields are not zero-ed +func AssertWithModelVersionUpdateRequired(obj model.WithModelVersionUpdate) error { + return nil +} + +// AssertWithModelVersionUpdateConstraints checks if the values respects the defined constraints +func AssertWithModelVersionUpdateConstraints(obj model.WithModelVersionUpdate) error { + return nil +} + +// AssertWithRegisteredModelUpdateRequired checks if the required fields are not zero-ed +func AssertWithRegisteredModelUpdateRequired(obj model.WithRegisteredModelUpdate) error { + return nil +} + +// AssertWithRegisteredModelUpdateConstraints checks if the values respects the defined constraints +func AssertWithRegisteredModelUpdateConstraints(obj model.WithRegisteredModelUpdate) error { + return nil +} + +// AssertWithServeModelCreateRequired checks if the required fields are not zero-ed +func AssertWithServeModelCreateRequired(obj model.WithServeModelCreate) error { + elements := map[string]interface{}{ + "modelVersionId": obj.ModelVersionId, + } + for name, el := range elements { + if isZero := IsZeroValue(el); isZero { + return &RequiredError{Field: name} + } + } + + return nil +} + +// AssertWithServeModelCreateConstraints checks if the values respects the defined constraints +func AssertWithServeModelCreateConstraints(obj model.WithServeModelCreate) error { + return nil +} diff --git a/pkg/openapi/.openapi-generator/FILES b/pkg/openapi/.openapi-generator/FILES index ba72484a..a86786b9 100644 --- a/pkg/openapi/.openapi-generator/FILES +++ b/pkg/openapi/.openapi-generator/FILES @@ -4,16 +4,7 @@ configuration.go model_artifact.go model_artifact_list.go model_artifact_state.go -model_base_artifact.go -model_base_artifact_create.go -model_base_artifact_update.go -model_base_execution.go -model_base_execution_create.go -model_base_execution_update.go -model_base_resource.go -model_base_resource_create.go model_base_resource_list.go -model_base_resource_update.go model_doc_artifact.go model_error.go model_execution_state.go @@ -53,5 +44,16 @@ model_serving_environment_create.go model_serving_environment_list.go model_serving_environment_update.go model_sort_order.go +model_with_base_artifact_update.go +model_with_base_execution_update.go +model_with_base_resource.go +model_with_base_resource_create.go +model_with_base_resource_update.go +model_with_inference_service_create.go +model_with_inference_service_update.go +model_with_model_artifact_update.go +model_with_model_version_update.go +model_with_registered_model_update.go +model_with_serve_model_create.go response.go utils.go diff --git a/pkg/openapi/model_artifact_list.go b/pkg/openapi/model_artifact_list.go index ef0c4323..f7f7496b 100644 --- a/pkg/openapi/model_artifact_list.go +++ b/pkg/openapi/model_artifact_list.go @@ -19,14 +19,14 @@ var _ MappedNullable = &ArtifactList{} // ArtifactList A list of Artifact entities. type ArtifactList struct { + // Array of `Artifact` entities. + Items []Artifact `json:"items,omitempty"` // Token to use to retrieve next page of results. NextPageToken string `json:"nextPageToken"` // Maximum number of resources to return in the result. PageSize int32 `json:"pageSize"` // Number of items in result list. Size int32 `json:"size"` - // Array of `Artifact` entities. - Items []Artifact `json:"items,omitempty"` } // NewArtifactList instantiates a new ArtifactList object @@ -49,6 +49,38 @@ func NewArtifactListWithDefaults() *ArtifactList { return &this } +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ArtifactList) GetItems() []Artifact { + if o == nil || IsNil(o.Items) { + var ret []Artifact + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ArtifactList) GetItemsOk() ([]Artifact, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ArtifactList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Artifact and assigns it to the Items field. +func (o *ArtifactList) SetItems(v []Artifact) { + o.Items = v +} + // GetNextPageToken returns the NextPageToken field value func (o *ArtifactList) GetNextPageToken() string { if o == nil { @@ -121,38 +153,6 @@ func (o *ArtifactList) SetSize(v int32) { o.Size = v } -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ArtifactList) GetItems() []Artifact { - if o == nil || IsNil(o.Items) { - var ret []Artifact - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ArtifactList) GetItemsOk() ([]Artifact, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ArtifactList) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []Artifact and assigns it to the Items field. -func (o *ArtifactList) SetItems(v []Artifact) { - o.Items = v -} - func (o ArtifactList) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -163,12 +163,12 @@ func (o ArtifactList) MarshalJSON() ([]byte, error) { func (o ArtifactList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["nextPageToken"] = o.NextPageToken - toSerialize["pageSize"] = o.PageSize - toSerialize["size"] = o.Size if !IsNil(o.Items) { toSerialize["items"] = o.Items } + toSerialize["nextPageToken"] = o.NextPageToken + toSerialize["pageSize"] = o.PageSize + toSerialize["size"] = o.Size return toSerialize, nil } diff --git a/pkg/openapi/model_base_artifact.go b/pkg/openapi/model_base_artifact.go deleted file mode 100644 index fbe986d1..00000000 --- a/pkg/openapi/model_base_artifact.go +++ /dev/null @@ -1,424 +0,0 @@ -/* -Model Registry REST API - -REST API for Model Registry to create and manage ML model metadata - -API version: v1alpha3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// checks if the BaseArtifact type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseArtifact{} - -// BaseArtifact struct for BaseArtifact -type BaseArtifact struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. - Uri *string `json:"uri,omitempty"` - State *ArtifactState `json:"state,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` - // Output only. The unique server generated id of the resource. - Id *string `json:"id,omitempty"` - // Output only. Create time of the resource in millisecond since epoch. - CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` - // Output only. Last update time of the resource since epoch in millisecond since epoch. - LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` -} - -// NewBaseArtifact instantiates a new BaseArtifact object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBaseArtifact() *BaseArtifact { - this := BaseArtifact{} - var state ArtifactState = ARTIFACTSTATE_UNKNOWN - this.State = &state - return &this -} - -// NewBaseArtifactWithDefaults instantiates a new BaseArtifact object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBaseArtifactWithDefaults() *BaseArtifact { - this := BaseArtifact{} - var state ArtifactState = ARTIFACTSTATE_UNKNOWN - this.State = &state - return &this -} - -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseArtifact) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue - return ret - } - return *o.CustomProperties -} - -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { - return nil, false - } - return o.CustomProperties, true -} - -// HasCustomProperties returns a boolean if a field has been set. -func (o *BaseArtifact) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { - return true - } - - return false -} - -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseArtifact) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseArtifact) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *BaseArtifact) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseArtifact) SetDescription(v string) { - o.Description = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseArtifact) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *BaseArtifact) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseArtifact) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *BaseArtifact) GetUri() string { - if o == nil || IsNil(o.Uri) { - var ret string - return ret - } - return *o.Uri -} - -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { - return nil, false - } - return o.Uri, true -} - -// HasUri returns a boolean if a field has been set. -func (o *BaseArtifact) HasUri() bool { - if o != nil && !IsNil(o.Uri) { - return true - } - - return false -} - -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *BaseArtifact) SetUri(v string) { - o.Uri = &v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *BaseArtifact) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *BaseArtifact) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *BaseArtifact) SetState(v ArtifactState) { - o.State = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *BaseArtifact) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *BaseArtifact) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *BaseArtifact) SetName(v string) { - o.Name = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *BaseArtifact) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *BaseArtifact) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *BaseArtifact) SetId(v string) { - o.Id = &v -} - -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *BaseArtifact) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { - var ret string - return ret - } - return *o.CreateTimeSinceEpoch -} - -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { - return nil, false - } - return o.CreateTimeSinceEpoch, true -} - -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *BaseArtifact) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { - return true - } - - return false -} - -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *BaseArtifact) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v -} - -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *BaseArtifact) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { - var ret string - return ret - } - return *o.LastUpdateTimeSinceEpoch -} - -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifact) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { - return nil, false - } - return o.LastUpdateTimeSinceEpoch, true -} - -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *BaseArtifact) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { - return true - } - - return false -} - -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *BaseArtifact) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v -} - -func (o BaseArtifact) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BaseArtifact) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri - } - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.CreateTimeSinceEpoch) { - toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch - } - if !IsNil(o.LastUpdateTimeSinceEpoch) { - toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch - } - return toSerialize, nil -} - -type NullableBaseArtifact struct { - value *BaseArtifact - isSet bool -} - -func (v NullableBaseArtifact) Get() *BaseArtifact { - return v.value -} - -func (v *NullableBaseArtifact) Set(val *BaseArtifact) { - v.value = val - v.isSet = true -} - -func (v NullableBaseArtifact) IsSet() bool { - return v.isSet -} - -func (v *NullableBaseArtifact) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBaseArtifact(val *BaseArtifact) *NullableBaseArtifact { - return &NullableBaseArtifact{value: val, isSet: true} -} - -func (v NullableBaseArtifact) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBaseArtifact) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/openapi/model_base_artifact_create.go b/pkg/openapi/model_base_artifact_create.go deleted file mode 100644 index 75e99cfa..00000000 --- a/pkg/openapi/model_base_artifact_create.go +++ /dev/null @@ -1,313 +0,0 @@ -/* -Model Registry REST API - -REST API for Model Registry to create and manage ML model metadata - -API version: v1alpha3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// checks if the BaseArtifactCreate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseArtifactCreate{} - -// BaseArtifactCreate struct for BaseArtifactCreate -type BaseArtifactCreate struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. - Uri *string `json:"uri,omitempty"` - State *ArtifactState `json:"state,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` -} - -// NewBaseArtifactCreate instantiates a new BaseArtifactCreate object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBaseArtifactCreate() *BaseArtifactCreate { - this := BaseArtifactCreate{} - var state ArtifactState = ARTIFACTSTATE_UNKNOWN - this.State = &state - return &this -} - -// NewBaseArtifactCreateWithDefaults instantiates a new BaseArtifactCreate object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBaseArtifactCreateWithDefaults() *BaseArtifactCreate { - this := BaseArtifactCreate{} - var state ArtifactState = ARTIFACTSTATE_UNKNOWN - this.State = &state - return &this -} - -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseArtifactCreate) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue - return ret - } - return *o.CustomProperties -} - -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { - return nil, false - } - return o.CustomProperties, true -} - -// HasCustomProperties returns a boolean if a field has been set. -func (o *BaseArtifactCreate) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { - return true - } - - return false -} - -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseArtifactCreate) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseArtifactCreate) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactCreate) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *BaseArtifactCreate) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseArtifactCreate) SetDescription(v string) { - o.Description = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseArtifactCreate) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactCreate) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *BaseArtifactCreate) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseArtifactCreate) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *BaseArtifactCreate) GetUri() string { - if o == nil || IsNil(o.Uri) { - var ret string - return ret - } - return *o.Uri -} - -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactCreate) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { - return nil, false - } - return o.Uri, true -} - -// HasUri returns a boolean if a field has been set. -func (o *BaseArtifactCreate) HasUri() bool { - if o != nil && !IsNil(o.Uri) { - return true - } - - return false -} - -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *BaseArtifactCreate) SetUri(v string) { - o.Uri = &v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *BaseArtifactCreate) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactCreate) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *BaseArtifactCreate) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *BaseArtifactCreate) SetState(v ArtifactState) { - o.State = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *BaseArtifactCreate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactCreate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *BaseArtifactCreate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *BaseArtifactCreate) SetName(v string) { - o.Name = &v -} - -func (o BaseArtifactCreate) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BaseArtifactCreate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri - } - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableBaseArtifactCreate struct { - value *BaseArtifactCreate - isSet bool -} - -func (v NullableBaseArtifactCreate) Get() *BaseArtifactCreate { - return v.value -} - -func (v *NullableBaseArtifactCreate) Set(val *BaseArtifactCreate) { - v.value = val - v.isSet = true -} - -func (v NullableBaseArtifactCreate) IsSet() bool { - return v.isSet -} - -func (v *NullableBaseArtifactCreate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBaseArtifactCreate(val *BaseArtifactCreate) *NullableBaseArtifactCreate { - return &NullableBaseArtifactCreate{value: val, isSet: true} -} - -func (v NullableBaseArtifactCreate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBaseArtifactCreate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/openapi/model_base_artifact_update.go b/pkg/openapi/model_base_artifact_update.go deleted file mode 100644 index 2042402b..00000000 --- a/pkg/openapi/model_base_artifact_update.go +++ /dev/null @@ -1,276 +0,0 @@ -/* -Model Registry REST API - -REST API for Model Registry to create and manage ML model metadata - -API version: v1alpha3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// checks if the BaseArtifactUpdate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseArtifactUpdate{} - -// BaseArtifactUpdate struct for BaseArtifactUpdate -type BaseArtifactUpdate struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. - Uri *string `json:"uri,omitempty"` - State *ArtifactState `json:"state,omitempty"` -} - -// NewBaseArtifactUpdate instantiates a new BaseArtifactUpdate object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBaseArtifactUpdate() *BaseArtifactUpdate { - this := BaseArtifactUpdate{} - var state ArtifactState = ARTIFACTSTATE_UNKNOWN - this.State = &state - return &this -} - -// NewBaseArtifactUpdateWithDefaults instantiates a new BaseArtifactUpdate object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBaseArtifactUpdateWithDefaults() *BaseArtifactUpdate { - this := BaseArtifactUpdate{} - var state ArtifactState = ARTIFACTSTATE_UNKNOWN - this.State = &state - return &this -} - -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseArtifactUpdate) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue - return ret - } - return *o.CustomProperties -} - -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { - return nil, false - } - return o.CustomProperties, true -} - -// HasCustomProperties returns a boolean if a field has been set. -func (o *BaseArtifactUpdate) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { - return true - } - - return false -} - -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseArtifactUpdate) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseArtifactUpdate) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactUpdate) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *BaseArtifactUpdate) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseArtifactUpdate) SetDescription(v string) { - o.Description = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseArtifactUpdate) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactUpdate) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *BaseArtifactUpdate) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseArtifactUpdate) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *BaseArtifactUpdate) GetUri() string { - if o == nil || IsNil(o.Uri) { - var ret string - return ret - } - return *o.Uri -} - -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactUpdate) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { - return nil, false - } - return o.Uri, true -} - -// HasUri returns a boolean if a field has been set. -func (o *BaseArtifactUpdate) HasUri() bool { - if o != nil && !IsNil(o.Uri) { - return true - } - - return false -} - -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *BaseArtifactUpdate) SetUri(v string) { - o.Uri = &v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *BaseArtifactUpdate) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseArtifactUpdate) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *BaseArtifactUpdate) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *BaseArtifactUpdate) SetState(v ArtifactState) { - o.State = &v -} - -func (o BaseArtifactUpdate) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BaseArtifactUpdate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri - } - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - return toSerialize, nil -} - -type NullableBaseArtifactUpdate struct { - value *BaseArtifactUpdate - isSet bool -} - -func (v NullableBaseArtifactUpdate) Get() *BaseArtifactUpdate { - return v.value -} - -func (v *NullableBaseArtifactUpdate) Set(val *BaseArtifactUpdate) { - v.value = val - v.isSet = true -} - -func (v NullableBaseArtifactUpdate) IsSet() bool { - return v.isSet -} - -func (v *NullableBaseArtifactUpdate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBaseArtifactUpdate(val *BaseArtifactUpdate) *NullableBaseArtifactUpdate { - return &NullableBaseArtifactUpdate{value: val, isSet: true} -} - -func (v NullableBaseArtifactUpdate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBaseArtifactUpdate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/openapi/model_base_execution.go b/pkg/openapi/model_base_execution.go deleted file mode 100644 index 879d63a1..00000000 --- a/pkg/openapi/model_base_execution.go +++ /dev/null @@ -1,387 +0,0 @@ -/* -Model Registry REST API - -REST API for Model Registry to create and manage ML model metadata - -API version: v1alpha3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// checks if the BaseExecution type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseExecution{} - -// BaseExecution struct for BaseExecution -type BaseExecution struct { - LastKnownState *ExecutionState `json:"lastKnownState,omitempty"` - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` - // Output only. The unique server generated id of the resource. - Id *string `json:"id,omitempty"` - // Output only. Create time of the resource in millisecond since epoch. - CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` - // Output only. Last update time of the resource since epoch in millisecond since epoch. - LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` -} - -// NewBaseExecution instantiates a new BaseExecution object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBaseExecution() *BaseExecution { - this := BaseExecution{} - var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN - this.LastKnownState = &lastKnownState - return &this -} - -// NewBaseExecutionWithDefaults instantiates a new BaseExecution object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBaseExecutionWithDefaults() *BaseExecution { - this := BaseExecution{} - var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN - this.LastKnownState = &lastKnownState - return &this -} - -// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise. -func (o *BaseExecution) GetLastKnownState() ExecutionState { - if o == nil || IsNil(o.LastKnownState) { - var ret ExecutionState - return ret - } - return *o.LastKnownState -} - -// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecution) GetLastKnownStateOk() (*ExecutionState, bool) { - if o == nil || IsNil(o.LastKnownState) { - return nil, false - } - return o.LastKnownState, true -} - -// HasLastKnownState returns a boolean if a field has been set. -func (o *BaseExecution) HasLastKnownState() bool { - if o != nil && !IsNil(o.LastKnownState) { - return true - } - - return false -} - -// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field. -func (o *BaseExecution) SetLastKnownState(v ExecutionState) { - o.LastKnownState = &v -} - -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseExecution) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue - return ret - } - return *o.CustomProperties -} - -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecution) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { - return nil, false - } - return o.CustomProperties, true -} - -// HasCustomProperties returns a boolean if a field has been set. -func (o *BaseExecution) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { - return true - } - - return false -} - -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseExecution) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseExecution) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecution) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *BaseExecution) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseExecution) SetDescription(v string) { - o.Description = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseExecution) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecution) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *BaseExecution) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseExecution) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *BaseExecution) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecution) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *BaseExecution) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *BaseExecution) SetName(v string) { - o.Name = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *BaseExecution) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecution) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *BaseExecution) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *BaseExecution) SetId(v string) { - o.Id = &v -} - -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *BaseExecution) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { - var ret string - return ret - } - return *o.CreateTimeSinceEpoch -} - -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecution) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { - return nil, false - } - return o.CreateTimeSinceEpoch, true -} - -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *BaseExecution) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { - return true - } - - return false -} - -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *BaseExecution) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v -} - -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *BaseExecution) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { - var ret string - return ret - } - return *o.LastUpdateTimeSinceEpoch -} - -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecution) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { - return nil, false - } - return o.LastUpdateTimeSinceEpoch, true -} - -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *BaseExecution) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { - return true - } - - return false -} - -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *BaseExecution) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v -} - -func (o BaseExecution) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BaseExecution) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.LastKnownState) { - toSerialize["lastKnownState"] = o.LastKnownState - } - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.CreateTimeSinceEpoch) { - toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch - } - if !IsNil(o.LastUpdateTimeSinceEpoch) { - toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch - } - return toSerialize, nil -} - -type NullableBaseExecution struct { - value *BaseExecution - isSet bool -} - -func (v NullableBaseExecution) Get() *BaseExecution { - return v.value -} - -func (v *NullableBaseExecution) Set(val *BaseExecution) { - v.value = val - v.isSet = true -} - -func (v NullableBaseExecution) IsSet() bool { - return v.isSet -} - -func (v *NullableBaseExecution) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBaseExecution(val *BaseExecution) *NullableBaseExecution { - return &NullableBaseExecution{value: val, isSet: true} -} - -func (v NullableBaseExecution) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBaseExecution) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/openapi/model_base_execution_create.go b/pkg/openapi/model_base_execution_create.go deleted file mode 100644 index e2f8d405..00000000 --- a/pkg/openapi/model_base_execution_create.go +++ /dev/null @@ -1,276 +0,0 @@ -/* -Model Registry REST API - -REST API for Model Registry to create and manage ML model metadata - -API version: v1alpha3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// checks if the BaseExecutionCreate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseExecutionCreate{} - -// BaseExecutionCreate struct for BaseExecutionCreate -type BaseExecutionCreate struct { - LastKnownState *ExecutionState `json:"lastKnownState,omitempty"` - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` -} - -// NewBaseExecutionCreate instantiates a new BaseExecutionCreate object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBaseExecutionCreate() *BaseExecutionCreate { - this := BaseExecutionCreate{} - var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN - this.LastKnownState = &lastKnownState - return &this -} - -// NewBaseExecutionCreateWithDefaults instantiates a new BaseExecutionCreate object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBaseExecutionCreateWithDefaults() *BaseExecutionCreate { - this := BaseExecutionCreate{} - var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN - this.LastKnownState = &lastKnownState - return &this -} - -// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise. -func (o *BaseExecutionCreate) GetLastKnownState() ExecutionState { - if o == nil || IsNil(o.LastKnownState) { - var ret ExecutionState - return ret - } - return *o.LastKnownState -} - -// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionCreate) GetLastKnownStateOk() (*ExecutionState, bool) { - if o == nil || IsNil(o.LastKnownState) { - return nil, false - } - return o.LastKnownState, true -} - -// HasLastKnownState returns a boolean if a field has been set. -func (o *BaseExecutionCreate) HasLastKnownState() bool { - if o != nil && !IsNil(o.LastKnownState) { - return true - } - - return false -} - -// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field. -func (o *BaseExecutionCreate) SetLastKnownState(v ExecutionState) { - o.LastKnownState = &v -} - -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseExecutionCreate) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue - return ret - } - return *o.CustomProperties -} - -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { - return nil, false - } - return o.CustomProperties, true -} - -// HasCustomProperties returns a boolean if a field has been set. -func (o *BaseExecutionCreate) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { - return true - } - - return false -} - -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseExecutionCreate) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseExecutionCreate) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionCreate) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *BaseExecutionCreate) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseExecutionCreate) SetDescription(v string) { - o.Description = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseExecutionCreate) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionCreate) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *BaseExecutionCreate) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseExecutionCreate) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *BaseExecutionCreate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionCreate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *BaseExecutionCreate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *BaseExecutionCreate) SetName(v string) { - o.Name = &v -} - -func (o BaseExecutionCreate) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BaseExecutionCreate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.LastKnownState) { - toSerialize["lastKnownState"] = o.LastKnownState - } - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableBaseExecutionCreate struct { - value *BaseExecutionCreate - isSet bool -} - -func (v NullableBaseExecutionCreate) Get() *BaseExecutionCreate { - return v.value -} - -func (v *NullableBaseExecutionCreate) Set(val *BaseExecutionCreate) { - v.value = val - v.isSet = true -} - -func (v NullableBaseExecutionCreate) IsSet() bool { - return v.isSet -} - -func (v *NullableBaseExecutionCreate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBaseExecutionCreate(val *BaseExecutionCreate) *NullableBaseExecutionCreate { - return &NullableBaseExecutionCreate{value: val, isSet: true} -} - -func (v NullableBaseExecutionCreate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBaseExecutionCreate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/openapi/model_base_execution_update.go b/pkg/openapi/model_base_execution_update.go deleted file mode 100644 index aab74c8e..00000000 --- a/pkg/openapi/model_base_execution_update.go +++ /dev/null @@ -1,239 +0,0 @@ -/* -Model Registry REST API - -REST API for Model Registry to create and manage ML model metadata - -API version: v1alpha3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// checks if the BaseExecutionUpdate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseExecutionUpdate{} - -// BaseExecutionUpdate struct for BaseExecutionUpdate -type BaseExecutionUpdate struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - LastKnownState *ExecutionState `json:"lastKnownState,omitempty"` -} - -// NewBaseExecutionUpdate instantiates a new BaseExecutionUpdate object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBaseExecutionUpdate() *BaseExecutionUpdate { - this := BaseExecutionUpdate{} - var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN - this.LastKnownState = &lastKnownState - return &this -} - -// NewBaseExecutionUpdateWithDefaults instantiates a new BaseExecutionUpdate object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBaseExecutionUpdateWithDefaults() *BaseExecutionUpdate { - this := BaseExecutionUpdate{} - var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN - this.LastKnownState = &lastKnownState - return &this -} - -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseExecutionUpdate) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue - return ret - } - return *o.CustomProperties -} - -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { - return nil, false - } - return o.CustomProperties, true -} - -// HasCustomProperties returns a boolean if a field has been set. -func (o *BaseExecutionUpdate) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { - return true - } - - return false -} - -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseExecutionUpdate) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseExecutionUpdate) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionUpdate) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *BaseExecutionUpdate) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseExecutionUpdate) SetDescription(v string) { - o.Description = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseExecutionUpdate) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionUpdate) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *BaseExecutionUpdate) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseExecutionUpdate) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise. -func (o *BaseExecutionUpdate) GetLastKnownState() ExecutionState { - if o == nil || IsNil(o.LastKnownState) { - var ret ExecutionState - return ret - } - return *o.LastKnownState -} - -// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseExecutionUpdate) GetLastKnownStateOk() (*ExecutionState, bool) { - if o == nil || IsNil(o.LastKnownState) { - return nil, false - } - return o.LastKnownState, true -} - -// HasLastKnownState returns a boolean if a field has been set. -func (o *BaseExecutionUpdate) HasLastKnownState() bool { - if o != nil && !IsNil(o.LastKnownState) { - return true - } - - return false -} - -// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field. -func (o *BaseExecutionUpdate) SetLastKnownState(v ExecutionState) { - o.LastKnownState = &v -} - -func (o BaseExecutionUpdate) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BaseExecutionUpdate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.LastKnownState) { - toSerialize["lastKnownState"] = o.LastKnownState - } - return toSerialize, nil -} - -type NullableBaseExecutionUpdate struct { - value *BaseExecutionUpdate - isSet bool -} - -func (v NullableBaseExecutionUpdate) Get() *BaseExecutionUpdate { - return v.value -} - -func (v *NullableBaseExecutionUpdate) Set(val *BaseExecutionUpdate) { - v.value = val - v.isSet = true -} - -func (v NullableBaseExecutionUpdate) IsSet() bool { - return v.isSet -} - -func (v *NullableBaseExecutionUpdate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBaseExecutionUpdate(val *BaseExecutionUpdate) *NullableBaseExecutionUpdate { - return &NullableBaseExecutionUpdate{value: val, isSet: true} -} - -func (v NullableBaseExecutionUpdate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBaseExecutionUpdate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/openapi/model_base_resource.go b/pkg/openapi/model_base_resource.go deleted file mode 100644 index d89b081c..00000000 --- a/pkg/openapi/model_base_resource.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -Model Registry REST API - -REST API for Model Registry to create and manage ML model metadata - -API version: v1alpha3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// checks if the BaseResource type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseResource{} - -// BaseResource struct for BaseResource -type BaseResource struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` - // Output only. The unique server generated id of the resource. - Id *string `json:"id,omitempty"` - // Output only. Create time of the resource in millisecond since epoch. - CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` - // Output only. Last update time of the resource since epoch in millisecond since epoch. - LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` -} - -// NewBaseResource instantiates a new BaseResource object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBaseResource() *BaseResource { - this := BaseResource{} - return &this -} - -// NewBaseResourceWithDefaults instantiates a new BaseResource object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBaseResourceWithDefaults() *BaseResource { - this := BaseResource{} - return &this -} - -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseResource) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue - return ret - } - return *o.CustomProperties -} - -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResource) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { - return nil, false - } - return o.CustomProperties, true -} - -// HasCustomProperties returns a boolean if a field has been set. -func (o *BaseResource) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { - return true - } - - return false -} - -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseResource) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseResource) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResource) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *BaseResource) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseResource) SetDescription(v string) { - o.Description = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseResource) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResource) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *BaseResource) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseResource) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *BaseResource) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResource) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *BaseResource) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *BaseResource) SetName(v string) { - o.Name = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *BaseResource) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResource) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *BaseResource) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *BaseResource) SetId(v string) { - o.Id = &v -} - -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *BaseResource) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { - var ret string - return ret - } - return *o.CreateTimeSinceEpoch -} - -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResource) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { - return nil, false - } - return o.CreateTimeSinceEpoch, true -} - -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *BaseResource) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { - return true - } - - return false -} - -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *BaseResource) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v -} - -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *BaseResource) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { - var ret string - return ret - } - return *o.LastUpdateTimeSinceEpoch -} - -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResource) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { - return nil, false - } - return o.LastUpdateTimeSinceEpoch, true -} - -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *BaseResource) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { - return true - } - - return false -} - -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *BaseResource) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v -} - -func (o BaseResource) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BaseResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.CreateTimeSinceEpoch) { - toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch - } - if !IsNil(o.LastUpdateTimeSinceEpoch) { - toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch - } - return toSerialize, nil -} - -type NullableBaseResource struct { - value *BaseResource - isSet bool -} - -func (v NullableBaseResource) Get() *BaseResource { - return v.value -} - -func (v *NullableBaseResource) Set(val *BaseResource) { - v.value = val - v.isSet = true -} - -func (v NullableBaseResource) IsSet() bool { - return v.isSet -} - -func (v *NullableBaseResource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBaseResource(val *BaseResource) *NullableBaseResource { - return &NullableBaseResource{value: val, isSet: true} -} - -func (v NullableBaseResource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBaseResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/openapi/model_base_resource_create.go b/pkg/openapi/model_base_resource_create.go deleted file mode 100644 index 5e52e505..00000000 --- a/pkg/openapi/model_base_resource_create.go +++ /dev/null @@ -1,236 +0,0 @@ -/* -Model Registry REST API - -REST API for Model Registry to create and manage ML model metadata - -API version: v1alpha3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// checks if the BaseResourceCreate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseResourceCreate{} - -// BaseResourceCreate struct for BaseResourceCreate -type BaseResourceCreate struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` -} - -// NewBaseResourceCreate instantiates a new BaseResourceCreate object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBaseResourceCreate() *BaseResourceCreate { - this := BaseResourceCreate{} - return &this -} - -// NewBaseResourceCreateWithDefaults instantiates a new BaseResourceCreate object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBaseResourceCreateWithDefaults() *BaseResourceCreate { - this := BaseResourceCreate{} - return &this -} - -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseResourceCreate) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue - return ret - } - return *o.CustomProperties -} - -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResourceCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { - return nil, false - } - return o.CustomProperties, true -} - -// HasCustomProperties returns a boolean if a field has been set. -func (o *BaseResourceCreate) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { - return true - } - - return false -} - -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseResourceCreate) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseResourceCreate) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResourceCreate) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *BaseResourceCreate) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseResourceCreate) SetDescription(v string) { - o.Description = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseResourceCreate) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResourceCreate) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *BaseResourceCreate) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseResourceCreate) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *BaseResourceCreate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BaseResourceCreate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *BaseResourceCreate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *BaseResourceCreate) SetName(v string) { - o.Name = &v -} - -func (o BaseResourceCreate) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BaseResourceCreate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableBaseResourceCreate struct { - value *BaseResourceCreate - isSet bool -} - -func (v NullableBaseResourceCreate) Get() *BaseResourceCreate { - return v.value -} - -func (v *NullableBaseResourceCreate) Set(val *BaseResourceCreate) { - v.value = val - v.isSet = true -} - -func (v NullableBaseResourceCreate) IsSet() bool { - return v.isSet -} - -func (v *NullableBaseResourceCreate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBaseResourceCreate(val *BaseResourceCreate) *NullableBaseResourceCreate { - return &NullableBaseResourceCreate{value: val, isSet: true} -} - -func (v NullableBaseResourceCreate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBaseResourceCreate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/pkg/openapi/model_doc_artifact.go b/pkg/openapi/model_doc_artifact.go index 3c66bcce..845d6373 100644 --- a/pkg/openapi/model_doc_artifact.go +++ b/pkg/openapi/model_doc_artifact.go @@ -20,23 +20,23 @@ var _ MappedNullable = &DocArtifact{} // DocArtifact A document. type DocArtifact struct { ArtifactType string `json:"artifactType"` - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. Uri *string `json:"uri,omitempty"` State *ArtifactState `json:"state,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // Output only. The unique server generated id of the resource. Id *string `json:"id,omitempty"` // Output only. Create time of the resource in millisecond since epoch. CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` // Output only. Last update time of the resource since epoch in millisecond since epoch. LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` + // User provided custom properties which are not defined by its type. + CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` + // An optional description about the resource. + Description *string `json:"description,omitempty"` + // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. + ExternalId *string `json:"externalId,omitempty"` } // NewDocArtifact instantiates a new DocArtifact object @@ -86,164 +86,164 @@ func (o *DocArtifact) SetArtifactType(v string) { o.ArtifactType = v } -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *DocArtifact) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *DocArtifact) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string return ret } - return *o.CustomProperties + return *o.Uri } -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DocArtifact) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { +func (o *DocArtifact) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { return nil, false } - return o.CustomProperties, true + return o.Uri, true } -// HasCustomProperties returns a boolean if a field has been set. -func (o *DocArtifact) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { +// HasUri returns a boolean if a field has been set. +func (o *DocArtifact) HasUri() bool { + if o != nil && !IsNil(o.Uri) { return true } return false } -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *DocArtifact) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *DocArtifact) SetUri(v string) { + o.Uri = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *DocArtifact) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string +// GetState returns the State field value if set, zero value otherwise. +func (o *DocArtifact) GetState() ArtifactState { + if o == nil || IsNil(o.State) { + var ret ArtifactState return ret } - return *o.Description + return *o.State } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DocArtifact) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { +func (o *DocArtifact) GetStateOk() (*ArtifactState, bool) { + if o == nil || IsNil(o.State) { return nil, false } - return o.Description, true + return o.State, true } -// HasDescription returns a boolean if a field has been set. -func (o *DocArtifact) HasDescription() bool { - if o != nil && !IsNil(o.Description) { +// HasState returns a boolean if a field has been set. +func (o *DocArtifact) HasState() bool { + if o != nil && !IsNil(o.State) { return true } return false } -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *DocArtifact) SetDescription(v string) { - o.Description = &v +// SetState gets a reference to the given ArtifactState and assigns it to the State field. +func (o *DocArtifact) SetState(v ArtifactState) { + o.State = &v } -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *DocArtifact) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { +// GetId returns the Id field value if set, zero value otherwise. +func (o *DocArtifact) GetId() string { + if o == nil || IsNil(o.Id) { var ret string return ret } - return *o.ExternalId + return *o.Id } -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DocArtifact) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { +func (o *DocArtifact) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { return nil, false } - return o.ExternalId, true + return o.Id, true } -// HasExternalId returns a boolean if a field has been set. -func (o *DocArtifact) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { +// HasId returns a boolean if a field has been set. +func (o *DocArtifact) HasId() bool { + if o != nil && !IsNil(o.Id) { return true } return false } -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *DocArtifact) SetExternalId(v string) { - o.ExternalId = &v +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *DocArtifact) SetId(v string) { + o.Id = &v } -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *DocArtifact) GetUri() string { - if o == nil || IsNil(o.Uri) { +// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. +func (o *DocArtifact) GetCreateTimeSinceEpoch() string { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { var ret string return ret } - return *o.Uri + return *o.CreateTimeSinceEpoch } -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DocArtifact) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { +func (o *DocArtifact) GetCreateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { return nil, false } - return o.Uri, true + return o.CreateTimeSinceEpoch, true } -// HasUri returns a boolean if a field has been set. -func (o *DocArtifact) HasUri() bool { - if o != nil && !IsNil(o.Uri) { +// HasCreateTimeSinceEpoch returns a boolean if a field has been set. +func (o *DocArtifact) HasCreateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.CreateTimeSinceEpoch) { return true } return false } -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *DocArtifact) SetUri(v string) { - o.Uri = &v +// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. +func (o *DocArtifact) SetCreateTimeSinceEpoch(v string) { + o.CreateTimeSinceEpoch = &v } -// GetState returns the State field value if set, zero value otherwise. -func (o *DocArtifact) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState +// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. +func (o *DocArtifact) GetLastUpdateTimeSinceEpoch() string { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { + var ret string return ret } - return *o.State + return *o.LastUpdateTimeSinceEpoch } -// GetStateOk returns a tuple with the State field value if set, nil otherwise +// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DocArtifact) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { +func (o *DocArtifact) GetLastUpdateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { return nil, false } - return o.State, true + return o.LastUpdateTimeSinceEpoch, true } -// HasState returns a boolean if a field has been set. -func (o *DocArtifact) HasState() bool { - if o != nil && !IsNil(o.State) { +// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. +func (o *DocArtifact) HasLastUpdateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { return true } return false } -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *DocArtifact) SetState(v ArtifactState) { - o.State = &v +// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. +func (o *DocArtifact) SetLastUpdateTimeSinceEpoch(v string) { + o.LastUpdateTimeSinceEpoch = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -278,100 +278,100 @@ func (o *DocArtifact) SetName(v string) { o.Name = &v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *DocArtifact) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *DocArtifact) GetCustomProperties() map[string]MetadataValue { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]MetadataValue return ret } - return *o.Id + return *o.CustomProperties } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DocArtifact) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { +func (o *DocArtifact) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { + if o == nil || IsNil(o.CustomProperties) { return nil, false } - return o.Id, true + return o.CustomProperties, true } -// HasId returns a boolean if a field has been set. -func (o *DocArtifact) HasId() bool { - if o != nil && !IsNil(o.Id) { +// HasCustomProperties returns a boolean if a field has been set. +func (o *DocArtifact) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { return true } return false } -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *DocArtifact) SetId(v string) { - o.Id = &v +// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. +func (o *DocArtifact) SetCustomProperties(v map[string]MetadataValue) { + o.CustomProperties = &v } -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *DocArtifact) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DocArtifact) GetDescription() string { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.CreateTimeSinceEpoch + return *o.Description } -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DocArtifact) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +func (o *DocArtifact) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { return nil, false } - return o.CreateTimeSinceEpoch, true + return o.Description, true } -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *DocArtifact) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { +// HasDescription returns a boolean if a field has been set. +func (o *DocArtifact) HasDescription() bool { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *DocArtifact) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *DocArtifact) SetDescription(v string) { + o.Description = &v } -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *DocArtifact) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *DocArtifact) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.LastUpdateTimeSinceEpoch + return *o.ExternalId } -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DocArtifact) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +func (o *DocArtifact) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.LastUpdateTimeSinceEpoch, true + return o.ExternalId, true } -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *DocArtifact) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { +// HasExternalId returns a boolean if a field has been set. +func (o *DocArtifact) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { return true } return false } -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *DocArtifact) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *DocArtifact) SetExternalId(v string) { + o.ExternalId = &v } func (o DocArtifact) MarshalJSON() ([]byte, error) { @@ -385,24 +385,12 @@ func (o DocArtifact) MarshalJSON() ([]byte, error) { func (o DocArtifact) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["artifactType"] = o.ArtifactType - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri } if !IsNil(o.State) { toSerialize["state"] = o.State } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -412,6 +400,18 @@ func (o DocArtifact) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastUpdateTimeSinceEpoch) { toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CustomProperties) { + toSerialize["customProperties"] = o.CustomProperties + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId + } return toSerialize, nil } diff --git a/pkg/openapi/model_inference_service.go b/pkg/openapi/model_inference_service.go index 04dbbd45..ddc5fd65 100644 --- a/pkg/openapi/model_inference_service.go +++ b/pkg/openapi/model_inference_service.go @@ -19,20 +19,20 @@ var _ MappedNullable = &InferenceService{} // InferenceService An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. type InferenceService struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // Output only. The unique server generated id of the resource. Id *string `json:"id,omitempty"` // Output only. Create time of the resource in millisecond since epoch. CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` // Output only. Last update time of the resource since epoch in millisecond since epoch. LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` + // User provided custom properties which are not defined by its type. + CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` + // An optional description about the resource. + Description *string `json:"description,omitempty"` + // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. + ExternalId *string `json:"externalId,omitempty"` // ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served. ModelVersionId *string `json:"modelVersionId,omitempty"` // Model runtime. @@ -67,100 +67,100 @@ func NewInferenceServiceWithDefaults() *InferenceService { return &this } -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *InferenceService) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue +// GetId returns the Id field value if set, zero value otherwise. +func (o *InferenceService) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string return ret } - return *o.CustomProperties + return *o.Id } -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InferenceService) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { +func (o *InferenceService) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { return nil, false } - return o.CustomProperties, true + return o.Id, true } -// HasCustomProperties returns a boolean if a field has been set. -func (o *InferenceService) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { +// HasId returns a boolean if a field has been set. +func (o *InferenceService) HasId() bool { + if o != nil && !IsNil(o.Id) { return true } return false } -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *InferenceService) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *InferenceService) SetId(v string) { + o.Id = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *InferenceService) GetDescription() string { - if o == nil || IsNil(o.Description) { +// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. +func (o *InferenceService) GetCreateTimeSinceEpoch() string { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { var ret string return ret } - return *o.Description + return *o.CreateTimeSinceEpoch } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InferenceService) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { +func (o *InferenceService) GetCreateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { return nil, false } - return o.Description, true + return o.CreateTimeSinceEpoch, true } -// HasDescription returns a boolean if a field has been set. -func (o *InferenceService) HasDescription() bool { - if o != nil && !IsNil(o.Description) { +// HasCreateTimeSinceEpoch returns a boolean if a field has been set. +func (o *InferenceService) HasCreateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.CreateTimeSinceEpoch) { return true } return false } -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *InferenceService) SetDescription(v string) { - o.Description = &v +// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. +func (o *InferenceService) SetCreateTimeSinceEpoch(v string) { + o.CreateTimeSinceEpoch = &v } -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *InferenceService) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { +// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. +func (o *InferenceService) GetLastUpdateTimeSinceEpoch() string { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { var ret string return ret } - return *o.ExternalId + return *o.LastUpdateTimeSinceEpoch } -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InferenceService) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { +func (o *InferenceService) GetLastUpdateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { return nil, false } - return o.ExternalId, true + return o.LastUpdateTimeSinceEpoch, true } -// HasExternalId returns a boolean if a field has been set. -func (o *InferenceService) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { +// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. +func (o *InferenceService) HasLastUpdateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { return true } return false } -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *InferenceService) SetExternalId(v string) { - o.ExternalId = &v +// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. +func (o *InferenceService) SetLastUpdateTimeSinceEpoch(v string) { + o.LastUpdateTimeSinceEpoch = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -195,100 +195,100 @@ func (o *InferenceService) SetName(v string) { o.Name = &v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *InferenceService) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *InferenceService) GetCustomProperties() map[string]MetadataValue { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]MetadataValue return ret } - return *o.Id + return *o.CustomProperties } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InferenceService) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { +func (o *InferenceService) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { + if o == nil || IsNil(o.CustomProperties) { return nil, false } - return o.Id, true + return o.CustomProperties, true } -// HasId returns a boolean if a field has been set. -func (o *InferenceService) HasId() bool { - if o != nil && !IsNil(o.Id) { +// HasCustomProperties returns a boolean if a field has been set. +func (o *InferenceService) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { return true } return false } -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *InferenceService) SetId(v string) { - o.Id = &v +// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. +func (o *InferenceService) SetCustomProperties(v map[string]MetadataValue) { + o.CustomProperties = &v } -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *InferenceService) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *InferenceService) GetDescription() string { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.CreateTimeSinceEpoch + return *o.Description } -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InferenceService) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +func (o *InferenceService) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { return nil, false } - return o.CreateTimeSinceEpoch, true + return o.Description, true } -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *InferenceService) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { +// HasDescription returns a boolean if a field has been set. +func (o *InferenceService) HasDescription() bool { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *InferenceService) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *InferenceService) SetDescription(v string) { + o.Description = &v } -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *InferenceService) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *InferenceService) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.LastUpdateTimeSinceEpoch + return *o.ExternalId } -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *InferenceService) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +func (o *InferenceService) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.LastUpdateTimeSinceEpoch, true + return o.ExternalId, true } -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *InferenceService) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { +// HasExternalId returns a boolean if a field has been set. +func (o *InferenceService) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { return true } return false } -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *InferenceService) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *InferenceService) SetExternalId(v string) { + o.ExternalId = &v } // GetModelVersionId returns the ModelVersionId field value if set, zero value otherwise. @@ -445,18 +445,6 @@ func (o InferenceService) MarshalJSON() ([]byte, error) { func (o InferenceService) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -466,6 +454,18 @@ func (o InferenceService) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastUpdateTimeSinceEpoch) { toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CustomProperties) { + toSerialize["customProperties"] = o.CustomProperties + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId + } if !IsNil(o.ModelVersionId) { toSerialize["modelVersionId"] = o.ModelVersionId } diff --git a/pkg/openapi/model_inference_service_create.go b/pkg/openapi/model_inference_service_create.go index 9f15b21e..cc26cc0d 100644 --- a/pkg/openapi/model_inference_service_create.go +++ b/pkg/openapi/model_inference_service_create.go @@ -19,14 +19,14 @@ var _ MappedNullable = &InferenceServiceCreate{} // InferenceServiceCreate An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. type InferenceServiceCreate struct { + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. Description *string `json:"description,omitempty"` // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served. ModelVersionId *string `json:"modelVersionId,omitempty"` // Model runtime. @@ -61,6 +61,38 @@ func NewInferenceServiceCreateWithDefaults() *InferenceServiceCreate { return &this } +// GetName returns the Name field value if set, zero value otherwise. +func (o *InferenceServiceCreate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InferenceServiceCreate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InferenceServiceCreate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InferenceServiceCreate) SetName(v string) { + o.Name = &v +} + // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. func (o *InferenceServiceCreate) GetCustomProperties() map[string]MetadataValue { if o == nil || IsNil(o.CustomProperties) { @@ -157,38 +189,6 @@ func (o *InferenceServiceCreate) SetExternalId(v string) { o.ExternalId = &v } -// GetName returns the Name field value if set, zero value otherwise. -func (o *InferenceServiceCreate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InferenceServiceCreate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *InferenceServiceCreate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *InferenceServiceCreate) SetName(v string) { - o.Name = &v -} - // GetModelVersionId returns the ModelVersionId field value if set, zero value otherwise. func (o *InferenceServiceCreate) GetModelVersionId() string { if o == nil || IsNil(o.ModelVersionId) { @@ -343,6 +343,9 @@ func (o InferenceServiceCreate) MarshalJSON() ([]byte, error) { func (o InferenceServiceCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties } @@ -352,9 +355,6 @@ func (o InferenceServiceCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.ModelVersionId) { toSerialize["modelVersionId"] = o.ModelVersionId } diff --git a/pkg/openapi/model_inference_service_list.go b/pkg/openapi/model_inference_service_list.go index 48e6cffa..c9b5da46 100644 --- a/pkg/openapi/model_inference_service_list.go +++ b/pkg/openapi/model_inference_service_list.go @@ -19,14 +19,14 @@ var _ MappedNullable = &InferenceServiceList{} // InferenceServiceList List of InferenceServices. type InferenceServiceList struct { + // + Items []InferenceService `json:"items,omitempty"` // Token to use to retrieve next page of results. NextPageToken string `json:"nextPageToken"` // Maximum number of resources to return in the result. PageSize int32 `json:"pageSize"` // Number of items in result list. Size int32 `json:"size"` - // - Items []InferenceService `json:"items,omitempty"` } // NewInferenceServiceList instantiates a new InferenceServiceList object @@ -49,6 +49,38 @@ func NewInferenceServiceListWithDefaults() *InferenceServiceList { return &this } +// GetItems returns the Items field value if set, zero value otherwise. +func (o *InferenceServiceList) GetItems() []InferenceService { + if o == nil || IsNil(o.Items) { + var ret []InferenceService + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InferenceServiceList) GetItemsOk() ([]InferenceService, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *InferenceServiceList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []InferenceService and assigns it to the Items field. +func (o *InferenceServiceList) SetItems(v []InferenceService) { + o.Items = v +} + // GetNextPageToken returns the NextPageToken field value func (o *InferenceServiceList) GetNextPageToken() string { if o == nil { @@ -121,38 +153,6 @@ func (o *InferenceServiceList) SetSize(v int32) { o.Size = v } -// GetItems returns the Items field value if set, zero value otherwise. -func (o *InferenceServiceList) GetItems() []InferenceService { - if o == nil || IsNil(o.Items) { - var ret []InferenceService - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InferenceServiceList) GetItemsOk() ([]InferenceService, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *InferenceServiceList) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []InferenceService and assigns it to the Items field. -func (o *InferenceServiceList) SetItems(v []InferenceService) { - o.Items = v -} - func (o InferenceServiceList) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -163,12 +163,12 @@ func (o InferenceServiceList) MarshalJSON() ([]byte, error) { func (o InferenceServiceList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["nextPageToken"] = o.NextPageToken - toSerialize["pageSize"] = o.PageSize - toSerialize["size"] = o.Size if !IsNil(o.Items) { toSerialize["items"] = o.Items } + toSerialize["nextPageToken"] = o.NextPageToken + toSerialize["pageSize"] = o.PageSize + toSerialize["size"] = o.Size return toSerialize, nil } diff --git a/pkg/openapi/model_model_artifact.go b/pkg/openapi/model_model_artifact.go index 202c8d5c..bc4d10a8 100644 --- a/pkg/openapi/model_model_artifact.go +++ b/pkg/openapi/model_model_artifact.go @@ -20,23 +20,23 @@ var _ MappedNullable = &ModelArtifact{} // ModelArtifact An ML model artifact. type ModelArtifact struct { ArtifactType string `json:"artifactType"` - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. Uri *string `json:"uri,omitempty"` State *ArtifactState `json:"state,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // Output only. The unique server generated id of the resource. Id *string `json:"id,omitempty"` // Output only. Create time of the resource in millisecond since epoch. CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` // Output only. Last update time of the resource since epoch in millisecond since epoch. LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` + // User provided custom properties which are not defined by its type. + CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` + // An optional description about the resource. + Description *string `json:"description,omitempty"` + // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. + ExternalId *string `json:"externalId,omitempty"` // Name of the model format. ModelFormatName *string `json:"modelFormatName,omitempty"` // Storage secret name. @@ -96,164 +96,164 @@ func (o *ModelArtifact) SetArtifactType(v string) { o.ArtifactType = v } -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *ModelArtifact) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *ModelArtifact) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string return ret } - return *o.CustomProperties + return *o.Uri } -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifact) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { +func (o *ModelArtifact) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { return nil, false } - return o.CustomProperties, true + return o.Uri, true } -// HasCustomProperties returns a boolean if a field has been set. -func (o *ModelArtifact) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { +// HasUri returns a boolean if a field has been set. +func (o *ModelArtifact) HasUri() bool { + if o != nil && !IsNil(o.Uri) { return true } return false } -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *ModelArtifact) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *ModelArtifact) SetUri(v string) { + o.Uri = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ModelArtifact) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string +// GetState returns the State field value if set, zero value otherwise. +func (o *ModelArtifact) GetState() ArtifactState { + if o == nil || IsNil(o.State) { + var ret ArtifactState return ret } - return *o.Description + return *o.State } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifact) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { +func (o *ModelArtifact) GetStateOk() (*ArtifactState, bool) { + if o == nil || IsNil(o.State) { return nil, false } - return o.Description, true + return o.State, true } -// HasDescription returns a boolean if a field has been set. -func (o *ModelArtifact) HasDescription() bool { - if o != nil && !IsNil(o.Description) { +// HasState returns a boolean if a field has been set. +func (o *ModelArtifact) HasState() bool { + if o != nil && !IsNil(o.State) { return true } return false } -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ModelArtifact) SetDescription(v string) { - o.Description = &v +// SetState gets a reference to the given ArtifactState and assigns it to the State field. +func (o *ModelArtifact) SetState(v ArtifactState) { + o.State = &v } -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *ModelArtifact) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { +// GetId returns the Id field value if set, zero value otherwise. +func (o *ModelArtifact) GetId() string { + if o == nil || IsNil(o.Id) { var ret string return ret } - return *o.ExternalId + return *o.Id } -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifact) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { +func (o *ModelArtifact) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { return nil, false } - return o.ExternalId, true + return o.Id, true } -// HasExternalId returns a boolean if a field has been set. -func (o *ModelArtifact) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { +// HasId returns a boolean if a field has been set. +func (o *ModelArtifact) HasId() bool { + if o != nil && !IsNil(o.Id) { return true } return false } -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *ModelArtifact) SetExternalId(v string) { - o.ExternalId = &v +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ModelArtifact) SetId(v string) { + o.Id = &v } -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *ModelArtifact) GetUri() string { - if o == nil || IsNil(o.Uri) { +// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. +func (o *ModelArtifact) GetCreateTimeSinceEpoch() string { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { var ret string return ret } - return *o.Uri + return *o.CreateTimeSinceEpoch } -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifact) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { +func (o *ModelArtifact) GetCreateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { return nil, false } - return o.Uri, true + return o.CreateTimeSinceEpoch, true } -// HasUri returns a boolean if a field has been set. -func (o *ModelArtifact) HasUri() bool { - if o != nil && !IsNil(o.Uri) { +// HasCreateTimeSinceEpoch returns a boolean if a field has been set. +func (o *ModelArtifact) HasCreateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.CreateTimeSinceEpoch) { return true } return false } -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *ModelArtifact) SetUri(v string) { - o.Uri = &v +// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. +func (o *ModelArtifact) SetCreateTimeSinceEpoch(v string) { + o.CreateTimeSinceEpoch = &v } -// GetState returns the State field value if set, zero value otherwise. -func (o *ModelArtifact) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState +// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. +func (o *ModelArtifact) GetLastUpdateTimeSinceEpoch() string { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { + var ret string return ret } - return *o.State + return *o.LastUpdateTimeSinceEpoch } -// GetStateOk returns a tuple with the State field value if set, nil otherwise +// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifact) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { +func (o *ModelArtifact) GetLastUpdateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { return nil, false } - return o.State, true + return o.LastUpdateTimeSinceEpoch, true } -// HasState returns a boolean if a field has been set. -func (o *ModelArtifact) HasState() bool { - if o != nil && !IsNil(o.State) { +// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. +func (o *ModelArtifact) HasLastUpdateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { return true } return false } -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *ModelArtifact) SetState(v ArtifactState) { - o.State = &v +// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. +func (o *ModelArtifact) SetLastUpdateTimeSinceEpoch(v string) { + o.LastUpdateTimeSinceEpoch = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -288,100 +288,100 @@ func (o *ModelArtifact) SetName(v string) { o.Name = &v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *ModelArtifact) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *ModelArtifact) GetCustomProperties() map[string]MetadataValue { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]MetadataValue return ret } - return *o.Id + return *o.CustomProperties } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifact) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { +func (o *ModelArtifact) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { + if o == nil || IsNil(o.CustomProperties) { return nil, false } - return o.Id, true + return o.CustomProperties, true } -// HasId returns a boolean if a field has been set. -func (o *ModelArtifact) HasId() bool { - if o != nil && !IsNil(o.Id) { +// HasCustomProperties returns a boolean if a field has been set. +func (o *ModelArtifact) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { return true } return false } -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *ModelArtifact) SetId(v string) { - o.Id = &v +// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. +func (o *ModelArtifact) SetCustomProperties(v map[string]MetadataValue) { + o.CustomProperties = &v } -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *ModelArtifact) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ModelArtifact) GetDescription() string { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.CreateTimeSinceEpoch + return *o.Description } -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifact) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +func (o *ModelArtifact) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { return nil, false } - return o.CreateTimeSinceEpoch, true + return o.Description, true } -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *ModelArtifact) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { +// HasDescription returns a boolean if a field has been set. +func (o *ModelArtifact) HasDescription() bool { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *ModelArtifact) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ModelArtifact) SetDescription(v string) { + o.Description = &v } -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *ModelArtifact) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ModelArtifact) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.LastUpdateTimeSinceEpoch + return *o.ExternalId } -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifact) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +func (o *ModelArtifact) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.LastUpdateTimeSinceEpoch, true + return o.ExternalId, true } -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *ModelArtifact) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { +// HasExternalId returns a boolean if a field has been set. +func (o *ModelArtifact) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { return true } return false } -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *ModelArtifact) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ModelArtifact) SetExternalId(v string) { + o.ExternalId = &v } // GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise. @@ -555,24 +555,12 @@ func (o ModelArtifact) MarshalJSON() ([]byte, error) { func (o ModelArtifact) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["artifactType"] = o.ArtifactType - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri } if !IsNil(o.State) { toSerialize["state"] = o.State } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -582,6 +570,18 @@ func (o ModelArtifact) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastUpdateTimeSinceEpoch) { toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CustomProperties) { + toSerialize["customProperties"] = o.CustomProperties + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId + } if !IsNil(o.ModelFormatName) { toSerialize["modelFormatName"] = o.ModelFormatName } diff --git a/pkg/openapi/model_model_artifact_create.go b/pkg/openapi/model_model_artifact_create.go index 7a07fdb1..f317491c 100644 --- a/pkg/openapi/model_model_artifact_create.go +++ b/pkg/openapi/model_model_artifact_create.go @@ -19,17 +19,6 @@ var _ MappedNullable = &ModelArtifactCreate{} // ModelArtifactCreate An ML model artifact. type ModelArtifactCreate struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. - Uri *string `json:"uri,omitempty"` - State *ArtifactState `json:"state,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // Name of the model format. ModelFormatName *string `json:"modelFormatName,omitempty"` // Storage secret name. @@ -40,6 +29,17 @@ type ModelArtifactCreate struct { ModelFormatVersion *string `json:"modelFormatVersion,omitempty"` // Name of the service account with storage secret. ServiceAccountName *string `json:"serviceAccountName,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` + // User provided custom properties which are not defined by its type. + CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` + // An optional description about the resource. + Description *string `json:"description,omitempty"` + // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. + ExternalId *string `json:"externalId,omitempty"` + // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. + Uri *string `json:"uri,omitempty"` + State *ArtifactState `json:"state,omitempty"` } // NewModelArtifactCreate instantiates a new ModelArtifactCreate object @@ -63,164 +63,164 @@ func NewModelArtifactCreateWithDefaults() *ModelArtifactCreate { return &this } -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue +// GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetModelFormatName() string { + if o == nil || IsNil(o.ModelFormatName) { + var ret string return ret } - return *o.CustomProperties + return *o.ModelFormatName } -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// GetModelFormatNameOk returns a tuple with the ModelFormatName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { +func (o *ModelArtifactCreate) GetModelFormatNameOk() (*string, bool) { + if o == nil || IsNil(o.ModelFormatName) { return nil, false } - return o.CustomProperties, true + return o.ModelFormatName, true } -// HasCustomProperties returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { +// HasModelFormatName returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasModelFormatName() bool { + if o != nil && !IsNil(o.ModelFormatName) { return true } return false } -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *ModelArtifactCreate) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v +// SetModelFormatName gets a reference to the given string and assigns it to the ModelFormatName field. +func (o *ModelArtifactCreate) SetModelFormatName(v string) { + o.ModelFormatName = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetDescription() string { - if o == nil || IsNil(o.Description) { +// GetStorageKey returns the StorageKey field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetStorageKey() string { + if o == nil || IsNil(o.StorageKey) { var ret string return ret } - return *o.Description + return *o.StorageKey } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { +func (o *ModelArtifactCreate) GetStorageKeyOk() (*string, bool) { + if o == nil || IsNil(o.StorageKey) { return nil, false } - return o.Description, true + return o.StorageKey, true } -// HasDescription returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasDescription() bool { - if o != nil && !IsNil(o.Description) { +// HasStorageKey returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasStorageKey() bool { + if o != nil && !IsNil(o.StorageKey) { return true } return false } -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ModelArtifactCreate) SetDescription(v string) { - o.Description = &v +// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field. +func (o *ModelArtifactCreate) SetStorageKey(v string) { + o.StorageKey = &v } -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { +// GetStoragePath returns the StoragePath field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetStoragePath() string { + if o == nil || IsNil(o.StoragePath) { var ret string return ret } - return *o.ExternalId + return *o.StoragePath } -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// GetStoragePathOk returns a tuple with the StoragePath field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { +func (o *ModelArtifactCreate) GetStoragePathOk() (*string, bool) { + if o == nil || IsNil(o.StoragePath) { return nil, false } - return o.ExternalId, true + return o.StoragePath, true } -// HasExternalId returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { +// HasStoragePath returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasStoragePath() bool { + if o != nil && !IsNil(o.StoragePath) { return true } return false } -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *ModelArtifactCreate) SetExternalId(v string) { - o.ExternalId = &v +// SetStoragePath gets a reference to the given string and assigns it to the StoragePath field. +func (o *ModelArtifactCreate) SetStoragePath(v string) { + o.StoragePath = &v } -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetUri() string { - if o == nil || IsNil(o.Uri) { +// GetModelFormatVersion returns the ModelFormatVersion field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetModelFormatVersion() string { + if o == nil || IsNil(o.ModelFormatVersion) { var ret string return ret } - return *o.Uri + return *o.ModelFormatVersion } -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// GetModelFormatVersionOk returns a tuple with the ModelFormatVersion field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { +func (o *ModelArtifactCreate) GetModelFormatVersionOk() (*string, bool) { + if o == nil || IsNil(o.ModelFormatVersion) { return nil, false } - return o.Uri, true + return o.ModelFormatVersion, true } -// HasUri returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasUri() bool { - if o != nil && !IsNil(o.Uri) { +// HasModelFormatVersion returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasModelFormatVersion() bool { + if o != nil && !IsNil(o.ModelFormatVersion) { return true } return false } -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *ModelArtifactCreate) SetUri(v string) { - o.Uri = &v +// SetModelFormatVersion gets a reference to the given string and assigns it to the ModelFormatVersion field. +func (o *ModelArtifactCreate) SetModelFormatVersion(v string) { + o.ModelFormatVersion = &v } -// GetState returns the State field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState +// GetServiceAccountName returns the ServiceAccountName field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetServiceAccountName() string { + if o == nil || IsNil(o.ServiceAccountName) { + var ret string return ret } - return *o.State + return *o.ServiceAccountName } -// GetStateOk returns a tuple with the State field value if set, nil otherwise +// GetServiceAccountNameOk returns a tuple with the ServiceAccountName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { +func (o *ModelArtifactCreate) GetServiceAccountNameOk() (*string, bool) { + if o == nil || IsNil(o.ServiceAccountName) { return nil, false } - return o.State, true + return o.ServiceAccountName, true } -// HasState returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasState() bool { - if o != nil && !IsNil(o.State) { +// HasServiceAccountName returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasServiceAccountName() bool { + if o != nil && !IsNil(o.ServiceAccountName) { return true } return false } -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *ModelArtifactCreate) SetState(v ArtifactState) { - o.State = &v +// SetServiceAccountName gets a reference to the given string and assigns it to the ServiceAccountName field. +func (o *ModelArtifactCreate) SetServiceAccountName(v string) { + o.ServiceAccountName = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -255,164 +255,164 @@ func (o *ModelArtifactCreate) SetName(v string) { o.Name = &v } -// GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetModelFormatName() string { - if o == nil || IsNil(o.ModelFormatName) { - var ret string +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetCustomProperties() map[string]MetadataValue { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]MetadataValue return ret } - return *o.ModelFormatName + return *o.CustomProperties } -// GetModelFormatNameOk returns a tuple with the ModelFormatName field value if set, nil otherwise +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetModelFormatNameOk() (*string, bool) { - if o == nil || IsNil(o.ModelFormatName) { +func (o *ModelArtifactCreate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { + if o == nil || IsNil(o.CustomProperties) { return nil, false } - return o.ModelFormatName, true + return o.CustomProperties, true } -// HasModelFormatName returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasModelFormatName() bool { - if o != nil && !IsNil(o.ModelFormatName) { +// HasCustomProperties returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { return true } return false } -// SetModelFormatName gets a reference to the given string and assigns it to the ModelFormatName field. -func (o *ModelArtifactCreate) SetModelFormatName(v string) { - o.ModelFormatName = &v +// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. +func (o *ModelArtifactCreate) SetCustomProperties(v map[string]MetadataValue) { + o.CustomProperties = &v } -// GetStorageKey returns the StorageKey field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetStorageKey() string { - if o == nil || IsNil(o.StorageKey) { +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetDescription() string { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.StorageKey + return *o.Description } -// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetStorageKeyOk() (*string, bool) { - if o == nil || IsNil(o.StorageKey) { +func (o *ModelArtifactCreate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { return nil, false } - return o.StorageKey, true + return o.Description, true } -// HasStorageKey returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasStorageKey() bool { - if o != nil && !IsNil(o.StorageKey) { +// HasDescription returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field. -func (o *ModelArtifactCreate) SetStorageKey(v string) { - o.StorageKey = &v +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ModelArtifactCreate) SetDescription(v string) { + o.Description = &v } -// GetStoragePath returns the StoragePath field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetStoragePath() string { - if o == nil || IsNil(o.StoragePath) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.StoragePath + return *o.ExternalId } -// GetStoragePathOk returns a tuple with the StoragePath field value if set, nil otherwise +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetStoragePathOk() (*string, bool) { - if o == nil || IsNil(o.StoragePath) { +func (o *ModelArtifactCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.StoragePath, true + return o.ExternalId, true } -// HasStoragePath returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasStoragePath() bool { - if o != nil && !IsNil(o.StoragePath) { +// HasExternalId returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { return true } return false } -// SetStoragePath gets a reference to the given string and assigns it to the StoragePath field. -func (o *ModelArtifactCreate) SetStoragePath(v string) { - o.StoragePath = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ModelArtifactCreate) SetExternalId(v string) { + o.ExternalId = &v } -// GetModelFormatVersion returns the ModelFormatVersion field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetModelFormatVersion() string { - if o == nil || IsNil(o.ModelFormatVersion) { +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetUri() string { + if o == nil || IsNil(o.Uri) { var ret string return ret } - return *o.ModelFormatVersion + return *o.Uri } -// GetModelFormatVersionOk returns a tuple with the ModelFormatVersion field value if set, nil otherwise +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetModelFormatVersionOk() (*string, bool) { - if o == nil || IsNil(o.ModelFormatVersion) { +func (o *ModelArtifactCreate) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { return nil, false } - return o.ModelFormatVersion, true + return o.Uri, true } -// HasModelFormatVersion returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasModelFormatVersion() bool { - if o != nil && !IsNil(o.ModelFormatVersion) { +// HasUri returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasUri() bool { + if o != nil && !IsNil(o.Uri) { return true } return false } -// SetModelFormatVersion gets a reference to the given string and assigns it to the ModelFormatVersion field. -func (o *ModelArtifactCreate) SetModelFormatVersion(v string) { - o.ModelFormatVersion = &v +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *ModelArtifactCreate) SetUri(v string) { + o.Uri = &v } -// GetServiceAccountName returns the ServiceAccountName field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetServiceAccountName() string { - if o == nil || IsNil(o.ServiceAccountName) { - var ret string +// GetState returns the State field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetState() ArtifactState { + if o == nil || IsNil(o.State) { + var ret ArtifactState return ret } - return *o.ServiceAccountName + return *o.State } -// GetServiceAccountNameOk returns a tuple with the ServiceAccountName field value if set, nil otherwise +// GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetServiceAccountNameOk() (*string, bool) { - if o == nil || IsNil(o.ServiceAccountName) { +func (o *ModelArtifactCreate) GetStateOk() (*ArtifactState, bool) { + if o == nil || IsNil(o.State) { return nil, false } - return o.ServiceAccountName, true + return o.State, true } -// HasServiceAccountName returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasServiceAccountName() bool { - if o != nil && !IsNil(o.ServiceAccountName) { +// HasState returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasState() bool { + if o != nil && !IsNil(o.State) { return true } return false } -// SetServiceAccountName gets a reference to the given string and assigns it to the ServiceAccountName field. -func (o *ModelArtifactCreate) SetServiceAccountName(v string) { - o.ServiceAccountName = &v +// SetState gets a reference to the given ArtifactState and assigns it to the State field. +func (o *ModelArtifactCreate) SetState(v ArtifactState) { + o.State = &v } func (o ModelArtifactCreate) MarshalJSON() ([]byte, error) { @@ -425,24 +425,6 @@ func (o ModelArtifactCreate) MarshalJSON() ([]byte, error) { func (o ModelArtifactCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri - } - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.ModelFormatName) { toSerialize["modelFormatName"] = o.ModelFormatName } @@ -458,6 +440,24 @@ func (o ModelArtifactCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ServiceAccountName) { toSerialize["serviceAccountName"] = o.ServiceAccountName } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CustomProperties) { + toSerialize["customProperties"] = o.CustomProperties + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId + } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } return toSerialize, nil } diff --git a/pkg/openapi/model_model_artifact_list.go b/pkg/openapi/model_model_artifact_list.go index aad69141..9c5087f9 100644 --- a/pkg/openapi/model_model_artifact_list.go +++ b/pkg/openapi/model_model_artifact_list.go @@ -19,14 +19,14 @@ var _ MappedNullable = &ModelArtifactList{} // ModelArtifactList List of ModelArtifact entities. type ModelArtifactList struct { + // Array of `ModelArtifact` entities. + Items []ModelArtifact `json:"items,omitempty"` // Token to use to retrieve next page of results. NextPageToken string `json:"nextPageToken"` // Maximum number of resources to return in the result. PageSize int32 `json:"pageSize"` // Number of items in result list. Size int32 `json:"size"` - // Array of `ModelArtifact` entities. - Items []ModelArtifact `json:"items,omitempty"` } // NewModelArtifactList instantiates a new ModelArtifactList object @@ -49,6 +49,38 @@ func NewModelArtifactListWithDefaults() *ModelArtifactList { return &this } +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ModelArtifactList) GetItems() []ModelArtifact { + if o == nil || IsNil(o.Items) { + var ret []ModelArtifact + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelArtifactList) GetItemsOk() ([]ModelArtifact, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ModelArtifactList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ModelArtifact and assigns it to the Items field. +func (o *ModelArtifactList) SetItems(v []ModelArtifact) { + o.Items = v +} + // GetNextPageToken returns the NextPageToken field value func (o *ModelArtifactList) GetNextPageToken() string { if o == nil { @@ -121,38 +153,6 @@ func (o *ModelArtifactList) SetSize(v int32) { o.Size = v } -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ModelArtifactList) GetItems() []ModelArtifact { - if o == nil || IsNil(o.Items) { - var ret []ModelArtifact - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelArtifactList) GetItemsOk() ([]ModelArtifact, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ModelArtifactList) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []ModelArtifact and assigns it to the Items field. -func (o *ModelArtifactList) SetItems(v []ModelArtifact) { - o.Items = v -} - func (o ModelArtifactList) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -163,12 +163,12 @@ func (o ModelArtifactList) MarshalJSON() ([]byte, error) { func (o ModelArtifactList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["nextPageToken"] = o.NextPageToken - toSerialize["pageSize"] = o.PageSize - toSerialize["size"] = o.Size if !IsNil(o.Items) { toSerialize["items"] = o.Items } + toSerialize["nextPageToken"] = o.NextPageToken + toSerialize["pageSize"] = o.PageSize + toSerialize["size"] = o.Size return toSerialize, nil } diff --git a/pkg/openapi/model_model_artifact_update.go b/pkg/openapi/model_model_artifact_update.go index dd154aa0..8ead8fef 100644 --- a/pkg/openapi/model_model_artifact_update.go +++ b/pkg/openapi/model_model_artifact_update.go @@ -25,9 +25,6 @@ type ModelArtifactUpdate struct { Description *string `json:"description,omitempty"` // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. ExternalId *string `json:"externalId,omitempty"` - // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. - Uri *string `json:"uri,omitempty"` - State *ArtifactState `json:"state,omitempty"` // Name of the model format. ModelFormatName *string `json:"modelFormatName,omitempty"` // Storage secret name. @@ -38,6 +35,9 @@ type ModelArtifactUpdate struct { ModelFormatVersion *string `json:"modelFormatVersion,omitempty"` // Name of the service account with storage secret. ServiceAccountName *string `json:"serviceAccountName,omitempty"` + // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. + Uri *string `json:"uri,omitempty"` + State *ArtifactState `json:"state,omitempty"` } // NewModelArtifactUpdate instantiates a new ModelArtifactUpdate object @@ -157,70 +157,6 @@ func (o *ModelArtifactUpdate) SetExternalId(v string) { o.ExternalId = &v } -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *ModelArtifactUpdate) GetUri() string { - if o == nil || IsNil(o.Uri) { - var ret string - return ret - } - return *o.Uri -} - -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelArtifactUpdate) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { - return nil, false - } - return o.Uri, true -} - -// HasUri returns a boolean if a field has been set. -func (o *ModelArtifactUpdate) HasUri() bool { - if o != nil && !IsNil(o.Uri) { - return true - } - - return false -} - -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *ModelArtifactUpdate) SetUri(v string) { - o.Uri = &v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *ModelArtifactUpdate) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelArtifactUpdate) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *ModelArtifactUpdate) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *ModelArtifactUpdate) SetState(v ArtifactState) { - o.State = &v -} - // GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise. func (o *ModelArtifactUpdate) GetModelFormatName() string { if o == nil || IsNil(o.ModelFormatName) { @@ -381,6 +317,70 @@ func (o *ModelArtifactUpdate) SetServiceAccountName(v string) { o.ServiceAccountName = &v } +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *ModelArtifactUpdate) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelArtifactUpdate) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *ModelArtifactUpdate) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *ModelArtifactUpdate) SetUri(v string) { + o.Uri = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ModelArtifactUpdate) GetState() ArtifactState { + if o == nil || IsNil(o.State) { + var ret ArtifactState + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelArtifactUpdate) GetStateOk() (*ArtifactState, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ModelArtifactUpdate) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given ArtifactState and assigns it to the State field. +func (o *ModelArtifactUpdate) SetState(v ArtifactState) { + o.State = &v +} + func (o ModelArtifactUpdate) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -400,12 +400,6 @@ func (o ModelArtifactUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri - } - if !IsNil(o.State) { - toSerialize["state"] = o.State - } if !IsNil(o.ModelFormatName) { toSerialize["modelFormatName"] = o.ModelFormatName } @@ -421,6 +415,12 @@ func (o ModelArtifactUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ServiceAccountName) { toSerialize["serviceAccountName"] = o.ServiceAccountName } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } return toSerialize, nil } diff --git a/pkg/openapi/model_model_version.go b/pkg/openapi/model_model_version.go index 236f84f9..d80dfd41 100644 --- a/pkg/openapi/model_model_version.go +++ b/pkg/openapi/model_model_version.go @@ -19,23 +19,23 @@ var _ MappedNullable = &ModelVersion{} // ModelVersion Represents a ModelVersion belonging to a RegisteredModel. type ModelVersion struct { + // Output only. The unique server generated id of the resource. + Id *string `json:"id,omitempty"` + // Output only. Create time of the resource in millisecond since epoch. + CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` + // Output only. Last update time of the resource since epoch in millisecond since epoch. + LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. Description *string `json:"description,omitempty"` // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` - State *ModelVersionState `json:"state,omitempty"` + ExternalId *string `json:"externalId,omitempty"` + State *ModelVersionState `json:"state,omitempty"` // Name of the author. Author *string `json:"author,omitempty"` - // Output only. The unique server generated id of the resource. - Id *string `json:"id,omitempty"` - // Output only. Create time of the resource in millisecond since epoch. - CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` - // Output only. Last update time of the resource since epoch in millisecond since epoch. - LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` } // NewModelVersion instantiates a new ModelVersion object @@ -59,100 +59,100 @@ func NewModelVersionWithDefaults() *ModelVersion { return &this } -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *ModelVersion) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue +// GetId returns the Id field value if set, zero value otherwise. +func (o *ModelVersion) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string return ret } - return *o.CustomProperties + return *o.Id } -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelVersion) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { +func (o *ModelVersion) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { return nil, false } - return o.CustomProperties, true + return o.Id, true } -// HasCustomProperties returns a boolean if a field has been set. -func (o *ModelVersion) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { +// HasId returns a boolean if a field has been set. +func (o *ModelVersion) HasId() bool { + if o != nil && !IsNil(o.Id) { return true } return false } -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *ModelVersion) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ModelVersion) SetId(v string) { + o.Id = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ModelVersion) GetDescription() string { - if o == nil || IsNil(o.Description) { +// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. +func (o *ModelVersion) GetCreateTimeSinceEpoch() string { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { var ret string return ret } - return *o.Description + return *o.CreateTimeSinceEpoch } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelVersion) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { +func (o *ModelVersion) GetCreateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { return nil, false } - return o.Description, true + return o.CreateTimeSinceEpoch, true } -// HasDescription returns a boolean if a field has been set. -func (o *ModelVersion) HasDescription() bool { - if o != nil && !IsNil(o.Description) { +// HasCreateTimeSinceEpoch returns a boolean if a field has been set. +func (o *ModelVersion) HasCreateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.CreateTimeSinceEpoch) { return true } return false } -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ModelVersion) SetDescription(v string) { - o.Description = &v +// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. +func (o *ModelVersion) SetCreateTimeSinceEpoch(v string) { + o.CreateTimeSinceEpoch = &v } -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *ModelVersion) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { +// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. +func (o *ModelVersion) GetLastUpdateTimeSinceEpoch() string { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { var ret string return ret } - return *o.ExternalId + return *o.LastUpdateTimeSinceEpoch } -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelVersion) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { +func (o *ModelVersion) GetLastUpdateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { return nil, false } - return o.ExternalId, true + return o.LastUpdateTimeSinceEpoch, true } -// HasExternalId returns a boolean if a field has been set. -func (o *ModelVersion) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { +// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. +func (o *ModelVersion) HasLastUpdateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { return true } return false } -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *ModelVersion) SetExternalId(v string) { - o.ExternalId = &v +// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. +func (o *ModelVersion) SetLastUpdateTimeSinceEpoch(v string) { + o.LastUpdateTimeSinceEpoch = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -187,164 +187,164 @@ func (o *ModelVersion) SetName(v string) { o.Name = &v } -// GetState returns the State field value if set, zero value otherwise. -func (o *ModelVersion) GetState() ModelVersionState { - if o == nil || IsNil(o.State) { - var ret ModelVersionState +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *ModelVersion) GetCustomProperties() map[string]MetadataValue { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]MetadataValue return ret } - return *o.State + return *o.CustomProperties } -// GetStateOk returns a tuple with the State field value if set, nil otherwise +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelVersion) GetStateOk() (*ModelVersionState, bool) { - if o == nil || IsNil(o.State) { +func (o *ModelVersion) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { + if o == nil || IsNil(o.CustomProperties) { return nil, false } - return o.State, true + return o.CustomProperties, true } -// HasState returns a boolean if a field has been set. -func (o *ModelVersion) HasState() bool { - if o != nil && !IsNil(o.State) { +// HasCustomProperties returns a boolean if a field has been set. +func (o *ModelVersion) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { return true } return false } -// SetState gets a reference to the given ModelVersionState and assigns it to the State field. -func (o *ModelVersion) SetState(v ModelVersionState) { - o.State = &v +// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. +func (o *ModelVersion) SetCustomProperties(v map[string]MetadataValue) { + o.CustomProperties = &v } -// GetAuthor returns the Author field value if set, zero value otherwise. -func (o *ModelVersion) GetAuthor() string { - if o == nil || IsNil(o.Author) { +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ModelVersion) GetDescription() string { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.Author + return *o.Description } -// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelVersion) GetAuthorOk() (*string, bool) { - if o == nil || IsNil(o.Author) { +func (o *ModelVersion) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { return nil, false } - return o.Author, true + return o.Description, true } -// HasAuthor returns a boolean if a field has been set. -func (o *ModelVersion) HasAuthor() bool { - if o != nil && !IsNil(o.Author) { +// HasDescription returns a boolean if a field has been set. +func (o *ModelVersion) HasDescription() bool { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetAuthor gets a reference to the given string and assigns it to the Author field. -func (o *ModelVersion) SetAuthor(v string) { - o.Author = &v +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ModelVersion) SetDescription(v string) { + o.Description = &v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *ModelVersion) GetId() string { - if o == nil || IsNil(o.Id) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ModelVersion) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.Id + return *o.ExternalId } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelVersion) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { +func (o *ModelVersion) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.Id, true + return o.ExternalId, true } -// HasId returns a boolean if a field has been set. -func (o *ModelVersion) HasId() bool { - if o != nil && !IsNil(o.Id) { +// HasExternalId returns a boolean if a field has been set. +func (o *ModelVersion) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { return true } return false } -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *ModelVersion) SetId(v string) { - o.Id = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ModelVersion) SetExternalId(v string) { + o.ExternalId = &v } -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *ModelVersion) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { - var ret string +// GetState returns the State field value if set, zero value otherwise. +func (o *ModelVersion) GetState() ModelVersionState { + if o == nil || IsNil(o.State) { + var ret ModelVersionState return ret } - return *o.CreateTimeSinceEpoch + return *o.State } -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise +// GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelVersion) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +func (o *ModelVersion) GetStateOk() (*ModelVersionState, bool) { + if o == nil || IsNil(o.State) { return nil, false } - return o.CreateTimeSinceEpoch, true + return o.State, true } -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *ModelVersion) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { +// HasState returns a boolean if a field has been set. +func (o *ModelVersion) HasState() bool { + if o != nil && !IsNil(o.State) { return true } return false } -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *ModelVersion) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v +// SetState gets a reference to the given ModelVersionState and assigns it to the State field. +func (o *ModelVersion) SetState(v ModelVersionState) { + o.State = &v } -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *ModelVersion) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +// GetAuthor returns the Author field value if set, zero value otherwise. +func (o *ModelVersion) GetAuthor() string { + if o == nil || IsNil(o.Author) { var ret string return ret } - return *o.LastUpdateTimeSinceEpoch + return *o.Author } -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise +// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelVersion) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +func (o *ModelVersion) GetAuthorOk() (*string, bool) { + if o == nil || IsNil(o.Author) { return nil, false } - return o.LastUpdateTimeSinceEpoch, true + return o.Author, true } -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *ModelVersion) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { +// HasAuthor returns a boolean if a field has been set. +func (o *ModelVersion) HasAuthor() bool { + if o != nil && !IsNil(o.Author) { return true } return false } -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *ModelVersion) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v +// SetAuthor gets a reference to the given string and assigns it to the Author field. +func (o *ModelVersion) SetAuthor(v string) { + o.Author = &v } func (o ModelVersion) MarshalJSON() ([]byte, error) { @@ -357,6 +357,18 @@ func (o ModelVersion) MarshalJSON() ([]byte, error) { func (o ModelVersion) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.CreateTimeSinceEpoch) { + toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch + } + if !IsNil(o.LastUpdateTimeSinceEpoch) { + toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties } @@ -366,24 +378,12 @@ func (o ModelVersion) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.State) { toSerialize["state"] = o.State } if !IsNil(o.Author) { toSerialize["author"] = o.Author } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.CreateTimeSinceEpoch) { - toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch - } - if !IsNil(o.LastUpdateTimeSinceEpoch) { - toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch - } return toSerialize, nil } diff --git a/pkg/openapi/model_model_version_create.go b/pkg/openapi/model_model_version_create.go index e99675d3..a9ee055d 100644 --- a/pkg/openapi/model_model_version_create.go +++ b/pkg/openapi/model_model_version_create.go @@ -21,15 +21,15 @@ var _ MappedNullable = &ModelVersionCreate{} type ModelVersionCreate struct { // ID of the `RegisteredModel` to which this version belongs. RegisteredModelId string `json:"registeredModelId"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. Description *string `json:"description,omitempty"` // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` - State *ModelVersionState `json:"state,omitempty"` + ExternalId *string `json:"externalId,omitempty"` + State *ModelVersionState `json:"state,omitempty"` // Name of the author. Author *string `json:"author,omitempty"` } @@ -79,6 +79,38 @@ func (o *ModelVersionCreate) SetRegisteredModelId(v string) { o.RegisteredModelId = v } +// GetName returns the Name field value if set, zero value otherwise. +func (o *ModelVersionCreate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelVersionCreate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ModelVersionCreate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ModelVersionCreate) SetName(v string) { + o.Name = &v +} + // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. func (o *ModelVersionCreate) GetCustomProperties() map[string]MetadataValue { if o == nil || IsNil(o.CustomProperties) { @@ -175,38 +207,6 @@ func (o *ModelVersionCreate) SetExternalId(v string) { o.ExternalId = &v } -// GetName returns the Name field value if set, zero value otherwise. -func (o *ModelVersionCreate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelVersionCreate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ModelVersionCreate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ModelVersionCreate) SetName(v string) { - o.Name = &v -} - // GetState returns the State field value if set, zero value otherwise. func (o *ModelVersionCreate) GetState() ModelVersionState { if o == nil || IsNil(o.State) { @@ -282,6 +282,9 @@ func (o ModelVersionCreate) MarshalJSON() ([]byte, error) { func (o ModelVersionCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["registeredModelId"] = o.RegisteredModelId + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties } @@ -291,9 +294,6 @@ func (o ModelVersionCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.State) { toSerialize["state"] = o.State } diff --git a/pkg/openapi/model_model_version_list.go b/pkg/openapi/model_model_version_list.go index 9e952be1..c6d97b44 100644 --- a/pkg/openapi/model_model_version_list.go +++ b/pkg/openapi/model_model_version_list.go @@ -19,14 +19,14 @@ var _ MappedNullable = &ModelVersionList{} // ModelVersionList List of ModelVersion entities. type ModelVersionList struct { + // Array of `ModelVersion` entities. + Items []ModelVersion `json:"items,omitempty"` // Token to use to retrieve next page of results. NextPageToken string `json:"nextPageToken"` // Maximum number of resources to return in the result. PageSize int32 `json:"pageSize"` // Number of items in result list. Size int32 `json:"size"` - // Array of `ModelVersion` entities. - Items []ModelVersion `json:"items,omitempty"` } // NewModelVersionList instantiates a new ModelVersionList object @@ -49,6 +49,38 @@ func NewModelVersionListWithDefaults() *ModelVersionList { return &this } +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ModelVersionList) GetItems() []ModelVersion { + if o == nil || IsNil(o.Items) { + var ret []ModelVersion + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelVersionList) GetItemsOk() ([]ModelVersion, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ModelVersionList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ModelVersion and assigns it to the Items field. +func (o *ModelVersionList) SetItems(v []ModelVersion) { + o.Items = v +} + // GetNextPageToken returns the NextPageToken field value func (o *ModelVersionList) GetNextPageToken() string { if o == nil { @@ -121,38 +153,6 @@ func (o *ModelVersionList) SetSize(v int32) { o.Size = v } -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ModelVersionList) GetItems() []ModelVersion { - if o == nil || IsNil(o.Items) { - var ret []ModelVersion - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelVersionList) GetItemsOk() ([]ModelVersion, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ModelVersionList) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []ModelVersion and assigns it to the Items field. -func (o *ModelVersionList) SetItems(v []ModelVersion) { - o.Items = v -} - func (o ModelVersionList) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -163,12 +163,12 @@ func (o ModelVersionList) MarshalJSON() ([]byte, error) { func (o ModelVersionList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["nextPageToken"] = o.NextPageToken - toSerialize["pageSize"] = o.PageSize - toSerialize["size"] = o.Size if !IsNil(o.Items) { toSerialize["items"] = o.Items } + toSerialize["nextPageToken"] = o.NextPageToken + toSerialize["pageSize"] = o.PageSize + toSerialize["size"] = o.Size return toSerialize, nil } diff --git a/pkg/openapi/model_registered_model.go b/pkg/openapi/model_registered_model.go index 4dd6dd94..fde315d5 100644 --- a/pkg/openapi/model_registered_model.go +++ b/pkg/openapi/model_registered_model.go @@ -19,21 +19,21 @@ var _ MappedNullable = &RegisteredModel{} // RegisteredModel A registered model in model registry. A registered model has ModelVersion children. type RegisteredModel struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // Output only. The unique server generated id of the resource. Id *string `json:"id,omitempty"` // Output only. Create time of the resource in millisecond since epoch. CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` // Output only. Last update time of the resource since epoch in millisecond since epoch. - LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` - State *RegisteredModelState `json:"state,omitempty"` + LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` + // User provided custom properties which are not defined by its type. + CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` + // An optional description about the resource. + Description *string `json:"description,omitempty"` + // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. + ExternalId *string `json:"externalId,omitempty"` + State *RegisteredModelState `json:"state,omitempty"` } // NewRegisteredModel instantiates a new RegisteredModel object @@ -57,100 +57,100 @@ func NewRegisteredModelWithDefaults() *RegisteredModel { return &this } -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *RegisteredModel) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue +// GetId returns the Id field value if set, zero value otherwise. +func (o *RegisteredModel) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string return ret } - return *o.CustomProperties + return *o.Id } -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RegisteredModel) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { +func (o *RegisteredModel) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { return nil, false } - return o.CustomProperties, true + return o.Id, true } -// HasCustomProperties returns a boolean if a field has been set. -func (o *RegisteredModel) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { +// HasId returns a boolean if a field has been set. +func (o *RegisteredModel) HasId() bool { + if o != nil && !IsNil(o.Id) { return true } return false } -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *RegisteredModel) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RegisteredModel) SetId(v string) { + o.Id = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *RegisteredModel) GetDescription() string { - if o == nil || IsNil(o.Description) { +// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. +func (o *RegisteredModel) GetCreateTimeSinceEpoch() string { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { var ret string return ret } - return *o.Description + return *o.CreateTimeSinceEpoch } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RegisteredModel) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { +func (o *RegisteredModel) GetCreateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { return nil, false } - return o.Description, true + return o.CreateTimeSinceEpoch, true } -// HasDescription returns a boolean if a field has been set. -func (o *RegisteredModel) HasDescription() bool { - if o != nil && !IsNil(o.Description) { +// HasCreateTimeSinceEpoch returns a boolean if a field has been set. +func (o *RegisteredModel) HasCreateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.CreateTimeSinceEpoch) { return true } return false } -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *RegisteredModel) SetDescription(v string) { - o.Description = &v +// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. +func (o *RegisteredModel) SetCreateTimeSinceEpoch(v string) { + o.CreateTimeSinceEpoch = &v } -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *RegisteredModel) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { +// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. +func (o *RegisteredModel) GetLastUpdateTimeSinceEpoch() string { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { var ret string return ret } - return *o.ExternalId + return *o.LastUpdateTimeSinceEpoch } -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RegisteredModel) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { +func (o *RegisteredModel) GetLastUpdateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { return nil, false } - return o.ExternalId, true + return o.LastUpdateTimeSinceEpoch, true } -// HasExternalId returns a boolean if a field has been set. -func (o *RegisteredModel) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { +// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. +func (o *RegisteredModel) HasLastUpdateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { return true } return false } -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *RegisteredModel) SetExternalId(v string) { - o.ExternalId = &v +// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. +func (o *RegisteredModel) SetLastUpdateTimeSinceEpoch(v string) { + o.LastUpdateTimeSinceEpoch = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -185,100 +185,100 @@ func (o *RegisteredModel) SetName(v string) { o.Name = &v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *RegisteredModel) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *RegisteredModel) GetCustomProperties() map[string]MetadataValue { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]MetadataValue return ret } - return *o.Id + return *o.CustomProperties } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RegisteredModel) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { +func (o *RegisteredModel) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { + if o == nil || IsNil(o.CustomProperties) { return nil, false } - return o.Id, true + return o.CustomProperties, true } -// HasId returns a boolean if a field has been set. -func (o *RegisteredModel) HasId() bool { - if o != nil && !IsNil(o.Id) { +// HasCustomProperties returns a boolean if a field has been set. +func (o *RegisteredModel) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { return true } return false } -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RegisteredModel) SetId(v string) { - o.Id = &v +// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. +func (o *RegisteredModel) SetCustomProperties(v map[string]MetadataValue) { + o.CustomProperties = &v } -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *RegisteredModel) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RegisteredModel) GetDescription() string { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.CreateTimeSinceEpoch + return *o.Description } -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RegisteredModel) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +func (o *RegisteredModel) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { return nil, false } - return o.CreateTimeSinceEpoch, true + return o.Description, true } -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *RegisteredModel) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { +// HasDescription returns a boolean if a field has been set. +func (o *RegisteredModel) HasDescription() bool { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *RegisteredModel) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RegisteredModel) SetDescription(v string) { + o.Description = &v } -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *RegisteredModel) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *RegisteredModel) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.LastUpdateTimeSinceEpoch + return *o.ExternalId } -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RegisteredModel) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +func (o *RegisteredModel) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.LastUpdateTimeSinceEpoch, true + return o.ExternalId, true } -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *RegisteredModel) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { +// HasExternalId returns a boolean if a field has been set. +func (o *RegisteredModel) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { return true } return false } -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *RegisteredModel) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *RegisteredModel) SetExternalId(v string) { + o.ExternalId = &v } // GetState returns the State field value if set, zero value otherwise. @@ -323,18 +323,6 @@ func (o RegisteredModel) MarshalJSON() ([]byte, error) { func (o RegisteredModel) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -344,6 +332,18 @@ func (o RegisteredModel) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastUpdateTimeSinceEpoch) { toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CustomProperties) { + toSerialize["customProperties"] = o.CustomProperties + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId + } if !IsNil(o.State) { toSerialize["state"] = o.State } diff --git a/pkg/openapi/model_registered_model_create.go b/pkg/openapi/model_registered_model_create.go index 97f25c9d..9bc5e924 100644 --- a/pkg/openapi/model_registered_model_create.go +++ b/pkg/openapi/model_registered_model_create.go @@ -19,15 +19,15 @@ var _ MappedNullable = &RegisteredModelCreate{} // RegisteredModelCreate A registered model in model registry. A registered model has ModelVersion children. type RegisteredModelCreate struct { + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. Description *string `json:"description,omitempty"` // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` - State *RegisteredModelState `json:"state,omitempty"` + ExternalId *string `json:"externalId,omitempty"` + State *RegisteredModelState `json:"state,omitempty"` } // NewRegisteredModelCreate instantiates a new RegisteredModelCreate object @@ -51,6 +51,38 @@ func NewRegisteredModelCreateWithDefaults() *RegisteredModelCreate { return &this } +// GetName returns the Name field value if set, zero value otherwise. +func (o *RegisteredModelCreate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegisteredModelCreate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RegisteredModelCreate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RegisteredModelCreate) SetName(v string) { + o.Name = &v +} + // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. func (o *RegisteredModelCreate) GetCustomProperties() map[string]MetadataValue { if o == nil || IsNil(o.CustomProperties) { @@ -147,38 +179,6 @@ func (o *RegisteredModelCreate) SetExternalId(v string) { o.ExternalId = &v } -// GetName returns the Name field value if set, zero value otherwise. -func (o *RegisteredModelCreate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RegisteredModelCreate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *RegisteredModelCreate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *RegisteredModelCreate) SetName(v string) { - o.Name = &v -} - // GetState returns the State field value if set, zero value otherwise. func (o *RegisteredModelCreate) GetState() RegisteredModelState { if o == nil || IsNil(o.State) { @@ -221,6 +221,9 @@ func (o RegisteredModelCreate) MarshalJSON() ([]byte, error) { func (o RegisteredModelCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties } @@ -230,9 +233,6 @@ func (o RegisteredModelCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.State) { toSerialize["state"] = o.State } diff --git a/pkg/openapi/model_registered_model_list.go b/pkg/openapi/model_registered_model_list.go index 7d949616..a28aa2a8 100644 --- a/pkg/openapi/model_registered_model_list.go +++ b/pkg/openapi/model_registered_model_list.go @@ -19,14 +19,14 @@ var _ MappedNullable = &RegisteredModelList{} // RegisteredModelList List of RegisteredModels. type RegisteredModelList struct { + // + Items []RegisteredModel `json:"items,omitempty"` // Token to use to retrieve next page of results. NextPageToken string `json:"nextPageToken"` // Maximum number of resources to return in the result. PageSize int32 `json:"pageSize"` // Number of items in result list. Size int32 `json:"size"` - // - Items []RegisteredModel `json:"items,omitempty"` } // NewRegisteredModelList instantiates a new RegisteredModelList object @@ -49,6 +49,38 @@ func NewRegisteredModelListWithDefaults() *RegisteredModelList { return &this } +// GetItems returns the Items field value if set, zero value otherwise. +func (o *RegisteredModelList) GetItems() []RegisteredModel { + if o == nil || IsNil(o.Items) { + var ret []RegisteredModel + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RegisteredModelList) GetItemsOk() ([]RegisteredModel, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *RegisteredModelList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []RegisteredModel and assigns it to the Items field. +func (o *RegisteredModelList) SetItems(v []RegisteredModel) { + o.Items = v +} + // GetNextPageToken returns the NextPageToken field value func (o *RegisteredModelList) GetNextPageToken() string { if o == nil { @@ -121,38 +153,6 @@ func (o *RegisteredModelList) SetSize(v int32) { o.Size = v } -// GetItems returns the Items field value if set, zero value otherwise. -func (o *RegisteredModelList) GetItems() []RegisteredModel { - if o == nil || IsNil(o.Items) { - var ret []RegisteredModel - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RegisteredModelList) GetItemsOk() ([]RegisteredModel, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *RegisteredModelList) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []RegisteredModel and assigns it to the Items field. -func (o *RegisteredModelList) SetItems(v []RegisteredModel) { - o.Items = v -} - func (o RegisteredModelList) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -163,12 +163,12 @@ func (o RegisteredModelList) MarshalJSON() ([]byte, error) { func (o RegisteredModelList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["nextPageToken"] = o.NextPageToken - toSerialize["pageSize"] = o.PageSize - toSerialize["size"] = o.Size if !IsNil(o.Items) { toSerialize["items"] = o.Items } + toSerialize["nextPageToken"] = o.NextPageToken + toSerialize["pageSize"] = o.PageSize + toSerialize["size"] = o.Size return toSerialize, nil } diff --git a/pkg/openapi/model_serve_model.go b/pkg/openapi/model_serve_model.go index 0cbc62ce..c45d9717 100644 --- a/pkg/openapi/model_serve_model.go +++ b/pkg/openapi/model_serve_model.go @@ -20,20 +20,20 @@ var _ MappedNullable = &ServeModel{} // ServeModel An ML model serving action. type ServeModel struct { LastKnownState *ExecutionState `json:"lastKnownState,omitempty"` - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // Output only. The unique server generated id of the resource. Id *string `json:"id,omitempty"` // Output only. Create time of the resource in millisecond since epoch. CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` // Output only. Last update time of the resource since epoch in millisecond since epoch. LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` + // User provided custom properties which are not defined by its type. + CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` + // An optional description about the resource. + Description *string `json:"description,omitempty"` + // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. + ExternalId *string `json:"externalId,omitempty"` // ID of the `ModelVersion` that was served in `InferenceService`. ModelVersionId string `json:"modelVersionId"` } @@ -92,100 +92,100 @@ func (o *ServeModel) SetLastKnownState(v ExecutionState) { o.LastKnownState = &v } -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *ServeModel) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue +// GetId returns the Id field value if set, zero value otherwise. +func (o *ServeModel) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string return ret } - return *o.CustomProperties + return *o.Id } -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServeModel) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { +func (o *ServeModel) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { return nil, false } - return o.CustomProperties, true + return o.Id, true } -// HasCustomProperties returns a boolean if a field has been set. -func (o *ServeModel) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { +// HasId returns a boolean if a field has been set. +func (o *ServeModel) HasId() bool { + if o != nil && !IsNil(o.Id) { return true } return false } -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *ServeModel) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ServeModel) SetId(v string) { + o.Id = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ServeModel) GetDescription() string { - if o == nil || IsNil(o.Description) { +// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. +func (o *ServeModel) GetCreateTimeSinceEpoch() string { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { var ret string return ret } - return *o.Description + return *o.CreateTimeSinceEpoch } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServeModel) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { +func (o *ServeModel) GetCreateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { return nil, false } - return o.Description, true + return o.CreateTimeSinceEpoch, true } -// HasDescription returns a boolean if a field has been set. -func (o *ServeModel) HasDescription() bool { - if o != nil && !IsNil(o.Description) { +// HasCreateTimeSinceEpoch returns a boolean if a field has been set. +func (o *ServeModel) HasCreateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.CreateTimeSinceEpoch) { return true } return false } -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ServeModel) SetDescription(v string) { - o.Description = &v +// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. +func (o *ServeModel) SetCreateTimeSinceEpoch(v string) { + o.CreateTimeSinceEpoch = &v } -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *ServeModel) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { +// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. +func (o *ServeModel) GetLastUpdateTimeSinceEpoch() string { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { var ret string return ret } - return *o.ExternalId + return *o.LastUpdateTimeSinceEpoch } -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServeModel) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { +func (o *ServeModel) GetLastUpdateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { return nil, false } - return o.ExternalId, true + return o.LastUpdateTimeSinceEpoch, true } -// HasExternalId returns a boolean if a field has been set. -func (o *ServeModel) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { +// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. +func (o *ServeModel) HasLastUpdateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { return true } return false } -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *ServeModel) SetExternalId(v string) { - o.ExternalId = &v +// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. +func (o *ServeModel) SetLastUpdateTimeSinceEpoch(v string) { + o.LastUpdateTimeSinceEpoch = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -220,100 +220,100 @@ func (o *ServeModel) SetName(v string) { o.Name = &v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *ServeModel) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *ServeModel) GetCustomProperties() map[string]MetadataValue { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]MetadataValue return ret } - return *o.Id + return *o.CustomProperties } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServeModel) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { +func (o *ServeModel) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { + if o == nil || IsNil(o.CustomProperties) { return nil, false } - return o.Id, true + return o.CustomProperties, true } -// HasId returns a boolean if a field has been set. -func (o *ServeModel) HasId() bool { - if o != nil && !IsNil(o.Id) { +// HasCustomProperties returns a boolean if a field has been set. +func (o *ServeModel) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { return true } return false } -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *ServeModel) SetId(v string) { - o.Id = &v +// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. +func (o *ServeModel) SetCustomProperties(v map[string]MetadataValue) { + o.CustomProperties = &v } -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *ServeModel) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServeModel) GetDescription() string { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.CreateTimeSinceEpoch + return *o.Description } -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServeModel) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +func (o *ServeModel) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { return nil, false } - return o.CreateTimeSinceEpoch, true + return o.Description, true } -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *ServeModel) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { +// HasDescription returns a boolean if a field has been set. +func (o *ServeModel) HasDescription() bool { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *ServeModel) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServeModel) SetDescription(v string) { + o.Description = &v } -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *ServeModel) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ServeModel) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.LastUpdateTimeSinceEpoch + return *o.ExternalId } -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServeModel) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +func (o *ServeModel) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.LastUpdateTimeSinceEpoch, true + return o.ExternalId, true } -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *ServeModel) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { +// HasExternalId returns a boolean if a field has been set. +func (o *ServeModel) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { return true } return false } -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *ServeModel) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ServeModel) SetExternalId(v string) { + o.ExternalId = &v } // GetModelVersionId returns the ModelVersionId field value @@ -353,18 +353,6 @@ func (o ServeModel) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastKnownState) { toSerialize["lastKnownState"] = o.LastKnownState } - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -374,6 +362,18 @@ func (o ServeModel) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastUpdateTimeSinceEpoch) { toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CustomProperties) { + toSerialize["customProperties"] = o.CustomProperties + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId + } toSerialize["modelVersionId"] = o.ModelVersionId return toSerialize, nil } diff --git a/pkg/openapi/model_serve_model_create.go b/pkg/openapi/model_serve_model_create.go index b4ea4880..07b1ce50 100644 --- a/pkg/openapi/model_serve_model_create.go +++ b/pkg/openapi/model_serve_model_create.go @@ -20,14 +20,14 @@ var _ MappedNullable = &ServeModelCreate{} // ServeModelCreate An ML model serving action. type ServeModelCreate struct { LastKnownState *ExecutionState `json:"lastKnownState,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. Description *string `json:"description,omitempty"` // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // ID of the `ModelVersion` that was served in `InferenceService`. ModelVersionId string `json:"modelVersionId"` } @@ -86,6 +86,38 @@ func (o *ServeModelCreate) SetLastKnownState(v ExecutionState) { o.LastKnownState = &v } +// GetName returns the Name field value if set, zero value otherwise. +func (o *ServeModelCreate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServeModelCreate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ServeModelCreate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ServeModelCreate) SetName(v string) { + o.Name = &v +} + // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. func (o *ServeModelCreate) GetCustomProperties() map[string]MetadataValue { if o == nil || IsNil(o.CustomProperties) { @@ -182,38 +214,6 @@ func (o *ServeModelCreate) SetExternalId(v string) { o.ExternalId = &v } -// GetName returns the Name field value if set, zero value otherwise. -func (o *ServeModelCreate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServeModelCreate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ServeModelCreate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ServeModelCreate) SetName(v string) { - o.Name = &v -} - // GetModelVersionId returns the ModelVersionId field value func (o *ServeModelCreate) GetModelVersionId() string { if o == nil { @@ -251,6 +251,9 @@ func (o ServeModelCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastKnownState) { toSerialize["lastKnownState"] = o.LastKnownState } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties } @@ -260,9 +263,6 @@ func (o ServeModelCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } toSerialize["modelVersionId"] = o.ModelVersionId return toSerialize, nil } diff --git a/pkg/openapi/model_serve_model_list.go b/pkg/openapi/model_serve_model_list.go index 60c762a4..9373fed9 100644 --- a/pkg/openapi/model_serve_model_list.go +++ b/pkg/openapi/model_serve_model_list.go @@ -19,14 +19,14 @@ var _ MappedNullable = &ServeModelList{} // ServeModelList List of ServeModel entities. type ServeModelList struct { + // Array of `ModelArtifact` entities. + Items []ServeModel `json:"items,omitempty"` // Token to use to retrieve next page of results. NextPageToken string `json:"nextPageToken"` // Maximum number of resources to return in the result. PageSize int32 `json:"pageSize"` // Number of items in result list. Size int32 `json:"size"` - // Array of `ModelArtifact` entities. - Items []ServeModel `json:"items,omitempty"` } // NewServeModelList instantiates a new ServeModelList object @@ -49,6 +49,38 @@ func NewServeModelListWithDefaults() *ServeModelList { return &this } +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ServeModelList) GetItems() []ServeModel { + if o == nil || IsNil(o.Items) { + var ret []ServeModel + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServeModelList) GetItemsOk() ([]ServeModel, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ServeModelList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ServeModel and assigns it to the Items field. +func (o *ServeModelList) SetItems(v []ServeModel) { + o.Items = v +} + // GetNextPageToken returns the NextPageToken field value func (o *ServeModelList) GetNextPageToken() string { if o == nil { @@ -121,38 +153,6 @@ func (o *ServeModelList) SetSize(v int32) { o.Size = v } -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ServeModelList) GetItems() []ServeModel { - if o == nil || IsNil(o.Items) { - var ret []ServeModel - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServeModelList) GetItemsOk() ([]ServeModel, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ServeModelList) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []ServeModel and assigns it to the Items field. -func (o *ServeModelList) SetItems(v []ServeModel) { - o.Items = v -} - func (o ServeModelList) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -163,12 +163,12 @@ func (o ServeModelList) MarshalJSON() ([]byte, error) { func (o ServeModelList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["nextPageToken"] = o.NextPageToken - toSerialize["pageSize"] = o.PageSize - toSerialize["size"] = o.Size if !IsNil(o.Items) { toSerialize["items"] = o.Items } + toSerialize["nextPageToken"] = o.NextPageToken + toSerialize["pageSize"] = o.PageSize + toSerialize["size"] = o.Size return toSerialize, nil } diff --git a/pkg/openapi/model_serve_model_update.go b/pkg/openapi/model_serve_model_update.go index f7d826aa..5e9a8a30 100644 --- a/pkg/openapi/model_serve_model_update.go +++ b/pkg/openapi/model_serve_model_update.go @@ -19,13 +19,13 @@ var _ MappedNullable = &ServeModelUpdate{} // ServeModelUpdate An ML model serving action. type ServeModelUpdate struct { - LastKnownState *ExecutionState `json:"lastKnownState,omitempty"` // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. Description *string `json:"description,omitempty"` // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` + ExternalId *string `json:"externalId,omitempty"` + LastKnownState *ExecutionState `json:"lastKnownState,omitempty"` } // NewServeModelUpdate instantiates a new ServeModelUpdate object @@ -49,38 +49,6 @@ func NewServeModelUpdateWithDefaults() *ServeModelUpdate { return &this } -// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise. -func (o *ServeModelUpdate) GetLastKnownState() ExecutionState { - if o == nil || IsNil(o.LastKnownState) { - var ret ExecutionState - return ret - } - return *o.LastKnownState -} - -// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServeModelUpdate) GetLastKnownStateOk() (*ExecutionState, bool) { - if o == nil || IsNil(o.LastKnownState) { - return nil, false - } - return o.LastKnownState, true -} - -// HasLastKnownState returns a boolean if a field has been set. -func (o *ServeModelUpdate) HasLastKnownState() bool { - if o != nil && !IsNil(o.LastKnownState) { - return true - } - - return false -} - -// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field. -func (o *ServeModelUpdate) SetLastKnownState(v ExecutionState) { - o.LastKnownState = &v -} - // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. func (o *ServeModelUpdate) GetCustomProperties() map[string]MetadataValue { if o == nil || IsNil(o.CustomProperties) { @@ -177,6 +145,38 @@ func (o *ServeModelUpdate) SetExternalId(v string) { o.ExternalId = &v } +// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise. +func (o *ServeModelUpdate) GetLastKnownState() ExecutionState { + if o == nil || IsNil(o.LastKnownState) { + var ret ExecutionState + return ret + } + return *o.LastKnownState +} + +// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServeModelUpdate) GetLastKnownStateOk() (*ExecutionState, bool) { + if o == nil || IsNil(o.LastKnownState) { + return nil, false + } + return o.LastKnownState, true +} + +// HasLastKnownState returns a boolean if a field has been set. +func (o *ServeModelUpdate) HasLastKnownState() bool { + if o != nil && !IsNil(o.LastKnownState) { + return true + } + + return false +} + +// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field. +func (o *ServeModelUpdate) SetLastKnownState(v ExecutionState) { + o.LastKnownState = &v +} + func (o ServeModelUpdate) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -187,9 +187,6 @@ func (o ServeModelUpdate) MarshalJSON() ([]byte, error) { func (o ServeModelUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.LastKnownState) { - toSerialize["lastKnownState"] = o.LastKnownState - } if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties } @@ -199,6 +196,9 @@ func (o ServeModelUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } + if !IsNil(o.LastKnownState) { + toSerialize["lastKnownState"] = o.LastKnownState + } return toSerialize, nil } diff --git a/pkg/openapi/model_serving_environment.go b/pkg/openapi/model_serving_environment.go index d57a6dcb..2f1b0d74 100644 --- a/pkg/openapi/model_serving_environment.go +++ b/pkg/openapi/model_serving_environment.go @@ -19,20 +19,20 @@ var _ MappedNullable = &ServingEnvironment{} // ServingEnvironment A Model Serving environment for serving `RegisteredModels`. type ServingEnvironment struct { - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` // Output only. The unique server generated id of the resource. Id *string `json:"id,omitempty"` // Output only. Create time of the resource in millisecond since epoch. CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` // Output only. Last update time of the resource since epoch in millisecond since epoch. LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` + // User provided custom properties which are not defined by its type. + CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` + // An optional description about the resource. + Description *string `json:"description,omitempty"` + // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. + ExternalId *string `json:"externalId,omitempty"` } // NewServingEnvironment instantiates a new ServingEnvironment object @@ -52,100 +52,100 @@ func NewServingEnvironmentWithDefaults() *ServingEnvironment { return &this } -// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *ServingEnvironment) GetCustomProperties() map[string]MetadataValue { - if o == nil || IsNil(o.CustomProperties) { - var ret map[string]MetadataValue +// GetId returns the Id field value if set, zero value otherwise. +func (o *ServingEnvironment) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string return ret } - return *o.CustomProperties + return *o.Id } -// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise +// GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServingEnvironment) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { - if o == nil || IsNil(o.CustomProperties) { +func (o *ServingEnvironment) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { return nil, false } - return o.CustomProperties, true + return o.Id, true } -// HasCustomProperties returns a boolean if a field has been set. -func (o *ServingEnvironment) HasCustomProperties() bool { - if o != nil && !IsNil(o.CustomProperties) { +// HasId returns a boolean if a field has been set. +func (o *ServingEnvironment) HasId() bool { + if o != nil && !IsNil(o.Id) { return true } return false } -// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *ServingEnvironment) SetCustomProperties(v map[string]MetadataValue) { - o.CustomProperties = &v +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ServingEnvironment) SetId(v string) { + o.Id = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ServingEnvironment) GetDescription() string { - if o == nil || IsNil(o.Description) { +// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. +func (o *ServingEnvironment) GetCreateTimeSinceEpoch() string { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { var ret string return ret } - return *o.Description + return *o.CreateTimeSinceEpoch } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServingEnvironment) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { +func (o *ServingEnvironment) GetCreateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { return nil, false } - return o.Description, true + return o.CreateTimeSinceEpoch, true } -// HasDescription returns a boolean if a field has been set. -func (o *ServingEnvironment) HasDescription() bool { - if o != nil && !IsNil(o.Description) { +// HasCreateTimeSinceEpoch returns a boolean if a field has been set. +func (o *ServingEnvironment) HasCreateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.CreateTimeSinceEpoch) { return true } return false } -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ServingEnvironment) SetDescription(v string) { - o.Description = &v +// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. +func (o *ServingEnvironment) SetCreateTimeSinceEpoch(v string) { + o.CreateTimeSinceEpoch = &v } -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *ServingEnvironment) GetExternalId() string { - if o == nil || IsNil(o.ExternalId) { +// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. +func (o *ServingEnvironment) GetLastUpdateTimeSinceEpoch() string { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { var ret string return ret } - return *o.ExternalId + return *o.LastUpdateTimeSinceEpoch } -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServingEnvironment) GetExternalIdOk() (*string, bool) { - if o == nil || IsNil(o.ExternalId) { +func (o *ServingEnvironment) GetLastUpdateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { return nil, false } - return o.ExternalId, true + return o.LastUpdateTimeSinceEpoch, true } -// HasExternalId returns a boolean if a field has been set. -func (o *ServingEnvironment) HasExternalId() bool { - if o != nil && !IsNil(o.ExternalId) { +// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. +func (o *ServingEnvironment) HasLastUpdateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { return true } return false } -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *ServingEnvironment) SetExternalId(v string) { - o.ExternalId = &v +// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. +func (o *ServingEnvironment) SetLastUpdateTimeSinceEpoch(v string) { + o.LastUpdateTimeSinceEpoch = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -180,100 +180,100 @@ func (o *ServingEnvironment) SetName(v string) { o.Name = &v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *ServingEnvironment) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string +// GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. +func (o *ServingEnvironment) GetCustomProperties() map[string]MetadataValue { + if o == nil || IsNil(o.CustomProperties) { + var ret map[string]MetadataValue return ret } - return *o.Id + return *o.CustomProperties } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServingEnvironment) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { +func (o *ServingEnvironment) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { + if o == nil || IsNil(o.CustomProperties) { return nil, false } - return o.Id, true + return o.CustomProperties, true } -// HasId returns a boolean if a field has been set. -func (o *ServingEnvironment) HasId() bool { - if o != nil && !IsNil(o.Id) { +// HasCustomProperties returns a boolean if a field has been set. +func (o *ServingEnvironment) HasCustomProperties() bool { + if o != nil && !IsNil(o.CustomProperties) { return true } return false } -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *ServingEnvironment) SetId(v string) { - o.Id = &v +// SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. +func (o *ServingEnvironment) SetCustomProperties(v map[string]MetadataValue) { + o.CustomProperties = &v } -// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. -func (o *ServingEnvironment) GetCreateTimeSinceEpoch() string { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServingEnvironment) GetDescription() string { + if o == nil || IsNil(o.Description) { var ret string return ret } - return *o.CreateTimeSinceEpoch + return *o.Description } -// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServingEnvironment) GetCreateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.CreateTimeSinceEpoch) { +func (o *ServingEnvironment) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { return nil, false } - return o.CreateTimeSinceEpoch, true + return o.Description, true } -// HasCreateTimeSinceEpoch returns a boolean if a field has been set. -func (o *ServingEnvironment) HasCreateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.CreateTimeSinceEpoch) { +// HasDescription returns a boolean if a field has been set. +func (o *ServingEnvironment) HasDescription() bool { + if o != nil && !IsNil(o.Description) { return true } return false } -// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. -func (o *ServingEnvironment) SetCreateTimeSinceEpoch(v string) { - o.CreateTimeSinceEpoch = &v +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServingEnvironment) SetDescription(v string) { + o.Description = &v } -// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. -func (o *ServingEnvironment) GetLastUpdateTimeSinceEpoch() string { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ServingEnvironment) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.LastUpdateTimeSinceEpoch + return *o.ExternalId } -// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ServingEnvironment) GetLastUpdateTimeSinceEpochOk() (*string, bool) { - if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { +func (o *ServingEnvironment) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.LastUpdateTimeSinceEpoch, true + return o.ExternalId, true } -// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. -func (o *ServingEnvironment) HasLastUpdateTimeSinceEpoch() bool { - if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { +// HasExternalId returns a boolean if a field has been set. +func (o *ServingEnvironment) HasExternalId() bool { + if o != nil && !IsNil(o.ExternalId) { return true } return false } -// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. -func (o *ServingEnvironment) SetLastUpdateTimeSinceEpoch(v string) { - o.LastUpdateTimeSinceEpoch = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ServingEnvironment) SetExternalId(v string) { + o.ExternalId = &v } func (o ServingEnvironment) MarshalJSON() ([]byte, error) { @@ -286,18 +286,6 @@ func (o ServingEnvironment) MarshalJSON() ([]byte, error) { func (o ServingEnvironment) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.CustomProperties) { - toSerialize["customProperties"] = o.CustomProperties - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.ExternalId) { - toSerialize["externalId"] = o.ExternalId - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -307,6 +295,18 @@ func (o ServingEnvironment) ToMap() (map[string]interface{}, error) { if !IsNil(o.LastUpdateTimeSinceEpoch) { toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CustomProperties) { + toSerialize["customProperties"] = o.CustomProperties + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId + } return toSerialize, nil } diff --git a/pkg/openapi/model_serving_environment_create.go b/pkg/openapi/model_serving_environment_create.go index 093e9fec..54a90735 100644 --- a/pkg/openapi/model_serving_environment_create.go +++ b/pkg/openapi/model_serving_environment_create.go @@ -19,14 +19,14 @@ var _ MappedNullable = &ServingEnvironmentCreate{} // ServingEnvironmentCreate A Model Serving environment for serving `RegisteredModels`. type ServingEnvironmentCreate struct { + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. Description *string `json:"description,omitempty"` // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. ExternalId *string `json:"externalId,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` } // NewServingEnvironmentCreate instantiates a new ServingEnvironmentCreate object @@ -46,6 +46,38 @@ func NewServingEnvironmentCreateWithDefaults() *ServingEnvironmentCreate { return &this } +// GetName returns the Name field value if set, zero value otherwise. +func (o *ServingEnvironmentCreate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServingEnvironmentCreate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ServingEnvironmentCreate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ServingEnvironmentCreate) SetName(v string) { + o.Name = &v +} + // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. func (o *ServingEnvironmentCreate) GetCustomProperties() map[string]MetadataValue { if o == nil || IsNil(o.CustomProperties) { @@ -142,38 +174,6 @@ func (o *ServingEnvironmentCreate) SetExternalId(v string) { o.ExternalId = &v } -// GetName returns the Name field value if set, zero value otherwise. -func (o *ServingEnvironmentCreate) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServingEnvironmentCreate) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ServingEnvironmentCreate) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ServingEnvironmentCreate) SetName(v string) { - o.Name = &v -} - func (o ServingEnvironmentCreate) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -184,6 +184,9 @@ func (o ServingEnvironmentCreate) MarshalJSON() ([]byte, error) { func (o ServingEnvironmentCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties } @@ -193,9 +196,6 @@ func (o ServingEnvironmentCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } return toSerialize, nil } diff --git a/pkg/openapi/model_serving_environment_list.go b/pkg/openapi/model_serving_environment_list.go index acfc6de9..ae230a1f 100644 --- a/pkg/openapi/model_serving_environment_list.go +++ b/pkg/openapi/model_serving_environment_list.go @@ -19,14 +19,14 @@ var _ MappedNullable = &ServingEnvironmentList{} // ServingEnvironmentList List of ServingEnvironments. type ServingEnvironmentList struct { + // + Items []ServingEnvironment `json:"items,omitempty"` // Token to use to retrieve next page of results. NextPageToken string `json:"nextPageToken"` // Maximum number of resources to return in the result. PageSize int32 `json:"pageSize"` // Number of items in result list. Size int32 `json:"size"` - // - Items []ServingEnvironment `json:"items,omitempty"` } // NewServingEnvironmentList instantiates a new ServingEnvironmentList object @@ -49,6 +49,38 @@ func NewServingEnvironmentListWithDefaults() *ServingEnvironmentList { return &this } +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ServingEnvironmentList) GetItems() []ServingEnvironment { + if o == nil || IsNil(o.Items) { + var ret []ServingEnvironment + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServingEnvironmentList) GetItemsOk() ([]ServingEnvironment, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ServingEnvironmentList) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ServingEnvironment and assigns it to the Items field. +func (o *ServingEnvironmentList) SetItems(v []ServingEnvironment) { + o.Items = v +} + // GetNextPageToken returns the NextPageToken field value func (o *ServingEnvironmentList) GetNextPageToken() string { if o == nil { @@ -121,38 +153,6 @@ func (o *ServingEnvironmentList) SetSize(v int32) { o.Size = v } -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ServingEnvironmentList) GetItems() []ServingEnvironment { - if o == nil || IsNil(o.Items) { - var ret []ServingEnvironment - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServingEnvironmentList) GetItemsOk() ([]ServingEnvironment, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ServingEnvironmentList) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []ServingEnvironment and assigns it to the Items field. -func (o *ServingEnvironmentList) SetItems(v []ServingEnvironment) { - o.Items = v -} - func (o ServingEnvironmentList) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -163,12 +163,12 @@ func (o ServingEnvironmentList) MarshalJSON() ([]byte, error) { func (o ServingEnvironmentList) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["nextPageToken"] = o.NextPageToken - toSerialize["pageSize"] = o.PageSize - toSerialize["size"] = o.Size if !IsNil(o.Items) { toSerialize["items"] = o.Items } + toSerialize["nextPageToken"] = o.NextPageToken + toSerialize["pageSize"] = o.PageSize + toSerialize["size"] = o.Size return toSerialize, nil } diff --git a/pkg/openapi/model_with_base_artifact_update.go b/pkg/openapi/model_with_base_artifact_update.go new file mode 100644 index 00000000..5bc71712 --- /dev/null +++ b/pkg/openapi/model_with_base_artifact_update.go @@ -0,0 +1,165 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithBaseArtifactUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithBaseArtifactUpdate{} + +// WithBaseArtifactUpdate struct for WithBaseArtifactUpdate +type WithBaseArtifactUpdate struct { + // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. + Uri *string `json:"uri,omitempty"` + State *ArtifactState `json:"state,omitempty"` +} + +// NewWithBaseArtifactUpdate instantiates a new WithBaseArtifactUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithBaseArtifactUpdate() *WithBaseArtifactUpdate { + this := WithBaseArtifactUpdate{} + var state ArtifactState = ARTIFACTSTATE_UNKNOWN + this.State = &state + return &this +} + +// NewWithBaseArtifactUpdateWithDefaults instantiates a new WithBaseArtifactUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithBaseArtifactUpdateWithDefaults() *WithBaseArtifactUpdate { + this := WithBaseArtifactUpdate{} + var state ArtifactState = ARTIFACTSTATE_UNKNOWN + this.State = &state + return &this +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *WithBaseArtifactUpdate) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithBaseArtifactUpdate) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *WithBaseArtifactUpdate) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *WithBaseArtifactUpdate) SetUri(v string) { + o.Uri = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *WithBaseArtifactUpdate) GetState() ArtifactState { + if o == nil || IsNil(o.State) { + var ret ArtifactState + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithBaseArtifactUpdate) GetStateOk() (*ArtifactState, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *WithBaseArtifactUpdate) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given ArtifactState and assigns it to the State field. +func (o *WithBaseArtifactUpdate) SetState(v ArtifactState) { + o.State = &v +} + +func (o WithBaseArtifactUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithBaseArtifactUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableWithBaseArtifactUpdate struct { + value *WithBaseArtifactUpdate + isSet bool +} + +func (v NullableWithBaseArtifactUpdate) Get() *WithBaseArtifactUpdate { + return v.value +} + +func (v *NullableWithBaseArtifactUpdate) Set(val *WithBaseArtifactUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableWithBaseArtifactUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithBaseArtifactUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithBaseArtifactUpdate(val *WithBaseArtifactUpdate) *NullableWithBaseArtifactUpdate { + return &NullableWithBaseArtifactUpdate{value: val, isSet: true} +} + +func (v NullableWithBaseArtifactUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithBaseArtifactUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_with_base_execution_update.go b/pkg/openapi/model_with_base_execution_update.go new file mode 100644 index 00000000..06078e4d --- /dev/null +++ b/pkg/openapi/model_with_base_execution_update.go @@ -0,0 +1,128 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithBaseExecutionUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithBaseExecutionUpdate{} + +// WithBaseExecutionUpdate struct for WithBaseExecutionUpdate +type WithBaseExecutionUpdate struct { + LastKnownState *ExecutionState `json:"lastKnownState,omitempty"` +} + +// NewWithBaseExecutionUpdate instantiates a new WithBaseExecutionUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithBaseExecutionUpdate() *WithBaseExecutionUpdate { + this := WithBaseExecutionUpdate{} + var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN + this.LastKnownState = &lastKnownState + return &this +} + +// NewWithBaseExecutionUpdateWithDefaults instantiates a new WithBaseExecutionUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithBaseExecutionUpdateWithDefaults() *WithBaseExecutionUpdate { + this := WithBaseExecutionUpdate{} + var lastKnownState ExecutionState = EXECUTIONSTATE_UNKNOWN + this.LastKnownState = &lastKnownState + return &this +} + +// GetLastKnownState returns the LastKnownState field value if set, zero value otherwise. +func (o *WithBaseExecutionUpdate) GetLastKnownState() ExecutionState { + if o == nil || IsNil(o.LastKnownState) { + var ret ExecutionState + return ret + } + return *o.LastKnownState +} + +// GetLastKnownStateOk returns a tuple with the LastKnownState field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithBaseExecutionUpdate) GetLastKnownStateOk() (*ExecutionState, bool) { + if o == nil || IsNil(o.LastKnownState) { + return nil, false + } + return o.LastKnownState, true +} + +// HasLastKnownState returns a boolean if a field has been set. +func (o *WithBaseExecutionUpdate) HasLastKnownState() bool { + if o != nil && !IsNil(o.LastKnownState) { + return true + } + + return false +} + +// SetLastKnownState gets a reference to the given ExecutionState and assigns it to the LastKnownState field. +func (o *WithBaseExecutionUpdate) SetLastKnownState(v ExecutionState) { + o.LastKnownState = &v +} + +func (o WithBaseExecutionUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithBaseExecutionUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LastKnownState) { + toSerialize["lastKnownState"] = o.LastKnownState + } + return toSerialize, nil +} + +type NullableWithBaseExecutionUpdate struct { + value *WithBaseExecutionUpdate + isSet bool +} + +func (v NullableWithBaseExecutionUpdate) Get() *WithBaseExecutionUpdate { + return v.value +} + +func (v *NullableWithBaseExecutionUpdate) Set(val *WithBaseExecutionUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableWithBaseExecutionUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithBaseExecutionUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithBaseExecutionUpdate(val *WithBaseExecutionUpdate) *NullableWithBaseExecutionUpdate { + return &NullableWithBaseExecutionUpdate{value: val, isSet: true} +} + +func (v NullableWithBaseExecutionUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithBaseExecutionUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_with_base_resource.go b/pkg/openapi/model_with_base_resource.go new file mode 100644 index 00000000..be58d3f4 --- /dev/null +++ b/pkg/openapi/model_with_base_resource.go @@ -0,0 +1,199 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithBaseResource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithBaseResource{} + +// WithBaseResource struct for WithBaseResource +type WithBaseResource struct { + // Output only. The unique server generated id of the resource. + Id *string `json:"id,omitempty"` + // Output only. Create time of the resource in millisecond since epoch. + CreateTimeSinceEpoch *string `json:"createTimeSinceEpoch,omitempty"` + // Output only. Last update time of the resource since epoch in millisecond since epoch. + LastUpdateTimeSinceEpoch *string `json:"lastUpdateTimeSinceEpoch,omitempty"` +} + +// NewWithBaseResource instantiates a new WithBaseResource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithBaseResource() *WithBaseResource { + this := WithBaseResource{} + return &this +} + +// NewWithBaseResourceWithDefaults instantiates a new WithBaseResource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithBaseResourceWithDefaults() *WithBaseResource { + this := WithBaseResource{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *WithBaseResource) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithBaseResource) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *WithBaseResource) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *WithBaseResource) SetId(v string) { + o.Id = &v +} + +// GetCreateTimeSinceEpoch returns the CreateTimeSinceEpoch field value if set, zero value otherwise. +func (o *WithBaseResource) GetCreateTimeSinceEpoch() string { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { + var ret string + return ret + } + return *o.CreateTimeSinceEpoch +} + +// GetCreateTimeSinceEpochOk returns a tuple with the CreateTimeSinceEpoch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithBaseResource) GetCreateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.CreateTimeSinceEpoch) { + return nil, false + } + return o.CreateTimeSinceEpoch, true +} + +// HasCreateTimeSinceEpoch returns a boolean if a field has been set. +func (o *WithBaseResource) HasCreateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.CreateTimeSinceEpoch) { + return true + } + + return false +} + +// SetCreateTimeSinceEpoch gets a reference to the given string and assigns it to the CreateTimeSinceEpoch field. +func (o *WithBaseResource) SetCreateTimeSinceEpoch(v string) { + o.CreateTimeSinceEpoch = &v +} + +// GetLastUpdateTimeSinceEpoch returns the LastUpdateTimeSinceEpoch field value if set, zero value otherwise. +func (o *WithBaseResource) GetLastUpdateTimeSinceEpoch() string { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { + var ret string + return ret + } + return *o.LastUpdateTimeSinceEpoch +} + +// GetLastUpdateTimeSinceEpochOk returns a tuple with the LastUpdateTimeSinceEpoch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithBaseResource) GetLastUpdateTimeSinceEpochOk() (*string, bool) { + if o == nil || IsNil(o.LastUpdateTimeSinceEpoch) { + return nil, false + } + return o.LastUpdateTimeSinceEpoch, true +} + +// HasLastUpdateTimeSinceEpoch returns a boolean if a field has been set. +func (o *WithBaseResource) HasLastUpdateTimeSinceEpoch() bool { + if o != nil && !IsNil(o.LastUpdateTimeSinceEpoch) { + return true + } + + return false +} + +// SetLastUpdateTimeSinceEpoch gets a reference to the given string and assigns it to the LastUpdateTimeSinceEpoch field. +func (o *WithBaseResource) SetLastUpdateTimeSinceEpoch(v string) { + o.LastUpdateTimeSinceEpoch = &v +} + +func (o WithBaseResource) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithBaseResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.CreateTimeSinceEpoch) { + toSerialize["createTimeSinceEpoch"] = o.CreateTimeSinceEpoch + } + if !IsNil(o.LastUpdateTimeSinceEpoch) { + toSerialize["lastUpdateTimeSinceEpoch"] = o.LastUpdateTimeSinceEpoch + } + return toSerialize, nil +} + +type NullableWithBaseResource struct { + value *WithBaseResource + isSet bool +} + +func (v NullableWithBaseResource) Get() *WithBaseResource { + return v.value +} + +func (v *NullableWithBaseResource) Set(val *WithBaseResource) { + v.value = val + v.isSet = true +} + +func (v NullableWithBaseResource) IsSet() bool { + return v.isSet +} + +func (v *NullableWithBaseResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithBaseResource(val *WithBaseResource) *NullableWithBaseResource { + return &NullableWithBaseResource{value: val, isSet: true} +} + +func (v NullableWithBaseResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithBaseResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_with_base_resource_create.go b/pkg/openapi/model_with_base_resource_create.go new file mode 100644 index 00000000..59f1f586 --- /dev/null +++ b/pkg/openapi/model_with_base_resource_create.go @@ -0,0 +1,125 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithBaseResourceCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithBaseResourceCreate{} + +// WithBaseResourceCreate struct for WithBaseResourceCreate +type WithBaseResourceCreate struct { + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` +} + +// NewWithBaseResourceCreate instantiates a new WithBaseResourceCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithBaseResourceCreate() *WithBaseResourceCreate { + this := WithBaseResourceCreate{} + return &this +} + +// NewWithBaseResourceCreateWithDefaults instantiates a new WithBaseResourceCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithBaseResourceCreateWithDefaults() *WithBaseResourceCreate { + this := WithBaseResourceCreate{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WithBaseResourceCreate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithBaseResourceCreate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *WithBaseResourceCreate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *WithBaseResourceCreate) SetName(v string) { + o.Name = &v +} + +func (o WithBaseResourceCreate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithBaseResourceCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableWithBaseResourceCreate struct { + value *WithBaseResourceCreate + isSet bool +} + +func (v NullableWithBaseResourceCreate) Get() *WithBaseResourceCreate { + return v.value +} + +func (v *NullableWithBaseResourceCreate) Set(val *WithBaseResourceCreate) { + v.value = val + v.isSet = true +} + +func (v NullableWithBaseResourceCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithBaseResourceCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithBaseResourceCreate(val *WithBaseResourceCreate) *NullableWithBaseResourceCreate { + return &NullableWithBaseResourceCreate{value: val, isSet: true} +} + +func (v NullableWithBaseResourceCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithBaseResourceCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_base_resource_update.go b/pkg/openapi/model_with_base_resource_update.go similarity index 63% rename from pkg/openapi/model_base_resource_update.go rename to pkg/openapi/model_with_base_resource_update.go index a9afc118..c143acf6 100644 --- a/pkg/openapi/model_base_resource_update.go +++ b/pkg/openapi/model_with_base_resource_update.go @@ -14,11 +14,11 @@ import ( "encoding/json" ) -// checks if the BaseResourceUpdate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BaseResourceUpdate{} +// checks if the WithBaseResourceUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithBaseResourceUpdate{} -// BaseResourceUpdate struct for BaseResourceUpdate -type BaseResourceUpdate struct { +// WithBaseResourceUpdate struct for WithBaseResourceUpdate +type WithBaseResourceUpdate struct { // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. @@ -27,25 +27,25 @@ type BaseResourceUpdate struct { ExternalId *string `json:"externalId,omitempty"` } -// NewBaseResourceUpdate instantiates a new BaseResourceUpdate object +// NewWithBaseResourceUpdate instantiates a new WithBaseResourceUpdate object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewBaseResourceUpdate() *BaseResourceUpdate { - this := BaseResourceUpdate{} +func NewWithBaseResourceUpdate() *WithBaseResourceUpdate { + this := WithBaseResourceUpdate{} return &this } -// NewBaseResourceUpdateWithDefaults instantiates a new BaseResourceUpdate object +// NewWithBaseResourceUpdateWithDefaults instantiates a new WithBaseResourceUpdate object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewBaseResourceUpdateWithDefaults() *BaseResourceUpdate { - this := BaseResourceUpdate{} +func NewWithBaseResourceUpdateWithDefaults() *WithBaseResourceUpdate { + this := WithBaseResourceUpdate{} return &this } // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. -func (o *BaseResourceUpdate) GetCustomProperties() map[string]MetadataValue { +func (o *WithBaseResourceUpdate) GetCustomProperties() map[string]MetadataValue { if o == nil || IsNil(o.CustomProperties) { var ret map[string]MetadataValue return ret @@ -55,7 +55,7 @@ func (o *BaseResourceUpdate) GetCustomProperties() map[string]MetadataValue { // GetCustomPropertiesOk returns a tuple with the CustomProperties field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *BaseResourceUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { +func (o *WithBaseResourceUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, bool) { if o == nil || IsNil(o.CustomProperties) { return nil, false } @@ -63,7 +63,7 @@ func (o *BaseResourceUpdate) GetCustomPropertiesOk() (*map[string]MetadataValue, } // HasCustomProperties returns a boolean if a field has been set. -func (o *BaseResourceUpdate) HasCustomProperties() bool { +func (o *WithBaseResourceUpdate) HasCustomProperties() bool { if o != nil && !IsNil(o.CustomProperties) { return true } @@ -72,12 +72,12 @@ func (o *BaseResourceUpdate) HasCustomProperties() bool { } // SetCustomProperties gets a reference to the given map[string]MetadataValue and assigns it to the CustomProperties field. -func (o *BaseResourceUpdate) SetCustomProperties(v map[string]MetadataValue) { +func (o *WithBaseResourceUpdate) SetCustomProperties(v map[string]MetadataValue) { o.CustomProperties = &v } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *BaseResourceUpdate) GetDescription() string { +func (o *WithBaseResourceUpdate) GetDescription() string { if o == nil || IsNil(o.Description) { var ret string return ret @@ -87,7 +87,7 @@ func (o *BaseResourceUpdate) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *BaseResourceUpdate) GetDescriptionOk() (*string, bool) { +func (o *WithBaseResourceUpdate) GetDescriptionOk() (*string, bool) { if o == nil || IsNil(o.Description) { return nil, false } @@ -95,7 +95,7 @@ func (o *BaseResourceUpdate) GetDescriptionOk() (*string, bool) { } // HasDescription returns a boolean if a field has been set. -func (o *BaseResourceUpdate) HasDescription() bool { +func (o *WithBaseResourceUpdate) HasDescription() bool { if o != nil && !IsNil(o.Description) { return true } @@ -104,12 +104,12 @@ func (o *BaseResourceUpdate) HasDescription() bool { } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *BaseResourceUpdate) SetDescription(v string) { +func (o *WithBaseResourceUpdate) SetDescription(v string) { o.Description = &v } // GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *BaseResourceUpdate) GetExternalId() string { +func (o *WithBaseResourceUpdate) GetExternalId() string { if o == nil || IsNil(o.ExternalId) { var ret string return ret @@ -119,7 +119,7 @@ func (o *BaseResourceUpdate) GetExternalId() string { // GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *BaseResourceUpdate) GetExternalIdOk() (*string, bool) { +func (o *WithBaseResourceUpdate) GetExternalIdOk() (*string, bool) { if o == nil || IsNil(o.ExternalId) { return nil, false } @@ -127,7 +127,7 @@ func (o *BaseResourceUpdate) GetExternalIdOk() (*string, bool) { } // HasExternalId returns a boolean if a field has been set. -func (o *BaseResourceUpdate) HasExternalId() bool { +func (o *WithBaseResourceUpdate) HasExternalId() bool { if o != nil && !IsNil(o.ExternalId) { return true } @@ -136,11 +136,11 @@ func (o *BaseResourceUpdate) HasExternalId() bool { } // SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *BaseResourceUpdate) SetExternalId(v string) { +func (o *WithBaseResourceUpdate) SetExternalId(v string) { o.ExternalId = &v } -func (o BaseResourceUpdate) MarshalJSON() ([]byte, error) { +func (o WithBaseResourceUpdate) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err @@ -148,7 +148,7 @@ func (o BaseResourceUpdate) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o BaseResourceUpdate) ToMap() (map[string]interface{}, error) { +func (o WithBaseResourceUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties @@ -162,38 +162,38 @@ func (o BaseResourceUpdate) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -type NullableBaseResourceUpdate struct { - value *BaseResourceUpdate +type NullableWithBaseResourceUpdate struct { + value *WithBaseResourceUpdate isSet bool } -func (v NullableBaseResourceUpdate) Get() *BaseResourceUpdate { +func (v NullableWithBaseResourceUpdate) Get() *WithBaseResourceUpdate { return v.value } -func (v *NullableBaseResourceUpdate) Set(val *BaseResourceUpdate) { +func (v *NullableWithBaseResourceUpdate) Set(val *WithBaseResourceUpdate) { v.value = val v.isSet = true } -func (v NullableBaseResourceUpdate) IsSet() bool { +func (v NullableWithBaseResourceUpdate) IsSet() bool { return v.isSet } -func (v *NullableBaseResourceUpdate) Unset() { +func (v *NullableWithBaseResourceUpdate) Unset() { v.value = nil v.isSet = false } -func NewNullableBaseResourceUpdate(val *BaseResourceUpdate) *NullableBaseResourceUpdate { - return &NullableBaseResourceUpdate{value: val, isSet: true} +func NewNullableWithBaseResourceUpdate(val *WithBaseResourceUpdate) *NullableWithBaseResourceUpdate { + return &NullableWithBaseResourceUpdate{value: val, isSet: true} } -func (v NullableBaseResourceUpdate) MarshalJSON() ([]byte, error) { +func (v NullableWithBaseResourceUpdate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableBaseResourceUpdate) UnmarshalJSON(src []byte) error { +func (v *NullableWithBaseResourceUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/pkg/openapi/model_with_inference_service_create.go b/pkg/openapi/model_with_inference_service_create.go new file mode 100644 index 00000000..7e3bdb0d --- /dev/null +++ b/pkg/openapi/model_with_inference_service_create.go @@ -0,0 +1,144 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithInferenceServiceCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithInferenceServiceCreate{} + +// WithInferenceServiceCreate An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. +type WithInferenceServiceCreate struct { + // ID of the `RegisteredModel` to serve. + RegisteredModelId string `json:"registeredModelId"` + // ID of the parent `ServingEnvironment` for this `InferenceService` entity. + ServingEnvironmentId string `json:"servingEnvironmentId"` +} + +// NewWithInferenceServiceCreate instantiates a new WithInferenceServiceCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithInferenceServiceCreate(registeredModelId string, servingEnvironmentId string) *WithInferenceServiceCreate { + this := WithInferenceServiceCreate{} + this.RegisteredModelId = registeredModelId + this.ServingEnvironmentId = servingEnvironmentId + return &this +} + +// NewWithInferenceServiceCreateWithDefaults instantiates a new WithInferenceServiceCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithInferenceServiceCreateWithDefaults() *WithInferenceServiceCreate { + this := WithInferenceServiceCreate{} + return &this +} + +// GetRegisteredModelId returns the RegisteredModelId field value +func (o *WithInferenceServiceCreate) GetRegisteredModelId() string { + if o == nil { + var ret string + return ret + } + + return o.RegisteredModelId +} + +// GetRegisteredModelIdOk returns a tuple with the RegisteredModelId field value +// and a boolean to check if the value has been set. +func (o *WithInferenceServiceCreate) GetRegisteredModelIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RegisteredModelId, true +} + +// SetRegisteredModelId sets field value +func (o *WithInferenceServiceCreate) SetRegisteredModelId(v string) { + o.RegisteredModelId = v +} + +// GetServingEnvironmentId returns the ServingEnvironmentId field value +func (o *WithInferenceServiceCreate) GetServingEnvironmentId() string { + if o == nil { + var ret string + return ret + } + + return o.ServingEnvironmentId +} + +// GetServingEnvironmentIdOk returns a tuple with the ServingEnvironmentId field value +// and a boolean to check if the value has been set. +func (o *WithInferenceServiceCreate) GetServingEnvironmentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServingEnvironmentId, true +} + +// SetServingEnvironmentId sets field value +func (o *WithInferenceServiceCreate) SetServingEnvironmentId(v string) { + o.ServingEnvironmentId = v +} + +func (o WithInferenceServiceCreate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithInferenceServiceCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["registeredModelId"] = o.RegisteredModelId + toSerialize["servingEnvironmentId"] = o.ServingEnvironmentId + return toSerialize, nil +} + +type NullableWithInferenceServiceCreate struct { + value *WithInferenceServiceCreate + isSet bool +} + +func (v NullableWithInferenceServiceCreate) Get() *WithInferenceServiceCreate { + return v.value +} + +func (v *NullableWithInferenceServiceCreate) Set(val *WithInferenceServiceCreate) { + v.value = val + v.isSet = true +} + +func (v NullableWithInferenceServiceCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithInferenceServiceCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithInferenceServiceCreate(val *WithInferenceServiceCreate) *NullableWithInferenceServiceCreate { + return &NullableWithInferenceServiceCreate{value: val, isSet: true} +} + +func (v NullableWithInferenceServiceCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithInferenceServiceCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_with_inference_service_update.go b/pkg/openapi/model_with_inference_service_update.go new file mode 100644 index 00000000..0f052b68 --- /dev/null +++ b/pkg/openapi/model_with_inference_service_update.go @@ -0,0 +1,202 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithInferenceServiceUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithInferenceServiceUpdate{} + +// WithInferenceServiceUpdate An `InferenceService` entity in a `ServingEnvironment` represents a deployed `ModelVersion` from a `RegisteredModel` created by Model Serving. +type WithInferenceServiceUpdate struct { + // ID of the `ModelVersion` to serve. If it's unspecified, then the latest `ModelVersion` by creation order will be served. + ModelVersionId *string `json:"modelVersionId,omitempty"` + // Model runtime. + Runtime *string `json:"runtime,omitempty"` + DesiredState *InferenceServiceState `json:"desiredState,omitempty"` +} + +// NewWithInferenceServiceUpdate instantiates a new WithInferenceServiceUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithInferenceServiceUpdate() *WithInferenceServiceUpdate { + this := WithInferenceServiceUpdate{} + var desiredState InferenceServiceState = INFERENCESERVICESTATE_DEPLOYED + this.DesiredState = &desiredState + return &this +} + +// NewWithInferenceServiceUpdateWithDefaults instantiates a new WithInferenceServiceUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithInferenceServiceUpdateWithDefaults() *WithInferenceServiceUpdate { + this := WithInferenceServiceUpdate{} + var desiredState InferenceServiceState = INFERENCESERVICESTATE_DEPLOYED + this.DesiredState = &desiredState + return &this +} + +// GetModelVersionId returns the ModelVersionId field value if set, zero value otherwise. +func (o *WithInferenceServiceUpdate) GetModelVersionId() string { + if o == nil || IsNil(o.ModelVersionId) { + var ret string + return ret + } + return *o.ModelVersionId +} + +// GetModelVersionIdOk returns a tuple with the ModelVersionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithInferenceServiceUpdate) GetModelVersionIdOk() (*string, bool) { + if o == nil || IsNil(o.ModelVersionId) { + return nil, false + } + return o.ModelVersionId, true +} + +// HasModelVersionId returns a boolean if a field has been set. +func (o *WithInferenceServiceUpdate) HasModelVersionId() bool { + if o != nil && !IsNil(o.ModelVersionId) { + return true + } + + return false +} + +// SetModelVersionId gets a reference to the given string and assigns it to the ModelVersionId field. +func (o *WithInferenceServiceUpdate) SetModelVersionId(v string) { + o.ModelVersionId = &v +} + +// GetRuntime returns the Runtime field value if set, zero value otherwise. +func (o *WithInferenceServiceUpdate) GetRuntime() string { + if o == nil || IsNil(o.Runtime) { + var ret string + return ret + } + return *o.Runtime +} + +// GetRuntimeOk returns a tuple with the Runtime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithInferenceServiceUpdate) GetRuntimeOk() (*string, bool) { + if o == nil || IsNil(o.Runtime) { + return nil, false + } + return o.Runtime, true +} + +// HasRuntime returns a boolean if a field has been set. +func (o *WithInferenceServiceUpdate) HasRuntime() bool { + if o != nil && !IsNil(o.Runtime) { + return true + } + + return false +} + +// SetRuntime gets a reference to the given string and assigns it to the Runtime field. +func (o *WithInferenceServiceUpdate) SetRuntime(v string) { + o.Runtime = &v +} + +// GetDesiredState returns the DesiredState field value if set, zero value otherwise. +func (o *WithInferenceServiceUpdate) GetDesiredState() InferenceServiceState { + if o == nil || IsNil(o.DesiredState) { + var ret InferenceServiceState + return ret + } + return *o.DesiredState +} + +// GetDesiredStateOk returns a tuple with the DesiredState field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithInferenceServiceUpdate) GetDesiredStateOk() (*InferenceServiceState, bool) { + if o == nil || IsNil(o.DesiredState) { + return nil, false + } + return o.DesiredState, true +} + +// HasDesiredState returns a boolean if a field has been set. +func (o *WithInferenceServiceUpdate) HasDesiredState() bool { + if o != nil && !IsNil(o.DesiredState) { + return true + } + + return false +} + +// SetDesiredState gets a reference to the given InferenceServiceState and assigns it to the DesiredState field. +func (o *WithInferenceServiceUpdate) SetDesiredState(v InferenceServiceState) { + o.DesiredState = &v +} + +func (o WithInferenceServiceUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithInferenceServiceUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ModelVersionId) { + toSerialize["modelVersionId"] = o.ModelVersionId + } + if !IsNil(o.Runtime) { + toSerialize["runtime"] = o.Runtime + } + if !IsNil(o.DesiredState) { + toSerialize["desiredState"] = o.DesiredState + } + return toSerialize, nil +} + +type NullableWithInferenceServiceUpdate struct { + value *WithInferenceServiceUpdate + isSet bool +} + +func (v NullableWithInferenceServiceUpdate) Get() *WithInferenceServiceUpdate { + return v.value +} + +func (v *NullableWithInferenceServiceUpdate) Set(val *WithInferenceServiceUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableWithInferenceServiceUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithInferenceServiceUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithInferenceServiceUpdate(val *WithInferenceServiceUpdate) *NullableWithInferenceServiceUpdate { + return &NullableWithInferenceServiceUpdate{value: val, isSet: true} +} + +func (v NullableWithInferenceServiceUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithInferenceServiceUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_with_model_artifact_update.go b/pkg/openapi/model_with_model_artifact_update.go new file mode 100644 index 00000000..2c90f116 --- /dev/null +++ b/pkg/openapi/model_with_model_artifact_update.go @@ -0,0 +1,273 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithModelArtifactUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithModelArtifactUpdate{} + +// WithModelArtifactUpdate An ML model artifact. +type WithModelArtifactUpdate struct { + // Name of the model format. + ModelFormatName *string `json:"modelFormatName,omitempty"` + // Storage secret name. + StorageKey *string `json:"storageKey,omitempty"` + // Path for model in storage provided by `storageKey`. + StoragePath *string `json:"storagePath,omitempty"` + // Version of the model format. + ModelFormatVersion *string `json:"modelFormatVersion,omitempty"` + // Name of the service account with storage secret. + ServiceAccountName *string `json:"serviceAccountName,omitempty"` +} + +// NewWithModelArtifactUpdate instantiates a new WithModelArtifactUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithModelArtifactUpdate() *WithModelArtifactUpdate { + this := WithModelArtifactUpdate{} + return &this +} + +// NewWithModelArtifactUpdateWithDefaults instantiates a new WithModelArtifactUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithModelArtifactUpdateWithDefaults() *WithModelArtifactUpdate { + this := WithModelArtifactUpdate{} + return &this +} + +// GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise. +func (o *WithModelArtifactUpdate) GetModelFormatName() string { + if o == nil || IsNil(o.ModelFormatName) { + var ret string + return ret + } + return *o.ModelFormatName +} + +// GetModelFormatNameOk returns a tuple with the ModelFormatName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithModelArtifactUpdate) GetModelFormatNameOk() (*string, bool) { + if o == nil || IsNil(o.ModelFormatName) { + return nil, false + } + return o.ModelFormatName, true +} + +// HasModelFormatName returns a boolean if a field has been set. +func (o *WithModelArtifactUpdate) HasModelFormatName() bool { + if o != nil && !IsNil(o.ModelFormatName) { + return true + } + + return false +} + +// SetModelFormatName gets a reference to the given string and assigns it to the ModelFormatName field. +func (o *WithModelArtifactUpdate) SetModelFormatName(v string) { + o.ModelFormatName = &v +} + +// GetStorageKey returns the StorageKey field value if set, zero value otherwise. +func (o *WithModelArtifactUpdate) GetStorageKey() string { + if o == nil || IsNil(o.StorageKey) { + var ret string + return ret + } + return *o.StorageKey +} + +// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithModelArtifactUpdate) GetStorageKeyOk() (*string, bool) { + if o == nil || IsNil(o.StorageKey) { + return nil, false + } + return o.StorageKey, true +} + +// HasStorageKey returns a boolean if a field has been set. +func (o *WithModelArtifactUpdate) HasStorageKey() bool { + if o != nil && !IsNil(o.StorageKey) { + return true + } + + return false +} + +// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field. +func (o *WithModelArtifactUpdate) SetStorageKey(v string) { + o.StorageKey = &v +} + +// GetStoragePath returns the StoragePath field value if set, zero value otherwise. +func (o *WithModelArtifactUpdate) GetStoragePath() string { + if o == nil || IsNil(o.StoragePath) { + var ret string + return ret + } + return *o.StoragePath +} + +// GetStoragePathOk returns a tuple with the StoragePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithModelArtifactUpdate) GetStoragePathOk() (*string, bool) { + if o == nil || IsNil(o.StoragePath) { + return nil, false + } + return o.StoragePath, true +} + +// HasStoragePath returns a boolean if a field has been set. +func (o *WithModelArtifactUpdate) HasStoragePath() bool { + if o != nil && !IsNil(o.StoragePath) { + return true + } + + return false +} + +// SetStoragePath gets a reference to the given string and assigns it to the StoragePath field. +func (o *WithModelArtifactUpdate) SetStoragePath(v string) { + o.StoragePath = &v +} + +// GetModelFormatVersion returns the ModelFormatVersion field value if set, zero value otherwise. +func (o *WithModelArtifactUpdate) GetModelFormatVersion() string { + if o == nil || IsNil(o.ModelFormatVersion) { + var ret string + return ret + } + return *o.ModelFormatVersion +} + +// GetModelFormatVersionOk returns a tuple with the ModelFormatVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithModelArtifactUpdate) GetModelFormatVersionOk() (*string, bool) { + if o == nil || IsNil(o.ModelFormatVersion) { + return nil, false + } + return o.ModelFormatVersion, true +} + +// HasModelFormatVersion returns a boolean if a field has been set. +func (o *WithModelArtifactUpdate) HasModelFormatVersion() bool { + if o != nil && !IsNil(o.ModelFormatVersion) { + return true + } + + return false +} + +// SetModelFormatVersion gets a reference to the given string and assigns it to the ModelFormatVersion field. +func (o *WithModelArtifactUpdate) SetModelFormatVersion(v string) { + o.ModelFormatVersion = &v +} + +// GetServiceAccountName returns the ServiceAccountName field value if set, zero value otherwise. +func (o *WithModelArtifactUpdate) GetServiceAccountName() string { + if o == nil || IsNil(o.ServiceAccountName) { + var ret string + return ret + } + return *o.ServiceAccountName +} + +// GetServiceAccountNameOk returns a tuple with the ServiceAccountName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithModelArtifactUpdate) GetServiceAccountNameOk() (*string, bool) { + if o == nil || IsNil(o.ServiceAccountName) { + return nil, false + } + return o.ServiceAccountName, true +} + +// HasServiceAccountName returns a boolean if a field has been set. +func (o *WithModelArtifactUpdate) HasServiceAccountName() bool { + if o != nil && !IsNil(o.ServiceAccountName) { + return true + } + + return false +} + +// SetServiceAccountName gets a reference to the given string and assigns it to the ServiceAccountName field. +func (o *WithModelArtifactUpdate) SetServiceAccountName(v string) { + o.ServiceAccountName = &v +} + +func (o WithModelArtifactUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithModelArtifactUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ModelFormatName) { + toSerialize["modelFormatName"] = o.ModelFormatName + } + if !IsNil(o.StorageKey) { + toSerialize["storageKey"] = o.StorageKey + } + if !IsNil(o.StoragePath) { + toSerialize["storagePath"] = o.StoragePath + } + if !IsNil(o.ModelFormatVersion) { + toSerialize["modelFormatVersion"] = o.ModelFormatVersion + } + if !IsNil(o.ServiceAccountName) { + toSerialize["serviceAccountName"] = o.ServiceAccountName + } + return toSerialize, nil +} + +type NullableWithModelArtifactUpdate struct { + value *WithModelArtifactUpdate + isSet bool +} + +func (v NullableWithModelArtifactUpdate) Get() *WithModelArtifactUpdate { + return v.value +} + +func (v *NullableWithModelArtifactUpdate) Set(val *WithModelArtifactUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableWithModelArtifactUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithModelArtifactUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithModelArtifactUpdate(val *WithModelArtifactUpdate) *NullableWithModelArtifactUpdate { + return &NullableWithModelArtifactUpdate{value: val, isSet: true} +} + +func (v NullableWithModelArtifactUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithModelArtifactUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_with_model_version_update.go b/pkg/openapi/model_with_model_version_update.go new file mode 100644 index 00000000..d9748958 --- /dev/null +++ b/pkg/openapi/model_with_model_version_update.go @@ -0,0 +1,165 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithModelVersionUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithModelVersionUpdate{} + +// WithModelVersionUpdate Represents a ModelVersion belonging to a RegisteredModel. +type WithModelVersionUpdate struct { + State *ModelVersionState `json:"state,omitempty"` + // Name of the author. + Author *string `json:"author,omitempty"` +} + +// NewWithModelVersionUpdate instantiates a new WithModelVersionUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithModelVersionUpdate() *WithModelVersionUpdate { + this := WithModelVersionUpdate{} + var state ModelVersionState = MODELVERSIONSTATE_LIVE + this.State = &state + return &this +} + +// NewWithModelVersionUpdateWithDefaults instantiates a new WithModelVersionUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithModelVersionUpdateWithDefaults() *WithModelVersionUpdate { + this := WithModelVersionUpdate{} + var state ModelVersionState = MODELVERSIONSTATE_LIVE + this.State = &state + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *WithModelVersionUpdate) GetState() ModelVersionState { + if o == nil || IsNil(o.State) { + var ret ModelVersionState + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithModelVersionUpdate) GetStateOk() (*ModelVersionState, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *WithModelVersionUpdate) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given ModelVersionState and assigns it to the State field. +func (o *WithModelVersionUpdate) SetState(v ModelVersionState) { + o.State = &v +} + +// GetAuthor returns the Author field value if set, zero value otherwise. +func (o *WithModelVersionUpdate) GetAuthor() string { + if o == nil || IsNil(o.Author) { + var ret string + return ret + } + return *o.Author +} + +// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithModelVersionUpdate) GetAuthorOk() (*string, bool) { + if o == nil || IsNil(o.Author) { + return nil, false + } + return o.Author, true +} + +// HasAuthor returns a boolean if a field has been set. +func (o *WithModelVersionUpdate) HasAuthor() bool { + if o != nil && !IsNil(o.Author) { + return true + } + + return false +} + +// SetAuthor gets a reference to the given string and assigns it to the Author field. +func (o *WithModelVersionUpdate) SetAuthor(v string) { + o.Author = &v +} + +func (o WithModelVersionUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithModelVersionUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + if !IsNil(o.Author) { + toSerialize["author"] = o.Author + } + return toSerialize, nil +} + +type NullableWithModelVersionUpdate struct { + value *WithModelVersionUpdate + isSet bool +} + +func (v NullableWithModelVersionUpdate) Get() *WithModelVersionUpdate { + return v.value +} + +func (v *NullableWithModelVersionUpdate) Set(val *WithModelVersionUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableWithModelVersionUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithModelVersionUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithModelVersionUpdate(val *WithModelVersionUpdate) *NullableWithModelVersionUpdate { + return &NullableWithModelVersionUpdate{value: val, isSet: true} +} + +func (v NullableWithModelVersionUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithModelVersionUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_with_registered_model_update.go b/pkg/openapi/model_with_registered_model_update.go new file mode 100644 index 00000000..5410f88d --- /dev/null +++ b/pkg/openapi/model_with_registered_model_update.go @@ -0,0 +1,128 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithRegisteredModelUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithRegisteredModelUpdate{} + +// WithRegisteredModelUpdate A registered model in model registry. A registered model has ModelVersion children. +type WithRegisteredModelUpdate struct { + State *RegisteredModelState `json:"state,omitempty"` +} + +// NewWithRegisteredModelUpdate instantiates a new WithRegisteredModelUpdate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithRegisteredModelUpdate() *WithRegisteredModelUpdate { + this := WithRegisteredModelUpdate{} + var state RegisteredModelState = REGISTEREDMODELSTATE_LIVE + this.State = &state + return &this +} + +// NewWithRegisteredModelUpdateWithDefaults instantiates a new WithRegisteredModelUpdate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithRegisteredModelUpdateWithDefaults() *WithRegisteredModelUpdate { + this := WithRegisteredModelUpdate{} + var state RegisteredModelState = REGISTEREDMODELSTATE_LIVE + this.State = &state + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *WithRegisteredModelUpdate) GetState() RegisteredModelState { + if o == nil || IsNil(o.State) { + var ret RegisteredModelState + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WithRegisteredModelUpdate) GetStateOk() (*RegisteredModelState, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *WithRegisteredModelUpdate) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given RegisteredModelState and assigns it to the State field. +func (o *WithRegisteredModelUpdate) SetState(v RegisteredModelState) { + o.State = &v +} + +func (o WithRegisteredModelUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithRegisteredModelUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableWithRegisteredModelUpdate struct { + value *WithRegisteredModelUpdate + isSet bool +} + +func (v NullableWithRegisteredModelUpdate) Get() *WithRegisteredModelUpdate { + return v.value +} + +func (v *NullableWithRegisteredModelUpdate) Set(val *WithRegisteredModelUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableWithRegisteredModelUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithRegisteredModelUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithRegisteredModelUpdate(val *WithRegisteredModelUpdate) *NullableWithRegisteredModelUpdate { + return &NullableWithRegisteredModelUpdate{value: val, isSet: true} +} + +func (v NullableWithRegisteredModelUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithRegisteredModelUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/pkg/openapi/model_with_serve_model_create.go b/pkg/openapi/model_with_serve_model_create.go new file mode 100644 index 00000000..afa02f8f --- /dev/null +++ b/pkg/openapi/model_with_serve_model_create.go @@ -0,0 +1,116 @@ +/* +Model Registry REST API + +REST API for Model Registry to create and manage ML model metadata + +API version: v1alpha3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the WithServeModelCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WithServeModelCreate{} + +// WithServeModelCreate An ML model serving action. +type WithServeModelCreate struct { + // ID of the `ModelVersion` that was served in `InferenceService`. + ModelVersionId string `json:"modelVersionId"` +} + +// NewWithServeModelCreate instantiates a new WithServeModelCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWithServeModelCreate(modelVersionId string) *WithServeModelCreate { + this := WithServeModelCreate{} + this.ModelVersionId = modelVersionId + return &this +} + +// NewWithServeModelCreateWithDefaults instantiates a new WithServeModelCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWithServeModelCreateWithDefaults() *WithServeModelCreate { + this := WithServeModelCreate{} + return &this +} + +// GetModelVersionId returns the ModelVersionId field value +func (o *WithServeModelCreate) GetModelVersionId() string { + if o == nil { + var ret string + return ret + } + + return o.ModelVersionId +} + +// GetModelVersionIdOk returns a tuple with the ModelVersionId field value +// and a boolean to check if the value has been set. +func (o *WithServeModelCreate) GetModelVersionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ModelVersionId, true +} + +// SetModelVersionId sets field value +func (o *WithServeModelCreate) SetModelVersionId(v string) { + o.ModelVersionId = v +} + +func (o WithServeModelCreate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WithServeModelCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["modelVersionId"] = o.ModelVersionId + return toSerialize, nil +} + +type NullableWithServeModelCreate struct { + value *WithServeModelCreate + isSet bool +} + +func (v NullableWithServeModelCreate) Get() *WithServeModelCreate { + return v.value +} + +func (v *NullableWithServeModelCreate) Set(val *WithServeModelCreate) { + v.value = val + v.isSet = true +} + +func (v NullableWithServeModelCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableWithServeModelCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWithServeModelCreate(val *WithServeModelCreate) *NullableWithServeModelCreate { + return &NullableWithServeModelCreate{value: val, isSet: true} +} + +func (v NullableWithServeModelCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWithServeModelCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/test/python-kiota/tests/basic_test.py b/test/python-kiota/tests/basic_test.py index a7075eda..ec2fc3af 100644 --- a/test/python-kiota/tests/basic_test.py +++ b/test/python-kiota/tests/basic_test.py @@ -1,15 +1,10 @@ import asyncio -from dataclasses import dataclass -from typing import Optional -from httpx import QueryParams import pytest import subprocess import time import os import sys import requests -import json -from kiota_abstractions.headers_collection import HeadersCollection from kiota_abstractions.base_request_configuration import RequestConfiguration from kiota_abstractions.authentication.anonymous_authentication_provider import ( AnonymousAuthenticationProvider, @@ -17,8 +12,9 @@ from kiota_http.httpx_request_adapter import HttpxRequestAdapter from apisdk.client.registry_client import RegistryClient from apisdk.client.models.registered_model_create import RegisteredModelCreate -from apisdk.client.models.registered_model_state import RegisteredModelState +from apisdk.client.models.model_version_create import ModelVersionCreate from apisdk.client.api.model_registry.v1alpha3.registered_model.registered_model_request_builder import Registered_modelRequestBuilder +from apisdk.client.api.model_registry.v1alpha3.model_versions.model_versions_request_builder import Model_versionsRequestBuilder # from apisdk.client.models.model_artifact_create import ModelArtifactCreate # from apisdk.client.api.model_registry.v1alpha3.model_artifact.model_artifact_request_builder import Model_artifactRequestBuilder @@ -77,10 +73,6 @@ def event_loop(): yield loop loop.close() -# registered Model -# registered version -# model artifact - @pytest.mark.asyncio async def test_registered_model_create_and_retrieve(): auth_provider = AnonymousAuthenticationProvider() @@ -101,3 +93,26 @@ async def test_registered_model_create_and_retrieve(): ) return_model_artifact = await client.api.model_registry.v1alpha3.registered_model.get(RequestConfiguration(query_params=query_params)) print(return_model_artifact) + +@pytest.mark.asyncio +async def test_model_version_create_and_retrieve(): + auth_provider = AnonymousAuthenticationProvider() + request_adapter = HttpxRequestAdapter(auth_provider) + request_adapter.base_url = REGISTRY_URL + client = RegistryClient(request_adapter) + + payload = ModelVersionCreate() + payload.author = "me" + payload.name = "FOO" + payload.description = "a foo" + + # TODO: this returns 422 ... not sure why + create_model_version = await client.api.model_registry.v1alpha3.model_versions.post(body=payload) + assert create_model_version is not None + + query_params = Model_versionsRequestBuilder.Model_versionsRequestBuilderGetQueryParameters( + name=create_model_version.name + ) + return_model_version = await client.api.model_registry.v1alpha3.model_versions.get(RequestConfiguration(query_params=query_params)) + print(return_model_version) + From 171eab04718d30d8ef93e3ceb9832eaf48005dff Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Wed, 27 Mar 2024 18:55:55 +0100 Subject: [PATCH 4/6] add testing up to discriminator deser fails Signed-off-by: Matteo Mortari --- test/python-kiota/tests/basic_test.py | 111 +++++++++++++++++++++----- 1 file changed, 92 insertions(+), 19 deletions(-) diff --git a/test/python-kiota/tests/basic_test.py b/test/python-kiota/tests/basic_test.py index ec2fc3af..cd9ea9d9 100644 --- a/test/python-kiota/tests/basic_test.py +++ b/test/python-kiota/tests/basic_test.py @@ -1,4 +1,6 @@ import asyncio +from apisdk.client.models.model_artifact import ModelArtifact +from apisdk.client.models.model_version import ModelVersion import pytest import subprocess import time @@ -14,6 +16,7 @@ from apisdk.client.models.registered_model_create import RegisteredModelCreate from apisdk.client.models.model_version_create import ModelVersionCreate from apisdk.client.api.model_registry.v1alpha3.registered_model.registered_model_request_builder import Registered_modelRequestBuilder +from apisdk.client.api.model_registry.v1alpha3.model_version.model_version_request_builder import Model_versionRequestBuilder from apisdk.client.api.model_registry.v1alpha3.model_versions.model_versions_request_builder import Model_versionsRequestBuilder # from apisdk.client.models.model_artifact_create import ModelArtifactCreate # from apisdk.client.api.model_registry.v1alpha3.model_artifact.model_artifact_request_builder import Model_artifactRequestBuilder @@ -50,6 +53,15 @@ def poll_for_ready(): @pytest.fixture(scope="session", autouse=True) def registry_server(request): + model_registry_root_dir = model_registry_root(request) + print( + "Assuming this is the Model Registry root directory:", model_registry_root_dir + ) + shared_volume = model_registry_root_dir / "test/config/ml-metadata" + sqlite_db_file = shared_volume / "metadata.sqlite.db" + if sqlite_db_file.exists(): + msg = f"The file {sqlite_db_file} already exists; make sure to cancel it before running these tests." + raise FileExistsError(msg) root_folder = os.path.join(sys.path[0], "..", "..", "..") print(f" Starting Docker Compose in folder {root_folder}") subprocess.call(f"{DOCKER} compose -f docker-compose-local.yaml build", shell=True, cwd=root_folder) @@ -57,11 +69,33 @@ def registry_server(request): request.addfinalizer(p.kill) request.addfinalizer(cleanup) poll_for_ready() - + + +def model_registry_root(request): + return (request.config.rootpath / "../..").resolve() # resolves to absolute path + + +@pytest.fixture(scope="session", autouse=True) +def plain_wrapper(request): + sqlite_db_file = ( + model_registry_root(request) / "test/config/ml-metadata/metadata.sqlite.db" + ) + + def teardown(): + try: + os.remove(sqlite_db_file) + print(f"Removed {sqlite_db_file} successfully.") + except Exception as e: + print(f"An error occurred while removing {sqlite_db_file}: {e}") + print("plain_wrapper_after_each done.") + + request.addfinalizer(teardown) + + def cleanup(): root_folder = os.path.join(sys.path[0], "..", "..", "..") print(f" Closing Docker Compose in folder {root_folder}") - subprocess.Popen(f"{DOCKER} compose -f docker-compose-local.yaml down", shell=False, cwd=root_folder) + subprocess.call(f"{DOCKER} compose -f docker-compose-local.yaml down", shell=True, cwd=root_folder) # workaround: https://stackoverflow.com/a/72104554 @pytest.fixture(scope="session", autouse=True) @@ -73,46 +107,85 @@ def event_loop(): yield loop loop.close() -@pytest.mark.asyncio -async def test_registered_model_create_and_retrieve(): + +def get_client(): auth_provider = AnonymousAuthenticationProvider() request_adapter = HttpxRequestAdapter(auth_provider) request_adapter.base_url = REGISTRY_URL client = RegistryClient(request_adapter) + return client + + +@pytest.mark.asyncio +async def test_registered_model_create_and_retrieve(): + client = get_client() payload = RegisteredModelCreate() payload.name = "FOO" payload.description = "a foo" - # TODO: doesn't work it infer type_id = 10 for some reasons create_registered_model = await client.api.model_registry.v1alpha3.registered_models.post(payload) assert create_registered_model is not None query_params = Registered_modelRequestBuilder.Registered_modelRequestBuilderGetQueryParameters( name= create_registered_model.name ) - return_model_artifact = await client.api.model_registry.v1alpha3.registered_model.get(RequestConfiguration(query_params=query_params)) + return_model_artifact = await client.api.model_registry.v1alpha3.registered_model.get(RequestConfiguration(query_parameters=query_params)) print(return_model_artifact) + @pytest.mark.asyncio async def test_model_version_create_and_retrieve(): - auth_provider = AnonymousAuthenticationProvider() - request_adapter = HttpxRequestAdapter(auth_provider) - request_adapter.base_url = REGISTRY_URL - client = RegistryClient(request_adapter) + client = get_client() + + rm = RegisteredModelCreate() + rm.name = "BAR" + rm.description = "a bar" + + create_registered_model = await client.api.model_registry.v1alpha3.registered_models.post(rm) + assert create_registered_model is not None + print(create_registered_model.id) - payload = ModelVersionCreate() + payload = ModelVersion() payload.author = "me" - payload.name = "FOO" - payload.description = "a foo" + payload.name = "v1" + payload.description = "a v1 for bar" - # TODO: this returns 422 ... not sure why - create_model_version = await client.api.model_registry.v1alpha3.model_versions.post(body=payload) + create_model_version = await client.api.model_registry.v1alpha3.registered_models.by_registeredmodel_id(create_registered_model.id).versions.post(payload) assert create_model_version is not None - query_params = Model_versionsRequestBuilder.Model_versionsRequestBuilderGetQueryParameters( - name=create_model_version.name - ) - return_model_version = await client.api.model_registry.v1alpha3.model_versions.get(RequestConfiguration(query_params=query_params)) + return_model_version = await client.api.model_registry.v1alpha3.model_versions.by_modelversion_id(create_model_version.id).get() + assert return_model_version is not None print(return_model_version) + +@pytest.mark.asyncio +async def test_model_artifact_create_and_retrieve(): + client = get_client() + + rm = RegisteredModelCreate() + rm.name = "BAZ" + rm.description = "a baz" + + create_registered_model = await client.api.model_registry.v1alpha3.registered_models.post(rm) + assert create_registered_model is not None + print(create_registered_model.id) + + mv = ModelVersion() + mv.author = "me" + mv.name = "v1" + mv.description = "a v1 for baz" + + create_model_version = await client.api.model_registry.v1alpha3.registered_models.by_registeredmodel_id(create_registered_model.id).versions.post(mv) + assert create_model_version is not None + + payload = ModelArtifact() + payload.name = "mnist" + payload.uri = "https://acme.org/mnist.onnx" + + create_model_artifact = await client.api.model_registry.v1alpha3.model_versions.by_modelversion_id(create_model_version.id).artifacts.post(payload) + assert create_model_artifact is not None + + return_model_artifact = await client.api.model_registry.v1alpha3.model_artifacts.by_modelartifact_id(create_model_artifact.id).get() + assert return_model_artifact is not None + print(return_model_artifact) From 82209cbd2ddf0621bdb444e4feecaa3851e967e3 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Tue, 9 Apr 2024 19:05:36 +0100 Subject: [PATCH 5/6] use kiota pre-release --- .dockerignore | 1 + docker-compose.yaml | 8 ++++++-- test/python-kiota/Makefile | 2 +- test/python-kiota/kiota-gen.py | 2 +- test/python-kiota/kiota-version.csproj | 2 +- test/python-kiota/tests/basic_test.py | 27 +++++++++++++++++++++++--- 6 files changed, 34 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index f732a0b2..96e89a6c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ bin include +test diff --git a/docker-compose.yaml b/docker-compose.yaml index 4f8e2d98..4f778113 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,8 +11,12 @@ services: - ./test/config/ml-metadata:/tmp/shared model-registry: image: quay.io/opendatahub/model-registry:latest - command: ["proxy", "--mlmd-hostname", "localhost", "--mlmd-port", "9090"] + command: ["proxy", "--hostname", "0.0.0.0", "--mlmd-hostname", "mlmd-server", "--mlmd-port", "8080"] container_name: model-registry - network_mode: host + ports: + - target: 8080 + published: 8080 + protocol: tcp + mode: host depends_on: - mlmd-server diff --git a/test/python-kiota/Makefile b/test/python-kiota/Makefile index a74b364e..e4d2ab50 100644 --- a/test/python-kiota/Makefile +++ b/test/python-kiota/Makefile @@ -1,7 +1,7 @@ .PHONY: clean clean: - rm -rf openapi.yaml apisdk/client kiota_tmp .venv dist + rm -rf model-registry.yaml apisdk/client kiota_tmp .venv dist .PHONY: install install: diff --git a/test/python-kiota/kiota-gen.py b/test/python-kiota/kiota-gen.py index 903da91b..0d73b487 100644 --- a/test/python-kiota/kiota-gen.py +++ b/test/python-kiota/kiota-gen.py @@ -44,7 +44,7 @@ def generate_kiota_client_files(setup_kwargs): ) print(f"Using Kiota version: {kiota_version}") # Download the Kiota release archive - url = f"https://github.com/microsoft/kiota/releases/download/v{kiota_version}/{kiota_release_name}" + url = f"https://github.com/andreaTP/kiota-prerelease/releases/download/v{kiota_version}/{kiota_release_name}" tmpdir = os.path.join(sys.path[0], "kiota_tmp", kiota_version) if not os.path.exists(tmpdir): diff --git a/test/python-kiota/kiota-version.csproj b/test/python-kiota/kiota-version.csproj index ad4d9978..d2606ddf 100644 --- a/test/python-kiota/kiota-version.csproj +++ b/test/python-kiota/kiota-version.csproj @@ -1,5 +1,5 @@ - + diff --git a/test/python-kiota/tests/basic_test.py b/test/python-kiota/tests/basic_test.py index cd9ea9d9..8a7c4ffa 100644 --- a/test/python-kiota/tests/basic_test.py +++ b/test/python-kiota/tests/basic_test.py @@ -1,5 +1,6 @@ import asyncio from apisdk.client.models.model_artifact import ModelArtifact +from apisdk.client.models.doc_artifact import DocArtifact from apisdk.client.models.model_version import ModelVersion import pytest import subprocess @@ -7,6 +8,7 @@ import os import sys import requests +from uuid import uuid4 from kiota_abstractions.base_request_configuration import RequestConfiguration from kiota_abstractions.authentication.anonymous_authentication_provider import ( AnonymousAuthenticationProvider, @@ -121,17 +123,20 @@ async def test_registered_model_create_and_retrieve(): client = get_client() payload = RegisteredModelCreate() - payload.name = "FOO" + payload.name = f"FOO{uuid4()}" payload.description = "a foo" create_registered_model = await client.api.model_registry.v1alpha3.registered_models.post(payload) assert create_registered_model is not None + print(create_registered_model) + print(create_registered_model.id) query_params = Registered_modelRequestBuilder.Registered_modelRequestBuilderGetQueryParameters( name= create_registered_model.name ) return_model_artifact = await client.api.model_registry.v1alpha3.registered_model.get(RequestConfiguration(query_parameters=query_params)) print(return_model_artifact) + print(return_model_artifact.id) @pytest.mark.asyncio @@ -139,11 +144,12 @@ async def test_model_version_create_and_retrieve(): client = get_client() rm = RegisteredModelCreate() - rm.name = "BAR" + rm.name = f"BAR{uuid4()}" rm.description = "a bar" create_registered_model = await client.api.model_registry.v1alpha3.registered_models.post(rm) assert create_registered_model is not None + print(create_registered_model) print(create_registered_model.id) payload = ModelVersion() @@ -164,11 +170,12 @@ async def test_model_artifact_create_and_retrieve(): client = get_client() rm = RegisteredModelCreate() - rm.name = "BAZ" + rm.name = f"BAZ{uuid4()}" rm.description = "a baz" create_registered_model = await client.api.model_registry.v1alpha3.registered_models.post(rm) assert create_registered_model is not None + print(create_registered_model) print(create_registered_model.id) mv = ModelVersion() @@ -185,7 +192,21 @@ async def test_model_artifact_create_and_retrieve(): create_model_artifact = await client.api.model_registry.v1alpha3.model_versions.by_modelversion_id(create_model_version.id).artifacts.post(payload) assert create_model_artifact is not None + create_model_artifact = create_model_artifact.model_artifact + print(create_model_artifact) + print(create_model_artifact.id) return_model_artifact = await client.api.model_registry.v1alpha3.model_artifacts.by_modelartifact_id(create_model_artifact.id).get() assert return_model_artifact is not None print(return_model_artifact) + + payload = DocArtifact() + payload.uri = "https://acme.org/mnist.onnx" + + create_doc_artifact = await client.api.model_registry.v1alpha3.model_versions.by_modelversion_id(create_model_version.id).artifacts.post(payload) + assert create_doc_artifact is not None + create_doc_artifact = create_doc_artifact.doc_artifact + assert create_doc_artifact is not None + print(create_doc_artifact) + + # How to retrieve a doc_artifact? From 7fd1620040e431b55e8548cc1282f38c831693e7 Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Thu, 11 Apr 2024 10:46:39 +0200 Subject: [PATCH 6/6] local testing also from Matteo's end, tests are passing. Signed-off-by: Matteo Mortari --- docker-compose-local.yaml | 11 ++--------- scripts/install_protoc.sh | 4 +++- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docker-compose-local.yaml b/docker-compose-local.yaml index 7e41366a..eeeac8a5 100644 --- a/docker-compose-local.yaml +++ b/docker-compose-local.yaml @@ -4,10 +4,7 @@ services: image: gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0 container_name: mlmd-server ports: - - target: 8080 - published: 9090 - protocol: tcp - mode: host + - "9090:8080" environment: - METADATA_STORE_SERVER_CONFIG_FILE=/tmp/shared/conn_config.pb volumes: @@ -16,13 +13,9 @@ services: build: context: . dockerfile: Dockerfile - network: host command: ["proxy", "--hostname", "0.0.0.0", "--mlmd-hostname", "mlmd-server", "--mlmd-port", "8080"] container_name: model-registry ports: - - target: 8080 - published: 8080 - protocol: tcp - mode: host + - "8080:8080" depends_on: - mlmd-server diff --git a/scripts/install_protoc.sh b/scripts/install_protoc.sh index d8ce2a18..69f5ce8a 100755 --- a/scripts/install_protoc.sh +++ b/scripts/install_protoc.sh @@ -9,8 +9,10 @@ if [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX OS="osx" fi -# TODO: support for arm ARCH="x86_64" +if [[ "$(uname -m)" == "arm"* ]]; then + ARCH="arm64" +fi mkdir -p ${SCRIPT_DIR}/../bin