diff --git a/api/openapi/model-registry.yaml b/api/openapi/model-registry.yaml index a7a22c71..a27adf80 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 (see: https://github.com/microsoft/kiota/issues/4428) + # - $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 (see: https://github.com/microsoft/kiota/issues/4428) + # - $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/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) +}