From e95a979d2ec499922c18ca2de4849f7c04cbc1e7 Mon Sep 17 00:00:00 2001 From: Isabella Basso do Amaral Date: Tue, 5 Mar 2024 16:40:37 -0300 Subject: [PATCH] OAS: fixup ID -> Id in parameter names ... to preserve camelCase. Signed-off-by: Isabella Basso do Amaral --- api/openapi/model-registry.yaml | 46 ++-- .../generated/mlmd_openapi_converter.gen.go | 14 +- .../generated/openapi_converter.gen.go | 72 +++--- .../generated/openapi_mlmd_converter.gen.go | 14 +- internal/converter/openapi_converter.go | 14 +- .../openapi/api_model_registry_service.go | 42 ++-- .../api_model_registry_service_service.go | 14 +- internal/server/openapi/type_asserts.go | 2 +- pkg/core/core_test.go | 226 +++++++++--------- pkg/openapi/api_model_registry_service.go | 120 +++++----- pkg/openapi/model_base_artifact.go | 34 +-- pkg/openapi/model_base_artifact_create.go | 34 +-- pkg/openapi/model_base_artifact_update.go | 34 +-- pkg/openapi/model_base_execution.go | 34 +-- pkg/openapi/model_base_execution_create.go | 34 +-- pkg/openapi/model_base_execution_update.go | 34 +-- pkg/openapi/model_base_resource.go | 34 +-- pkg/openapi/model_base_resource_create.go | 34 +-- pkg/openapi/model_base_resource_update.go | 34 +-- pkg/openapi/model_doc_artifact.go | 34 +-- pkg/openapi/model_inference_service.go | 34 +-- pkg/openapi/model_inference_service_create.go | 34 +-- pkg/openapi/model_inference_service_update.go | 34 +-- pkg/openapi/model_model_artifact.go | 34 +-- pkg/openapi/model_model_artifact_create.go | 34 +-- pkg/openapi/model_model_artifact_update.go | 34 +-- pkg/openapi/model_model_version.go | 34 +-- pkg/openapi/model_model_version_create.go | 58 ++--- pkg/openapi/model_model_version_update.go | 34 +-- pkg/openapi/model_order_by_field.go | 4 +- pkg/openapi/model_registered_model.go | 34 +-- pkg/openapi/model_registered_model_create.go | 34 +-- pkg/openapi/model_registered_model_update.go | 34 +-- pkg/openapi/model_serve_model.go | 34 +-- pkg/openapi/model_serve_model_create.go | 34 +-- pkg/openapi/model_serve_model_update.go | 34 +-- pkg/openapi/model_serving_environment.go | 34 +-- .../model_serving_environment_create.go | 34 +-- .../model_serving_environment_update.go | 34 +-- test/scripts/rest.sh | 32 +-- 40 files changed, 788 insertions(+), 788 deletions(-) diff --git a/api/openapi/model-registry.yaml b/api/openapi/model-registry.yaml index fdf1c604..08ee1e06 100644 --- a/api/openapi/model-registry.yaml +++ b/api/openapi/model-registry.yaml @@ -33,8 +33,8 @@ paths: description: Gets the details of a single instance of a `ModelArtifact` that matches search parameters. parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" - - $ref: "#/components/parameters/parentResourceID" + - $ref: "#/components/parameters/externalId" + - $ref: "#/components/parameters/parentResourceId" /api/model_registry/v1alpha2/model_artifacts: summary: Path used to manage the list of modelartifacts. description: >- @@ -248,7 +248,7 @@ paths: description: Gets the details of a single instance of a `RegisteredModel` that matches search parameters. parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" + - $ref: "#/components/parameters/externalId" /api/model_registry/v1alpha2/registered_models: summary: Path used to manage the list of registeredmodels. description: >- @@ -352,7 +352,7 @@ paths: - ModelRegistryService parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" + - $ref: "#/components/parameters/externalId" - $ref: "#/components/parameters/pageSize" - $ref: "#/components/parameters/orderBy" - $ref: "#/components/parameters/sortOrder" @@ -410,7 +410,7 @@ paths: - ModelRegistryService parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" + - $ref: "#/components/parameters/externalId" - $ref: "#/components/parameters/pageSize" - $ref: "#/components/parameters/orderBy" - $ref: "#/components/parameters/sortOrder" @@ -481,8 +481,8 @@ paths: description: Gets the details of a single instance of `InferenceService` that matches search parameters. parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" - - $ref: "#/components/parameters/parentResourceID" + - $ref: "#/components/parameters/externalId" + - $ref: "#/components/parameters/parentResourceId" "/api/model_registry/v1alpha2/inference_services/{inferenceserviceId}": summary: Path used to manage a single InferenceService. description: >- @@ -602,7 +602,7 @@ paths: description: Finds a `ServingEnvironment` entity that matches query parameters. parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" + - $ref: "#/components/parameters/externalId" /api/model_registry/v1alpha2/serving_environments: summary: Path used to manage the list of servingenvironments. description: >- @@ -706,7 +706,7 @@ paths: - ModelRegistryService parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" + - $ref: "#/components/parameters/externalId" - $ref: "#/components/parameters/pageSize" - $ref: "#/components/parameters/orderBy" - $ref: "#/components/parameters/sortOrder" @@ -763,7 +763,7 @@ paths: - ModelRegistryService parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" + - $ref: "#/components/parameters/externalId" - $ref: "#/components/parameters/pageSize" - $ref: "#/components/parameters/orderBy" - $ref: "#/components/parameters/sortOrder" @@ -886,8 +886,8 @@ paths: description: Gets the details of a single instance of a `ModelVersion` that matches search parameters. parameters: - $ref: "#/components/parameters/name" - - $ref: "#/components/parameters/externalID" - - $ref: "#/components/parameters/parentResourceID" + - $ref: "#/components/parameters/externalId" + - $ref: "#/components/parameters/parentResourceId" components: schemas: ArtifactState: @@ -1043,12 +1043,12 @@ components: ModelVersionCreate: description: Represents a ModelVersion belonging to a RegisteredModel. required: - - registeredModelID + - registeredModelId allOf: - $ref: "#/components/schemas/BaseResourceCreate" - $ref: "#/components/schemas/ModelVersionUpdate" properties: - registeredModelID: + registeredModelId: description: ID of the `RegisteredModel` to which this version belongs. type: string ModelVersionUpdate: @@ -1245,7 +1245,7 @@ components: description: |- An optional description about the resource. type: string - externalID: + externalId: description: |- 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. @@ -1331,7 +1331,7 @@ components: enum: - CREATE_TIME - LAST_UPDATE_TIME - - ID + - Id type: string Artifact: oneOf: @@ -1602,21 +1602,21 @@ components: type: string in: query required: false - externalID: + externalId: examples: - externalID: + externalId: value: "10" - name: externalID + name: externalId description: External ID of entity to search. schema: type: string in: query required: false - parentResourceID: + parentResourceId: examples: - parentResourceID: + parentResourceId: value: "10" - name: parentResourceID + name: parentResourceId description: ID of the parent resource to use for search. schema: type: string @@ -1647,7 +1647,7 @@ components: explode: true examples: orderBy: - value: ID + value: Id name: orderBy description: Specifies the order by criteria for listing entities. schema: diff --git a/internal/converter/generated/mlmd_openapi_converter.gen.go b/internal/converter/generated/mlmd_openapi_converter.gen.go index 192341d5..3152711d 100755 --- a/internal/converter/generated/mlmd_openapi_converter.gen.go +++ b/internal/converter/generated/mlmd_openapi_converter.gen.go @@ -31,7 +31,7 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertDocArtifact(source *proto.Artifact) xstring2 := *(*source).ExternalId pString = &xstring2 } - openapiDocArtifact.ExternalID = pString + openapiDocArtifact.ExternalId = pString var pString2 *string if (*source).Uri != nil { xstring3 := *(*source).Uri @@ -62,7 +62,7 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertInferenceService(source *proto.Conte xstring := *(*source).ExternalId pString = &xstring } - openapiInferenceService.ExternalID = pString + openapiInferenceService.ExternalId = pString openapiInferenceService.Name = converter.MapNameFromOwned((*source).Name) openapiInferenceService.Id = converter.Int64ToString((*source).Id) openapiInferenceService.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) @@ -96,7 +96,7 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertModelArtifact(source *proto.Artifact xstring2 := *(*source).ExternalId pString = &xstring2 } - openapiModelArtifact.ExternalID = pString + openapiModelArtifact.ExternalId = pString var pString2 *string if (*source).Uri != nil { xstring3 := *(*source).Uri @@ -132,7 +132,7 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertModelVersion(source *proto.Context) xstring := *(*source).ExternalId pString = &xstring } - openapiModelVersion.ExternalID = pString + openapiModelVersion.ExternalId = pString openapiModelVersion.Name = converter.MapNameFromOwned((*source).Name) openapiModelVersion.State = converter.MapModelVersionState((*source).Properties) openapiModelVersion.Author = converter.MapPropertyAuthor((*source).Properties) @@ -158,7 +158,7 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertRegisteredModel(source *proto.Contex xstring := *(*source).ExternalId pString = &xstring } - openapiRegisteredModel.ExternalID = pString + openapiRegisteredModel.ExternalId = pString var pString2 *string if (*source).Name != nil { xstring2 := *(*source).Name @@ -189,7 +189,7 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertServeModel(source *proto.Execution) xstring := *(*source).ExternalId pString = &xstring } - openapiServeModel.ExternalID = pString + openapiServeModel.ExternalId = pString openapiServeModel.Name = converter.MapNameFromOwned((*source).Name) openapiServeModel.Id = converter.Int64ToString((*source).Id) openapiServeModel.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) @@ -214,7 +214,7 @@ func (c *MLMDToOpenAPIConverterImpl) ConvertServingEnvironment(source *proto.Con xstring := *(*source).ExternalId pString = &xstring } - openapiServingEnvironment.ExternalID = pString + openapiServingEnvironment.ExternalId = pString openapiServingEnvironment.Name = converter.MapNameFromOwned((*source).Name) openapiServingEnvironment.Id = converter.Int64ToString((*source).Id) openapiServingEnvironment.CreateTimeSinceEpoch = converter.Int64ToString((*source).CreateTimeSinceEpoch) diff --git a/internal/converter/generated/openapi_converter.gen.go b/internal/converter/generated/openapi_converter.gen.go index 75d441b1..f88ef4ac 100755 --- a/internal/converter/generated/openapi_converter.gen.go +++ b/internal/converter/generated/openapi_converter.gen.go @@ -29,11 +29,11 @@ func (c *OpenAPIConverterImpl) ConvertInferenceServiceCreate(source *openapi.Inf } openapiInferenceService.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiInferenceService.ExternalID = pString2 + openapiInferenceService.ExternalId = pString2 var pString3 *string if (*source).Name != nil { xstring3 := *(*source).Name @@ -84,11 +84,11 @@ func (c *OpenAPIConverterImpl) ConvertInferenceServiceUpdate(source *openapi.Inf } openapiInferenceService.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiInferenceService.ExternalID = pString2 + openapiInferenceService.ExternalId = pString2 var pString3 *string if (*source).ModelVersionId != nil { xstring3 := *(*source).ModelVersionId @@ -131,11 +131,11 @@ func (c *OpenAPIConverterImpl) ConvertModelArtifactCreate(source *openapi.ModelA } openapiModelArtifact.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiModelArtifact.ExternalID = pString2 + openapiModelArtifact.ExternalId = pString2 var pString3 *string if (*source).Uri != nil { xstring3 := *(*source).Uri @@ -208,11 +208,11 @@ func (c *OpenAPIConverterImpl) ConvertModelArtifactUpdate(source *openapi.ModelA } openapiModelArtifact.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiModelArtifact.ExternalID = pString2 + openapiModelArtifact.ExternalId = pString2 var pString3 *string if (*source).Uri != nil { xstring3 := *(*source).Uri @@ -279,11 +279,11 @@ func (c *OpenAPIConverterImpl) ConvertModelVersionCreate(source *openapi.ModelVe } openapiModelVersion.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiModelVersion.ExternalID = pString2 + openapiModelVersion.ExternalId = pString2 var pString3 *string if (*source).Name != nil { xstring3 := *(*source).Name @@ -326,11 +326,11 @@ func (c *OpenAPIConverterImpl) ConvertModelVersionUpdate(source *openapi.ModelVe } openapiModelVersion.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiModelVersion.ExternalID = pString2 + openapiModelVersion.ExternalId = pString2 var pOpenapiModelVersionState *openapi.ModelVersionState if (*source).State != nil { openapiModelVersionState := openapi.ModelVersionState(*(*source).State) @@ -367,11 +367,11 @@ func (c *OpenAPIConverterImpl) ConvertRegisteredModelCreate(source *openapi.Regi } openapiRegisteredModel.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiRegisteredModel.ExternalID = pString2 + openapiRegisteredModel.ExternalId = pString2 var pString3 *string if (*source).Name != nil { xstring3 := *(*source).Name @@ -408,11 +408,11 @@ func (c *OpenAPIConverterImpl) ConvertRegisteredModelUpdate(source *openapi.Regi } openapiRegisteredModel.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiRegisteredModel.ExternalID = pString2 + openapiRegisteredModel.ExternalId = pString2 var pOpenapiRegisteredModelState *openapi.RegisteredModelState if (*source).State != nil { openapiRegisteredModelState := openapi.RegisteredModelState(*(*source).State) @@ -449,11 +449,11 @@ func (c *OpenAPIConverterImpl) ConvertServeModelCreate(source *openapi.ServeMode } openapiServeModel.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiServeModel.ExternalID = pString2 + openapiServeModel.ExternalId = pString2 var pString3 *string if (*source).Name != nil { xstring3 := *(*source).Name @@ -491,11 +491,11 @@ func (c *OpenAPIConverterImpl) ConvertServeModelUpdate(source *openapi.ServeMode } openapiServeModel.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiServeModel.ExternalID = pString2 + openapiServeModel.ExternalId = pString2 pOpenapiServeModel = &openapiServeModel } return pOpenapiServeModel, nil @@ -520,11 +520,11 @@ func (c *OpenAPIConverterImpl) ConvertServingEnvironmentCreate(source *openapi.S } openapiServingEnvironment.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiServingEnvironment.ExternalID = pString2 + openapiServingEnvironment.ExternalId = pString2 var pString3 *string if (*source).Name != nil { xstring3 := *(*source).Name @@ -555,11 +555,11 @@ func (c *OpenAPIConverterImpl) ConvertServingEnvironmentUpdate(source *openapi.S } openapiServingEnvironment.Description = pString var pString2 *string - if (*source).ExternalID != nil { - xstring2 := *(*source).ExternalID + if (*source).ExternalId != nil { + xstring2 := *(*source).ExternalId pString2 = &xstring2 } - openapiServingEnvironment.ExternalID = pString2 + openapiServingEnvironment.ExternalId = pString2 pOpenapiServingEnvironment = &openapiServingEnvironment } return pOpenapiServingEnvironment, nil diff --git a/internal/converter/generated/openapi_mlmd_converter.gen.go b/internal/converter/generated/openapi_mlmd_converter.gen.go index ac3ae2f6..222bcba7 100755 --- a/internal/converter/generated/openapi_mlmd_converter.gen.go +++ b/internal/converter/generated/openapi_mlmd_converter.gen.go @@ -40,7 +40,7 @@ func (c *OpenAPIToMLMDConverterImpl) ConvertDocArtifact(source *converter.OpenAP protoArtifact.Uri = pString3 var pString4 *string if (*source).Model != nil { - pString4 = (*source).Model.ExternalID + pString4 = (*source).Model.ExternalId } var pString5 *string if pString4 != nil { @@ -94,7 +94,7 @@ func (c *OpenAPIToMLMDConverterImpl) ConvertInferenceService(source *converter.O protoContext.Type = converter.MapInferenceServiceType((*source).Model) var pString2 *string if (*source).Model != nil { - pString2 = (*source).Model.ExternalID + pString2 = (*source).Model.ExternalId } var pString3 *string if pString2 != nil { @@ -149,7 +149,7 @@ func (c *OpenAPIToMLMDConverterImpl) ConvertModelArtifact(source *converter.Open protoArtifact.Uri = pString3 var pString4 *string if (*source).Model != nil { - pString4 = (*source).Model.ExternalID + pString4 = (*source).Model.ExternalId } var pString5 *string if pString4 != nil { @@ -203,7 +203,7 @@ func (c *OpenAPIToMLMDConverterImpl) ConvertModelVersion(source *converter.OpenA protoContext.Type = converter.MapModelVersionType((*source).Model) var pString2 *string if (*source).Model != nil { - pString2 = (*source).Model.ExternalID + pString2 = (*source).Model.ExternalId } var pString3 *string if pString2 != nil { @@ -257,7 +257,7 @@ func (c *OpenAPIToMLMDConverterImpl) ConvertRegisteredModel(source *converter.Op protoContext.Type = converter.MapRegisteredModelType((*source).Model) var pString4 *string if (*source).Model != nil { - pString4 = (*source).Model.ExternalID + pString4 = (*source).Model.ExternalId } var pString5 *string if pString4 != nil { @@ -302,7 +302,7 @@ func (c *OpenAPIToMLMDConverterImpl) ConvertServeModel(source *converter.OpenAPI protoExecution.Type = converter.MapServeModelType((*source).Model) var pString2 *string if (*source).Model != nil { - pString2 = (*source).Model.ExternalID + pString2 = (*source).Model.ExternalId } var pString3 *string if pString2 != nil { @@ -365,7 +365,7 @@ func (c *OpenAPIToMLMDConverterImpl) ConvertServingEnvironment(source *converter protoContext.Type = converter.MapServingEnvironmentType((*source).Model) var pString4 *string if (*source).Model != nil { - pString4 = (*source).Model.ExternalID + pString4 = (*source).Model.ExternalId } var pString5 *string if pString4 != nil { diff --git a/internal/converter/openapi_converter.go b/internal/converter/openapi_converter.go index 638b3a16..ac44d7eb 100644 --- a/internal/converter/openapi_converter.go +++ b/internal/converter/openapi_converter.go @@ -52,42 +52,42 @@ type OpenAPIConverter interface { // Ignore all fields that ARE editable // goverter:default InitRegisteredModelWithUpdate // goverter:autoMap Existing - // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties State + // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalId CustomProperties State OverrideNotEditableForRegisteredModel(source OpenapiUpdateWrapper[openapi.RegisteredModel]) (openapi.RegisteredModel, error) // Ignore all fields that ARE editable // goverter:default InitModelVersionWithUpdate // goverter:autoMap Existing - // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties State Author + // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalId CustomProperties State Author OverrideNotEditableForModelVersion(source OpenapiUpdateWrapper[openapi.ModelVersion]) (openapi.ModelVersion, error) // Ignore all fields that ARE editable // goverter:default InitDocArtifactWithUpdate // goverter:autoMap Existing - // goverter:ignore Id Name ArtifactType CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties Uri State + // goverter:ignore Id Name ArtifactType CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalId CustomProperties Uri State OverrideNotEditableForDocArtifact(source OpenapiUpdateWrapper[openapi.DocArtifact]) (openapi.DocArtifact, error) // Ignore all fields that ARE editable // goverter:default InitModelArtifactWithUpdate // goverter:autoMap Existing - // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties Uri State ServiceAccountName ModelFormatName ModelFormatVersion StorageKey StoragePath + // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalId CustomProperties Uri State ServiceAccountName ModelFormatName ModelFormatVersion StorageKey StoragePath OverrideNotEditableForModelArtifact(source OpenapiUpdateWrapper[openapi.ModelArtifact]) (openapi.ModelArtifact, error) // Ignore all fields that ARE editable // goverter:default InitServingEnvironmentWithUpdate // goverter:autoMap Existing - // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties + // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalId CustomProperties OverrideNotEditableForServingEnvironment(source OpenapiUpdateWrapper[openapi.ServingEnvironment]) (openapi.ServingEnvironment, error) // Ignore all fields that ARE editable // goverter:default InitInferenceServiceWithUpdate // goverter:autoMap Existing - // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties ModelVersionId Runtime DesiredState + // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalId CustomProperties ModelVersionId Runtime DesiredState OverrideNotEditableForInferenceService(source OpenapiUpdateWrapper[openapi.InferenceService]) (openapi.InferenceService, error) // Ignore all fields that ARE editable // goverter:default InitServeModelWithUpdate // goverter:autoMap Existing - // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalID CustomProperties LastKnownState + // goverter:ignore Id CreateTimeSinceEpoch LastUpdateTimeSinceEpoch Description ExternalId CustomProperties LastKnownState OverrideNotEditableForServeModel(source OpenapiUpdateWrapper[openapi.ServeModel]) (openapi.ServeModel, error) } diff --git a/internal/server/openapi/api_model_registry_service.go b/internal/server/openapi/api_model_registry_service.go index d42b46b6..68cba276 100644 --- a/internal/server/openapi/api_model_registry_service.go +++ b/internal/server/openapi/api_model_registry_service.go @@ -481,9 +481,9 @@ func (c *ModelRegistryServiceAPIController) CreateServingEnvironment(w http.Resp func (c *ModelRegistryServiceAPIController) FindInferenceService(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() nameParam := query.Get("name") - externalIDParam := query.Get("externalID") - parentResourceIDParam := query.Get("parentResourceID") - result, err := c.service.FindInferenceService(r.Context(), nameParam, externalIDParam, parentResourceIDParam) + externalIdParam := query.Get("externalId") + parentResourceIdParam := query.Get("parentResourceId") + result, err := c.service.FindInferenceService(r.Context(), nameParam, externalIdParam, parentResourceIdParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -497,9 +497,9 @@ func (c *ModelRegistryServiceAPIController) FindInferenceService(w http.Response func (c *ModelRegistryServiceAPIController) FindModelArtifact(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() nameParam := query.Get("name") - externalIDParam := query.Get("externalID") - parentResourceIDParam := query.Get("parentResourceID") - result, err := c.service.FindModelArtifact(r.Context(), nameParam, externalIDParam, parentResourceIDParam) + externalIdParam := query.Get("externalId") + parentResourceIdParam := query.Get("parentResourceId") + result, err := c.service.FindModelArtifact(r.Context(), nameParam, externalIdParam, parentResourceIdParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -513,9 +513,9 @@ func (c *ModelRegistryServiceAPIController) FindModelArtifact(w http.ResponseWri func (c *ModelRegistryServiceAPIController) FindModelVersion(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() nameParam := query.Get("name") - externalIDParam := query.Get("externalID") - parentResourceIDParam := query.Get("parentResourceID") - result, err := c.service.FindModelVersion(r.Context(), nameParam, externalIDParam, parentResourceIDParam) + externalIdParam := query.Get("externalId") + parentResourceIdParam := query.Get("parentResourceId") + result, err := c.service.FindModelVersion(r.Context(), nameParam, externalIdParam, parentResourceIdParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -529,8 +529,8 @@ func (c *ModelRegistryServiceAPIController) FindModelVersion(w http.ResponseWrit func (c *ModelRegistryServiceAPIController) FindRegisteredModel(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() nameParam := query.Get("name") - externalIDParam := query.Get("externalID") - result, err := c.service.FindRegisteredModel(r.Context(), nameParam, externalIDParam) + externalIdParam := query.Get("externalId") + result, err := c.service.FindRegisteredModel(r.Context(), nameParam, externalIdParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -544,8 +544,8 @@ func (c *ModelRegistryServiceAPIController) FindRegisteredModel(w http.ResponseW func (c *ModelRegistryServiceAPIController) FindServingEnvironment(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() nameParam := query.Get("name") - externalIDParam := query.Get("externalID") - result, err := c.service.FindServingEnvironment(r.Context(), nameParam, externalIDParam) + externalIdParam := query.Get("externalId") + result, err := c.service.FindServingEnvironment(r.Context(), nameParam, externalIdParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -560,12 +560,12 @@ func (c *ModelRegistryServiceAPIController) GetEnvironmentInferenceServices(w ht query := r.URL.Query() servingenvironmentIdParam := chi.URLParam(r, "servingenvironmentId") nameParam := query.Get("name") - externalIDParam := query.Get("externalID") + externalIdParam := query.Get("externalId") pageSizeParam := query.Get("pageSize") orderByParam := query.Get("orderBy") sortOrderParam := query.Get("sortOrder") nextPageTokenParam := query.Get("nextPageToken") - result, err := c.service.GetEnvironmentInferenceServices(r.Context(), servingenvironmentIdParam, nameParam, externalIDParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam) + result, err := c.service.GetEnvironmentInferenceServices(r.Context(), servingenvironmentIdParam, nameParam, externalIdParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -606,12 +606,12 @@ func (c *ModelRegistryServiceAPIController) GetInferenceServiceServes(w http.Res query := r.URL.Query() inferenceserviceIdParam := chi.URLParam(r, "inferenceserviceId") nameParam := query.Get("name") - externalIDParam := query.Get("externalID") + externalIdParam := query.Get("externalId") pageSizeParam := query.Get("pageSize") orderByParam := query.Get("orderBy") sortOrderParam := query.Get("sortOrder") nextPageTokenParam := query.Get("nextPageToken") - result, err := c.service.GetInferenceServiceServes(r.Context(), inferenceserviceIdParam, nameParam, externalIDParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam) + result, err := c.service.GetInferenceServiceServes(r.Context(), inferenceserviceIdParam, nameParam, externalIdParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -699,12 +699,12 @@ func (c *ModelRegistryServiceAPIController) GetModelVersionArtifacts(w http.Resp query := r.URL.Query() modelversionIdParam := chi.URLParam(r, "modelversionId") nameParam := query.Get("name") - externalIDParam := query.Get("externalID") + externalIdParam := query.Get("externalId") pageSizeParam := query.Get("pageSize") orderByParam := query.Get("orderBy") sortOrderParam := query.Get("sortOrder") nextPageTokenParam := query.Get("nextPageToken") - result, err := c.service.GetModelVersionArtifacts(r.Context(), modelversionIdParam, nameParam, externalIDParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam) + result, err := c.service.GetModelVersionArtifacts(r.Context(), modelversionIdParam, nameParam, externalIdParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) @@ -749,12 +749,12 @@ func (c *ModelRegistryServiceAPIController) GetRegisteredModelVersions(w http.Re query := r.URL.Query() registeredmodelIdParam := chi.URLParam(r, "registeredmodelId") nameParam := query.Get("name") - externalIDParam := query.Get("externalID") + externalIdParam := query.Get("externalId") pageSizeParam := query.Get("pageSize") orderByParam := query.Get("orderBy") sortOrderParam := query.Get("sortOrder") nextPageTokenParam := query.Get("nextPageToken") - result, err := c.service.GetRegisteredModelVersions(r.Context(), registeredmodelIdParam, nameParam, externalIDParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam) + result, err := c.service.GetRegisteredModelVersions(r.Context(), registeredmodelIdParam, nameParam, externalIdParam, pageSizeParam, model.OrderByField(orderByParam), model.SortOrder(sortOrderParam), nextPageTokenParam) // If an error occurred, encode the error with the status code if err != nil { c.errorHandler(w, r, err, &result) diff --git a/internal/server/openapi/api_model_registry_service_service.go b/internal/server/openapi/api_model_registry_service_service.go index 03bf2008..e111dc13 100644 --- a/internal/server/openapi/api_model_registry_service_service.go +++ b/internal/server/openapi/api_model_registry_service_service.go @@ -98,7 +98,7 @@ func (s *ModelRegistryServiceAPIService) CreateModelVersion(ctx context.Context, return Response(500, model.Error{Message: err.Error()}), nil } - result, err := s.coreApi.UpsertModelVersion(modelVersion, &modelVersionCreate.RegisteredModelID) + result, err := s.coreApi.UpsertModelVersion(modelVersion, &modelVersionCreate.RegisteredModelId) if err != nil { return Response(500, model.Error{Message: err.Error()}), nil } @@ -165,8 +165,8 @@ func (s *ModelRegistryServiceAPIService) CreateServingEnvironment(ctx context.Co } // FindInferenceService - Get an InferenceServices that matches search parameters. -func (s *ModelRegistryServiceAPIService) FindInferenceService(ctx context.Context, name string, externalID string, parentResourceID string) (ImplResponse, error) { - result, err := s.coreApi.GetInferenceServiceByParams(&name, &parentResourceID, &externalID) +func (s *ModelRegistryServiceAPIService) FindInferenceService(ctx context.Context, name string, externalId string, parentResourceId string) (ImplResponse, error) { + result, err := s.coreApi.GetInferenceServiceByParams(&name, &parentResourceId, &externalId) if err != nil { return Response(500, model.Error{Message: err.Error()}), nil } @@ -177,8 +177,8 @@ func (s *ModelRegistryServiceAPIService) FindInferenceService(ctx context.Contex } // FindModelArtifact - Get a ModelArtifact that matches search parameters. -func (s *ModelRegistryServiceAPIService) FindModelArtifact(ctx context.Context, name string, externalID string, parentResourceID string) (ImplResponse, error) { - result, err := s.coreApi.GetModelArtifactByParams(&name, &parentResourceID, &externalID) +func (s *ModelRegistryServiceAPIService) FindModelArtifact(ctx context.Context, name string, externalId string, parentResourceId string) (ImplResponse, error) { + result, err := s.coreApi.GetModelArtifactByParams(&name, &parentResourceId, &externalId) if err != nil { return Response(500, model.Error{Message: err.Error()}), nil } @@ -189,8 +189,8 @@ func (s *ModelRegistryServiceAPIService) FindModelArtifact(ctx context.Context, } // FindModelVersion - Get a ModelVersion that matches search parameters. -func (s *ModelRegistryServiceAPIService) FindModelVersion(ctx context.Context, name string, externalID string, registeredModelID string) (ImplResponse, error) { - result, err := s.coreApi.GetModelVersionByParams(&name, ®isteredModelID, &externalID) +func (s *ModelRegistryServiceAPIService) FindModelVersion(ctx context.Context, name string, externalId string, registeredModelId string) (ImplResponse, error) { + result, err := s.coreApi.GetModelVersionByParams(&name, ®isteredModelId, &externalId) if err != nil { return Response(500, model.Error{Message: err.Error()}), nil } diff --git a/internal/server/openapi/type_asserts.go b/internal/server/openapi/type_asserts.go index 9964c0be..fa32e4c3 100644 --- a/internal/server/openapi/type_asserts.go +++ b/internal/server/openapi/type_asserts.go @@ -524,7 +524,7 @@ func AssertModelArtifactUpdateConstraints(obj model.ModelArtifactUpdate) error { // AssertModelVersionCreateRequired checks if the required fields are not zero-ed func AssertModelVersionCreateRequired(obj model.ModelVersionCreate) error { elements := map[string]interface{}{ - "registeredModelID": obj.RegisteredModelID, + "registeredModelId": obj.RegisteredModelId, } for name, el := range elements { if isZero := IsZeroValue(el); isZero { diff --git a/pkg/core/core_test.go b/pkg/core/core_test.go index 26cee6d2..7948f7ab 100644 --- a/pkg/core/core_test.go +++ b/pkg/core/core_test.go @@ -128,7 +128,7 @@ func (suite *CoreTestSuite) setupModelRegistryService() *ModelRegistryService { func (suite *CoreTestSuite) registerModel(service api.ModelRegistryApi, overrideModelName *string, overrideExternalId *string) string { registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, Description: &modelDescription, CustomProperties: &map[string]openapi.MetadataValue{ "owner": { @@ -142,7 +142,7 @@ func (suite *CoreTestSuite) registerModel(service api.ModelRegistryApi, override } if overrideExternalId != nil { - registeredModel.ExternalID = overrideExternalId + registeredModel.ExternalId = overrideExternalId } // test @@ -158,7 +158,7 @@ func (suite *CoreTestSuite) registerServingEnvironment(service api.ModelRegistry eutExtID := "Simple ServingEnvironment ExtID" eut := &openapi.ServingEnvironment{ Name: &eutName, - ExternalID: &eutExtID, + ExternalId: &eutExtID, Description: &entityDescription, CustomProperties: &map[string]openapi.MetadataValue{ "owner": { @@ -172,7 +172,7 @@ func (suite *CoreTestSuite) registerServingEnvironment(service api.ModelRegistry } if overrideExternalId != nil { - eut.ExternalID = overrideExternalId + eut.ExternalId = overrideExternalId } // test @@ -194,7 +194,7 @@ func (suite *CoreTestSuite) registerModelVersion( modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Description: &modelVersionDescription, Author: &author, } @@ -204,7 +204,7 @@ func (suite *CoreTestSuite) registerModelVersion( } if overrideVersionExtId != nil { - modelVersion.ExternalID = overrideVersionExtId + modelVersion.ExternalId = overrideVersionExtId } createdVersion, err := service.UpsertModelVersion(modelVersion, ®isteredModelId) @@ -221,7 +221,7 @@ func (suite *CoreTestSuite) registerInferenceService(service api.ModelRegistryAp eutExtID := "simpleInferenceService ExtID" eut := &openapi.InferenceService{ Name: &eutName, - ExternalID: &eutExtID, + ExternalId: &eutExtID, RegisteredModelId: registerdModelId, ServingEnvironmentId: servingEnvironmentId, CustomProperties: &map[string]openapi.MetadataValue{ @@ -235,7 +235,7 @@ func (suite *CoreTestSuite) registerInferenceService(service api.ModelRegistryAp eut.Name = overrideName } if overrideExternalId != nil { - eut.ExternalID = overrideExternalId + eut.ExternalId = overrideExternalId } // test @@ -571,7 +571,7 @@ func (suite *CoreTestSuite) TestCreateRegisteredModel() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, Description: &modelDescription, State: &state, CustomProperties: &map[string]openapi.MetadataValue{ @@ -615,7 +615,7 @@ func (suite *CoreTestSuite) TestUpdateRegisteredModel() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, CustomProperties: &map[string]openapi.MetadataValue{ "owner": { MetadataStringValue: converter.NewMetadataStringValue(owner), @@ -633,14 +633,14 @@ func (suite *CoreTestSuite) TestUpdateRegisteredModel() { // checks created model matches original one except for Id suite.Equal(*registeredModel.Name, *createdModel.Name, "returned model name should match the original one") - suite.Equal(*registeredModel.ExternalID, *createdModel.ExternalID, "returned model external id should match the original one") + suite.Equal(*registeredModel.ExternalId, *createdModel.ExternalId, "returned model external id should match the original one") suite.Equal(*registeredModel.CustomProperties, *createdModel.CustomProperties, "returned model custom props should match the original one") // update existing model newModelExternalId := "newExternalId" newOwner := "newOwner" - createdModel.ExternalID = &newModelExternalId + createdModel.ExternalId = &newModelExternalId (*createdModel.CustomProperties)["owner"] = openapi.MetadataValue{ MetadataStringValue: converter.NewMetadataStringValue(newOwner), } @@ -668,7 +668,7 @@ func (suite *CoreTestSuite) TestUpdateRegisteredModel() { // update the model keeping nil name newModelExternalId = "newNewExternalId" - createdModel.ExternalID = &newModelExternalId + createdModel.ExternalId = &newModelExternalId createdModel.Name = nil createdModel, err = service.UpsertRegisteredModel(createdModel) suite.Nilf(err, "error creating registered model: %v", err) @@ -699,7 +699,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelById() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, State: &state, CustomProperties: &map[string]openapi.MetadataValue{ "owner": { @@ -719,7 +719,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelById() { // checks created model matches original one except for Id suite.Equal(*registeredModel.Name, *getModelById.Name, "saved model name should match the original one") - suite.Equal(*registeredModel.ExternalID, *getModelById.ExternalID, "saved model external id should match the original one") + suite.Equal(*registeredModel.ExternalId, *getModelById.ExternalId, "saved model external id should match the original one") suite.Equal(*registeredModel.State, *getModelById.State, "saved model state should match the original one") suite.Equal(*registeredModel.CustomProperties, *getModelById.CustomProperties, "saved model custom props should match the original one") } @@ -740,7 +740,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelByParamsName() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, } createdModel, err := service.UpsertRegisteredModel(registeredModel) @@ -759,7 +759,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelByParamsExternalId() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, } createdModel, err := service.UpsertRegisteredModel(registeredModel) @@ -778,7 +778,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelByEmptyParams() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, } _, err := service.UpsertRegisteredModel(registeredModel) @@ -798,7 +798,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelsOrderedById() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, } _, err := service.UpsertRegisteredModel(registeredModel) @@ -807,14 +807,14 @@ func (suite *CoreTestSuite) TestGetRegisteredModelsOrderedById() { newModelName := "PricingModel2" newModelExternalId := "myExternalId2" registeredModel.Name = &newModelName - registeredModel.ExternalID = &newModelExternalId + registeredModel.ExternalId = &newModelExternalId _, err = service.UpsertRegisteredModel(registeredModel) suite.Nilf(err, "error creating registered model: %v", err) newModelName = "PricingModel3" newModelExternalId = "myExternalId3" registeredModel.Name = &newModelName - registeredModel.ExternalID = &newModelExternalId + registeredModel.ExternalId = &newModelExternalId _, err = service.UpsertRegisteredModel(registeredModel) suite.Nilf(err, "error creating registered model: %v", err) @@ -850,7 +850,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelsOrderedByLastUpdate() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, } firstModel, err := service.UpsertRegisteredModel(registeredModel) @@ -859,19 +859,19 @@ func (suite *CoreTestSuite) TestGetRegisteredModelsOrderedByLastUpdate() { newModelName := "PricingModel2" newModelExternalId := "myExternalId2" registeredModel.Name = &newModelName - registeredModel.ExternalID = &newModelExternalId + registeredModel.ExternalId = &newModelExternalId secondModel, err := service.UpsertRegisteredModel(registeredModel) suite.Nilf(err, "error creating registered model: %v", err) newModelName = "PricingModel3" newModelExternalId = "myExternalId3" registeredModel.Name = &newModelName - registeredModel.ExternalID = &newModelExternalId + registeredModel.ExternalId = &newModelExternalId thirdModel, err := service.UpsertRegisteredModel(registeredModel) suite.Nilf(err, "error creating registered model: %v", err) // update second model - secondModel.ExternalID = nil + secondModel.ExternalId = nil _, err = service.UpsertRegisteredModel(secondModel) suite.Nilf(err, "error creating registered model: %v", err) @@ -910,7 +910,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelsWithPageSize() { // register a new model registeredModel := &openapi.RegisteredModel{ Name: &modelName, - ExternalID: &modelExternalId, + ExternalId: &modelExternalId, } firstModel, err := service.UpsertRegisteredModel(registeredModel) @@ -919,14 +919,14 @@ func (suite *CoreTestSuite) TestGetRegisteredModelsWithPageSize() { newModelName := "PricingModel2" newModelExternalId := "myExternalId2" registeredModel.Name = &newModelName - registeredModel.ExternalID = &newModelExternalId + registeredModel.ExternalId = &newModelExternalId secondModel, err := service.UpsertRegisteredModel(registeredModel) suite.Nilf(err, "error creating registered model: %v", err) newModelName = "PricingModel3" newModelExternalId = "myExternalId3" registeredModel.Name = &newModelName - registeredModel.ExternalID = &newModelExternalId + registeredModel.ExternalId = &newModelExternalId thirdModel, err := service.UpsertRegisteredModel(registeredModel) suite.Nilf(err, "error creating registered model: %v", err) @@ -962,7 +962,7 @@ func (suite *CoreTestSuite) TestCreateModelVersion() { state := openapi.MODELVERSIONSTATE_LIVE modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Description: &modelVersionDescription, State: &state, Author: &author, @@ -1004,7 +1004,7 @@ func (suite *CoreTestSuite) TestCreateModelVersionFailure() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Author: &author, } @@ -1025,7 +1025,7 @@ func (suite *CoreTestSuite) TestUpdateModelVersion() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Author: &author, } @@ -1038,7 +1038,7 @@ func (suite *CoreTestSuite) TestUpdateModelVersion() { newExternalId := "org.my_awesome_model@v1" newScore := 0.95 - createdVersion.ExternalID = &newExternalId + createdVersion.ExternalId = &newExternalId (*createdVersion.CustomProperties)["score"] = openapi.MetadataValue{ MetadataDoubleValue: converter.NewMetadataDoubleValue(newScore), } @@ -1070,7 +1070,7 @@ func (suite *CoreTestSuite) TestUpdateModelVersion() { // update with nil name newExternalId = "org.my_awesome_model_@v1" - updatedVersion.ExternalID = &newExternalId + updatedVersion.ExternalId = &newExternalId updatedVersion.Name = nil updatedVersion, err = service.UpsertModelVersion(updatedVersion, ®isteredModelId) suite.Nilf(err, "error updating new model version for %s: %v", registeredModelId, err) @@ -1102,7 +1102,7 @@ func (suite *CoreTestSuite) TestUpdateModelVersionFailure() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Author: &author, } @@ -1113,7 +1113,7 @@ func (suite *CoreTestSuite) TestUpdateModelVersionFailure() { newExternalId := "org.my_awesome_model@v1" newScore := 0.95 - createdVersion.ExternalID = &newExternalId + createdVersion.ExternalId = &newExternalId (*createdVersion.CustomProperties)["score"] = openapi.MetadataValue{ MetadataDoubleValue: converter.NewMetadataDoubleValue(newScore), } @@ -1134,7 +1134,7 @@ func (suite *CoreTestSuite) TestGetModelVersionById() { state := openapi.MODELVERSIONSTATE_ARCHIVED modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, State: &state, Author: &author, } @@ -1158,7 +1158,7 @@ func (suite *CoreTestSuite) TestGetModelVersionById() { ctx := ctxById.Contexts[0] suite.Equal(*converter.Int64ToString(ctx.Id), *getById.Id, "returned model version id should match the mlmd context one") suite.Equal(*modelVersion.Name, *getById.Name, "saved model name should match the provided one") - suite.Equal(*modelVersion.ExternalID, *getById.ExternalID, "saved external id should match the provided one") + suite.Equal(*modelVersion.ExternalId, *getById.ExternalId, "saved external id should match the provided one") suite.Equal(*modelVersion.State, *getById.State, "saved model state should match the original one") suite.Equal(*getById.Author, author, "saved author property should match the provided one") } @@ -1182,7 +1182,7 @@ func (suite *CoreTestSuite) TestGetModelVersionByParamsName() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Author: &author, } @@ -1205,7 +1205,7 @@ func (suite *CoreTestSuite) TestGetModelVersionByParamsName() { ctx := ctxById.Contexts[0] suite.Equal(*converter.Int64ToString(ctx.Id), *getByName.Id, "returned model version id should match the mlmd context one") suite.Equal(fmt.Sprintf("%s:%s", registeredModelId, *getByName.Name), *ctx.Name, "saved model name should match the provided one") - suite.Equal(*ctx.ExternalId, *getByName.ExternalID, "saved external id should match the provided one") + suite.Equal(*ctx.ExternalId, *getByName.ExternalId, "saved external id should match the provided one") suite.Equal(ctx.Properties["author"].GetStringValue(), *getByName.Author, "saved author property should match the provided one") } @@ -1217,7 +1217,7 @@ func (suite *CoreTestSuite) TestGetModelVersionByParamsExternalId() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Author: &author, } @@ -1227,8 +1227,8 @@ func (suite *CoreTestSuite) TestGetModelVersionByParamsExternalId() { suite.NotNilf(createdVersion.Id, "created model version should not have nil Id") createdVersionId, _ := converter.StringToInt64(createdVersion.Id) - getByExternalId, err := service.GetModelVersionByParams(nil, nil, modelVersion.ExternalID) - suite.Nilf(err, "error getting model version by external id %d", *modelVersion.ExternalID) + getByExternalId, err := service.GetModelVersionByParams(nil, nil, modelVersion.ExternalId) + suite.Nilf(err, "error getting model version by external id %d", *modelVersion.ExternalId) ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{ ContextIds: []int64{ @@ -1240,7 +1240,7 @@ func (suite *CoreTestSuite) TestGetModelVersionByParamsExternalId() { ctx := ctxById.Contexts[0] suite.Equal(*converter.Int64ToString(ctx.Id), *getByExternalId.Id, "returned model version id should match the mlmd context one") suite.Equal(fmt.Sprintf("%s:%s", registeredModelId, *getByExternalId.Name), *ctx.Name, "saved model name should match the provided one") - suite.Equal(*ctx.ExternalId, *getByExternalId.ExternalID, "saved external id should match the provided one") + suite.Equal(*ctx.ExternalId, *getByExternalId.ExternalId, "saved external id should match the provided one") suite.Equal(ctx.Properties["author"].GetStringValue(), *getByExternalId.Author, "saved author property should match the provided one") } @@ -1252,7 +1252,7 @@ func (suite *CoreTestSuite) TestGetModelVersionByEmptyParams() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Author: &author, } @@ -1273,21 +1273,21 @@ func (suite *CoreTestSuite) TestGetModelVersions() { modelVersion1 := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, } secondModelVersionName := "v2" secondModelVersionExtId := "org.myawesomemodel@v2" modelVersion2 := &openapi.ModelVersion{ Name: &secondModelVersionName, - ExternalID: &secondModelVersionExtId, + ExternalId: &secondModelVersionExtId, } thirdModelVersionName := "v3" thirdModelVersionExtId := "org.myawesomemodel@v3" modelVersion3 := &openapi.ModelVersion{ Name: &thirdModelVersionName, - ExternalID: &thirdModelVersionExtId, + ExternalId: &thirdModelVersionExtId, } createdVersion1, err := service.UpsertModelVersion(modelVersion1, ®isteredModelId) @@ -1307,7 +1307,7 @@ func (suite *CoreTestSuite) TestGetModelVersions() { anotherModelVersionExtId := "org.another@v1.0" modelVersionAnother := &openapi.ModelVersion{ Name: &anotherModelVersionName, - ExternalID: &anotherModelVersionExtId, + ExternalId: &anotherModelVersionExtId, } _, err = service.UpsertModelVersion(modelVersionAnother, &anotherRegisteredModelId) @@ -1344,11 +1344,11 @@ func (suite *CoreTestSuite) TestGetModelVersions() { // update the second version newVersionExternalId := "updated.org:v2" - createdVersion2.ExternalID = &newVersionExternalId + createdVersion2.ExternalId = &newVersionExternalId createdVersion2, err = service.UpsertModelVersion(createdVersion2, ®isteredModelId) suite.Nilf(err, "error creating new model version for %d", registeredModelId) - suite.Equal(newVersionExternalId, *createdVersion2.ExternalID) + suite.Equal(newVersionExternalId, *createdVersion2.ExternalId) getAllByRegModel, err = service.GetModelVersions(api.ListOptions{ OrderBy: &orderByLastUpdate, @@ -1547,7 +1547,7 @@ func (suite *CoreTestSuite) TestGetArtifacts() { Name: &artifactName, State: (*openapi.ArtifactState)(&artifactState), Uri: &artifactUri, - ExternalID: &artifactExtId, + ExternalId: &artifactExtId, CustomProperties: &map[string]openapi.MetadataValue{ "custom_string_prop": { MetadataStringValue: converter.NewMetadataStringValue(customString), @@ -1561,7 +1561,7 @@ func (suite *CoreTestSuite) TestGetArtifacts() { Name: &secondArtifactName, State: (*openapi.ArtifactState)(&artifactState), Uri: &secondArtifactUri, - ExternalID: &secondArtifactExtId, + ExternalId: &secondArtifactExtId, CustomProperties: &map[string]openapi.MetadataValue{ "custom_string_prop": { MetadataStringValue: converter.NewMetadataStringValue(customString), @@ -1765,7 +1765,7 @@ func (suite *CoreTestSuite) TestGetModelArtifactByParams() { Name: &artifactName, State: (*openapi.ArtifactState)(&artifactState), Uri: &artifactUri, - ExternalID: &artifactExtId, + ExternalId: &artifactExtId, CustomProperties: &map[string]openapi.MetadataValue{ "custom_string_prop": { MetadataStringValue: converter.NewMetadataStringValue(customString), @@ -1785,7 +1785,7 @@ func (suite *CoreTestSuite) TestGetModelArtifactByParams() { suite.NotNil(createdArtifact.Id, "created artifact id should not be nil") suite.Equal(artifactName, *getByName.Name) - suite.Equal(artifactExtId, *getByName.ExternalID) + suite.Equal(artifactExtId, *getByName.ExternalId) suite.Equal(*state, *getByName.State) suite.Equal(artifactUri, *getByName.Uri) suite.Equal(customString, (*getByName.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue) @@ -1797,7 +1797,7 @@ func (suite *CoreTestSuite) TestGetModelArtifactByParams() { suite.NotNil(createdArtifact.Id, "created artifact id should not be nil") suite.Equal(artifactName, *getByExtId.Name) - suite.Equal(artifactExtId, *getByExtId.ExternalID) + suite.Equal(artifactExtId, *getByExtId.ExternalId) suite.Equal(*state, *getByExtId.State) suite.Equal(artifactUri, *getByExtId.Uri) suite.Equal(customString, (*getByExtId.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue) @@ -1815,7 +1815,7 @@ func (suite *CoreTestSuite) TestGetModelArtifactByEmptyParams() { Name: &artifactName, State: (*openapi.ArtifactState)(&artifactState), Uri: &artifactUri, - ExternalID: &artifactExtId, + ExternalId: &artifactExtId, CustomProperties: &map[string]openapi.MetadataValue{ "custom_string_prop": { MetadataStringValue: converter.NewMetadataStringValue(customString), @@ -1852,7 +1852,7 @@ func (suite *CoreTestSuite) TestGetModelArtifacts() { Name: &artifactName, State: (*openapi.ArtifactState)(&artifactState), Uri: &artifactUri, - ExternalID: &artifactExtId, + ExternalId: &artifactExtId, CustomProperties: &map[string]openapi.MetadataValue{ "custom_string_prop": { MetadataStringValue: converter.NewMetadataStringValue(customString), @@ -1867,7 +1867,7 @@ func (suite *CoreTestSuite) TestGetModelArtifacts() { Name: &secondArtifactName, State: (*openapi.ArtifactState)(&artifactState), Uri: &secondArtifactUri, - ExternalID: &secondArtifactExtId, + ExternalId: &secondArtifactExtId, CustomProperties: &map[string]openapi.MetadataValue{ "custom_string_prop": { MetadataStringValue: converter.NewMetadataStringValue(customString), @@ -1882,7 +1882,7 @@ func (suite *CoreTestSuite) TestGetModelArtifacts() { Name: &thirdArtifactName, State: (*openapi.ArtifactState)(&artifactState), Uri: &thirdArtifactUri, - ExternalID: &thirdArtifactExtId, + ExternalId: &thirdArtifactExtId, CustomProperties: &map[string]openapi.MetadataValue{ "custom_string_prop": { MetadataStringValue: converter.NewMetadataStringValue(customString), @@ -1931,7 +1931,7 @@ func (suite *CoreTestSuite) TestCreateServingEnvironment() { // register a new ServingEnvironment eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, Description: &entityDescription, CustomProperties: &map[string]openapi.MetadataValue{ "owner": { @@ -1973,7 +1973,7 @@ func (suite *CoreTestSuite) TestUpdateServingEnvironment() { // register a new ServingEnvironment eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, CustomProperties: &map[string]openapi.MetadataValue{ "owner": { MetadataStringValue: converter.NewMetadataStringValue(owner), @@ -1991,14 +1991,14 @@ func (suite *CoreTestSuite) TestUpdateServingEnvironment() { // checks created entity matches original one except for Id suite.Equal(*eut.Name, *createdEntity.Name, "returned entity should match the original one") - suite.Equal(*eut.ExternalID, *createdEntity.ExternalID, "returned entity external id should match the original one") + suite.Equal(*eut.ExternalId, *createdEntity.ExternalId, "returned entity external id should match the original one") suite.Equal(*eut.CustomProperties, *createdEntity.CustomProperties, "returned entity custom props should match the original one") // update existing entity newExternalId := "newExternalId" newOwner := "newOwner" - createdEntity.ExternalID = &newExternalId + createdEntity.ExternalId = &newExternalId (*createdEntity.CustomProperties)["owner"] = openapi.MetadataValue{ MetadataStringValue: converter.NewMetadataStringValue(newOwner), } @@ -2026,7 +2026,7 @@ func (suite *CoreTestSuite) TestUpdateServingEnvironment() { // update the entity under test, keeping nil name newExternalId = "newNewExternalId" - createdEntity.ExternalID = &newExternalId + createdEntity.ExternalId = &newExternalId createdEntity.Name = nil createdEntity, err = service.UpsertServingEnvironment(createdEntity) suite.Nilf(err, "error creating entity: %v", err) @@ -2056,7 +2056,7 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentById() { // register a new entity eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, CustomProperties: &map[string]openapi.MetadataValue{ "owner": { MetadataStringValue: converter.NewMetadataStringValue(owner), @@ -2075,7 +2075,7 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentById() { // checks created entity matches original one except for Id suite.Equal(*eut.Name, *getEntityById.Name, "saved name should match the original one") - suite.Equal(*eut.ExternalID, *getEntityById.ExternalID, "saved external id should match the original one") + suite.Equal(*eut.ExternalId, *getEntityById.ExternalId, "saved external id should match the original one") suite.Equal(*eut.CustomProperties, *getEntityById.CustomProperties, "saved custom props should match the original one") } @@ -2095,7 +2095,7 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentByParamsName() { // register a new ServingEnvironment eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, } createdEntity, err := service.UpsertServingEnvironment(eut) @@ -2114,7 +2114,7 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentByParamsExternalId() { // register a new ServingEnvironment eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, } createdEntity, err := service.UpsertServingEnvironment(eut) @@ -2133,7 +2133,7 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentByEmptyParams() { // register a new ServingEnvironment eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, } _, err := service.UpsertServingEnvironment(eut) @@ -2153,7 +2153,7 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentsOrderedById() { // register a new ServingEnvironment eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, } _, err := service.UpsertServingEnvironment(eut) @@ -2162,14 +2162,14 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentsOrderedById() { newName := "Pricingentity2" newExternalId := "myExternalId2" eut.Name = &newName - eut.ExternalID = &newExternalId + eut.ExternalId = &newExternalId _, err = service.UpsertServingEnvironment(eut) suite.Nilf(err, "error creating ServingEnvironment: %v", err) newName = "Pricingentity3" newExternalId = "myExternalId3" eut.Name = &newName - eut.ExternalID = &newExternalId + eut.ExternalId = &newExternalId _, err = service.UpsertServingEnvironment(eut) suite.Nilf(err, "error creating ServingEnvironment: %v", err) @@ -2205,7 +2205,7 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentsOrderedByLastUpdate() { // register a new ServingEnvironment eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, } firstEntity, err := service.UpsertServingEnvironment(eut) @@ -2214,19 +2214,19 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentsOrderedByLastUpdate() { newName := "Pricingentity2" newExternalId := "myExternalId2" eut.Name = &newName - eut.ExternalID = &newExternalId + eut.ExternalId = &newExternalId secondEntity, err := service.UpsertServingEnvironment(eut) suite.Nilf(err, "error creating ServingEnvironment: %v", err) newName = "Pricingentity3" newExternalId = "myExternalId3" eut.Name = &newName - eut.ExternalID = &newExternalId + eut.ExternalId = &newExternalId thirdEntity, err := service.UpsertServingEnvironment(eut) suite.Nilf(err, "error creating ServingEnvironment: %v", err) // update second entity - secondEntity.ExternalID = nil + secondEntity.ExternalId = nil _, err = service.UpsertServingEnvironment(secondEntity) suite.Nilf(err, "error creating ServingEnvironment: %v", err) @@ -2265,7 +2265,7 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentsWithPageSize() { // register a new ServingEnvironment eut := &openapi.ServingEnvironment{ Name: &entityName, - ExternalID: &entityExternalId, + ExternalId: &entityExternalId, } firstEntity, err := service.UpsertServingEnvironment(eut) @@ -2274,14 +2274,14 @@ func (suite *CoreTestSuite) TestGetServingEnvironmentsWithPageSize() { newName := "Pricingentity2" newExternalId := "myExternalId2" eut.Name = &newName - eut.ExternalID = &newExternalId + eut.ExternalId = &newExternalId secondEntity, err := service.UpsertServingEnvironment(eut) suite.Nilf(err, "error creating ServingEnvironment: %v", err) newName = "Pricingentity3" newExternalId = "myExternalId3" eut.Name = &newName - eut.ExternalID = &newExternalId + eut.ExternalId = &newExternalId thirdEntity, err := service.UpsertServingEnvironment(eut) suite.Nilf(err, "error creating ServingEnvironment: %v", err) @@ -2319,7 +2319,7 @@ func (suite *CoreTestSuite) TestCreateInferenceService() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2367,7 +2367,7 @@ func (suite *CoreTestSuite) TestCreateInferenceServiceFailure() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, ServingEnvironmentId: "9999", RegisteredModelId: "9998", CustomProperties: &map[string]openapi.MetadataValue{ @@ -2398,7 +2398,7 @@ func (suite *CoreTestSuite) TestUpdateInferenceService() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2419,7 +2419,7 @@ func (suite *CoreTestSuite) TestUpdateInferenceService() { newExternalId := "org.my_awesome_entity@v1" newScore := 0.95 - createdEntity.ExternalID = &newExternalId + createdEntity.ExternalId = &newExternalId (*createdEntity.CustomProperties)["score"] = openapi.MetadataValue{ MetadataDoubleValue: converter.NewMetadataDoubleValue(newScore), } @@ -2451,7 +2451,7 @@ func (suite *CoreTestSuite) TestUpdateInferenceService() { // update with nil name newExternalId = "org.my_awesome_entity_@v1" - updatedEntity.ExternalID = &newExternalId + updatedEntity.ExternalId = &newExternalId updatedEntity.Name = nil updatedEntity, err = service.UpsertInferenceService(updatedEntity) suite.Nilf(err, "error updating new model version for %s: %v", updateEntityId, err) @@ -2492,7 +2492,7 @@ func (suite *CoreTestSuite) TestUpdateInferenceServiceFailure() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2511,7 +2511,7 @@ func (suite *CoreTestSuite) TestUpdateInferenceServiceFailure() { newExternalId := "org.my_awesome_entity@v1" newScore := 0.95 - createdEntity.ExternalID = &newExternalId + createdEntity.ExternalId = &newExternalId (*createdEntity.CustomProperties)["score"] = openapi.MetadataValue{ MetadataDoubleValue: converter.NewMetadataDoubleValue(newScore), } @@ -2533,7 +2533,7 @@ func (suite *CoreTestSuite) TestGetInferenceServiceById() { state := openapi.INFERENCESERVICESTATE_UNDEPLOYED eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2564,7 +2564,7 @@ func (suite *CoreTestSuite) TestGetInferenceServiceById() { ctx := ctxById.Contexts[0] suite.Equal(*getById.Id, *converter.Int64ToString(ctx.Id), "returned id should match the mlmd context one") suite.Equal(*eut.Name, *getById.Name, "saved name should match the provided one") - suite.Equal(*eut.ExternalID, *getById.ExternalID, "saved external id should match the provided one") + suite.Equal(*eut.ExternalId, *getById.ExternalId, "saved external id should match the provided one") suite.Equal(*eut.DesiredState, *getById.DesiredState, "saved state should match the provided one") suite.Equal((*getById.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, customString, "saved custom_string_prop custom property should match the provided one") } @@ -2578,7 +2578,7 @@ func (suite *CoreTestSuite) TestGetRegisteredModelByInferenceServiceId() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2620,7 +2620,7 @@ func (suite *CoreTestSuite) TestGetModelVersionByInferenceServiceId() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2676,7 +2676,7 @@ func (suite *CoreTestSuite) TestGetModelArtifactByInferenceServiceId() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2719,7 +2719,7 @@ func (suite *CoreTestSuite) TestGetInferenceServiceByParamsName() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2749,7 +2749,7 @@ func (suite *CoreTestSuite) TestGetInferenceServiceByParamsName() { ctx := ctxById.Contexts[0] suite.Equal(*converter.Int64ToString(ctx.Id), *getByName.Id, "returned id should match the mlmd context one") suite.Equal(fmt.Sprintf("%s:%s", parentResourceId, *getByName.Name), *ctx.Name, "saved name should match the provided one") - suite.Equal(*ctx.ExternalId, *getByName.ExternalID, "saved external id should match the provided one") + suite.Equal(*ctx.ExternalId, *getByName.ExternalId, "saved external id should match the provided one") suite.Equal(ctx.CustomProperties["custom_string_prop"].GetStringValue(), (*getByName.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, "saved custom_string_prop custom property should match the provided one") } @@ -2762,7 +2762,7 @@ func (suite *CoreTestSuite) TestGetInfernenceServiceByParamsExternalId() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2779,8 +2779,8 @@ func (suite *CoreTestSuite) TestGetInfernenceServiceByParamsExternalId() { suite.NotNilf(createdEntity.Id, "created eut should not have nil Id") createdEntityId, _ := converter.StringToInt64(createdEntity.Id) - getByExternalId, err := service.GetInferenceServiceByParams(nil, nil, eut.ExternalID) - suite.Nilf(err, "error getting by external id %d", *eut.ExternalID) + getByExternalId, err := service.GetInferenceServiceByParams(nil, nil, eut.ExternalId) + suite.Nilf(err, "error getting by external id %d", *eut.ExternalId) ctxById, err := suite.mlmdClient.GetContextsByID(context.Background(), &proto.GetContextsByIDRequest{ ContextIds: []int64{ @@ -2792,7 +2792,7 @@ func (suite *CoreTestSuite) TestGetInfernenceServiceByParamsExternalId() { ctx := ctxById.Contexts[0] suite.Equal(*converter.Int64ToString(ctx.Id), *getByExternalId.Id, "returned id should match the mlmd context one") suite.Equal(fmt.Sprintf("%s:%s", parentResourceId, *getByExternalId.Name), *ctx.Name, "saved name should match the provided one") - suite.Equal(*ctx.ExternalId, *getByExternalId.ExternalID, "saved external id should match the provided one") + suite.Equal(*ctx.ExternalId, *getByExternalId.ExternalId, "saved external id should match the provided one") suite.Equal(ctx.CustomProperties["custom_string_prop"].GetStringValue(), (*getByExternalId.CustomProperties)["custom_string_prop"].MetadataStringValue.StringValue, "saved custom_string_prop custom property should match the provided one") } @@ -2805,7 +2805,7 @@ func (suite *CoreTestSuite) TestGetInferenceServiceByEmptyParams() { eut := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, @@ -2835,7 +2835,7 @@ func (suite *CoreTestSuite) TestGetInferenceServices() { eut1 := &openapi.InferenceService{ Name: &entityName, - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, Runtime: apiutils.Of("model-server0"), @@ -2845,7 +2845,7 @@ func (suite *CoreTestSuite) TestGetInferenceServices() { secondExtId := "org.myawesomeentity@v2" eut2 := &openapi.InferenceService{ Name: &secondName, - ExternalID: &secondExtId, + ExternalId: &secondExtId, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, Runtime: apiutils.Of("model-server1"), @@ -2855,7 +2855,7 @@ func (suite *CoreTestSuite) TestGetInferenceServices() { thirdExtId := "org.myawesomeentity@v3" eut3 := &openapi.InferenceService{ Name: &thirdName, - ExternalID: &thirdExtId, + ExternalId: &thirdExtId, ServingEnvironmentId: parentResourceId, RegisteredModelId: registeredModelId, Runtime: apiutils.Of("model-server2"), @@ -2878,7 +2878,7 @@ func (suite *CoreTestSuite) TestGetInferenceServices() { anotherExtId := "org.another@v1.0" eutAnother := &openapi.InferenceService{ Name: &anotherName, - ExternalID: &anotherExtId, + ExternalId: &anotherExtId, ServingEnvironmentId: anotherParentResourceId, RegisteredModelId: registeredModelId, Runtime: apiutils.Of("model-server3"), @@ -2925,11 +2925,11 @@ func (suite *CoreTestSuite) TestGetInferenceServices() { // update the second entity newExternalId := "updated.org:v2" - createdEntity2.ExternalID = &newExternalId + createdEntity2.ExternalId = &newExternalId createdEntity2, err = service.UpsertInferenceService(createdEntity2) suite.Nilf(err, "error creating new eut2 for %d", parentResourceId) - suite.Equal(newExternalId, *createdEntity2.ExternalID) + suite.Equal(newExternalId, *createdEntity2.ExternalId) getAllByParentResource, err = service.GetInferenceServices(api.ListOptions{ OrderBy: &orderByLastUpdate, @@ -2954,7 +2954,7 @@ func (suite *CoreTestSuite) TestCreateServeModel() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Description: &modelVersionDescription, Author: &author, } @@ -2966,7 +2966,7 @@ func (suite *CoreTestSuite) TestCreateServeModel() { eut := &openapi.ServeModel{ LastKnownState: (*openapi.ExecutionState)(&executionState), - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, Name: &entityName, ModelVersionId: createdVersionId, @@ -3019,7 +3019,7 @@ func (suite *CoreTestSuite) TestCreateServeModelFailure() { eut := &openapi.ServeModel{ LastKnownState: (*openapi.ExecutionState)(&executionState), - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, Name: &entityName, ModelVersionId: "9998", @@ -3048,7 +3048,7 @@ func (suite *CoreTestSuite) TestUpdateServeModel() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Description: &modelVersionDescription, Author: &author, } @@ -3060,7 +3060,7 @@ func (suite *CoreTestSuite) TestUpdateServeModel() { eut := &openapi.ServeModel{ LastKnownState: (*openapi.ExecutionState)(&executionState), - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, Name: &entityName, ModelVersionId: createdVersionId, @@ -3110,7 +3110,7 @@ func (suite *CoreTestSuite) TestUpdateServeModelFailure() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Description: &modelVersionDescription, Author: &author, } @@ -3121,7 +3121,7 @@ func (suite *CoreTestSuite) TestUpdateServeModelFailure() { eut := &openapi.ServeModel{ LastKnownState: (*openapi.ExecutionState)(&executionState), - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, Name: &entityName, ModelVersionId: createdVersionId, @@ -3157,7 +3157,7 @@ func (suite *CoreTestSuite) TestGetServeModelById() { modelVersion := &openapi.ModelVersion{ Name: &modelVersionName, - ExternalID: &versionExternalId, + ExternalId: &versionExternalId, Description: &modelVersionDescription, Author: &author, } @@ -3168,7 +3168,7 @@ func (suite *CoreTestSuite) TestGetServeModelById() { eut := &openapi.ServeModel{ LastKnownState: (*openapi.ExecutionState)(&executionState), - ExternalID: &entityExternalId2, + ExternalId: &entityExternalId2, Description: &entityDescription, Name: &entityName, ModelVersionId: createdVersionId, diff --git a/pkg/openapi/api_model_registry_service.go b/pkg/openapi/api_model_registry_service.go index cb1df38c..6e6361bc 100644 --- a/pkg/openapi/api_model_registry_service.go +++ b/pkg/openapi/api_model_registry_service.go @@ -1382,8 +1382,8 @@ type ApiFindInferenceServiceRequest struct { ctx context.Context ApiService *ModelRegistryServiceAPIService name *string - externalID *string - parentResourceID *string + externalId *string + parentResourceId *string } // Name of entity to search. @@ -1393,14 +1393,14 @@ func (r ApiFindInferenceServiceRequest) Name(name string) ApiFindInferenceServic } // External ID of entity to search. -func (r ApiFindInferenceServiceRequest) ExternalID(externalID string) ApiFindInferenceServiceRequest { - r.externalID = &externalID +func (r ApiFindInferenceServiceRequest) ExternalId(externalId string) ApiFindInferenceServiceRequest { + r.externalId = &externalId return r } // ID of the parent resource to use for search. -func (r ApiFindInferenceServiceRequest) ParentResourceID(parentResourceID string) ApiFindInferenceServiceRequest { - r.parentResourceID = &parentResourceID +func (r ApiFindInferenceServiceRequest) ParentResourceId(parentResourceId string) ApiFindInferenceServiceRequest { + r.parentResourceId = &parentResourceId return r } @@ -1448,11 +1448,11 @@ func (a *ModelRegistryServiceAPIService) FindInferenceServiceExecute(r ApiFindIn if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } - if r.parentResourceID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "parentResourceID", r.parentResourceID, "") + if r.parentResourceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "parentResourceId", r.parentResourceId, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1555,8 +1555,8 @@ type ApiFindModelArtifactRequest struct { ctx context.Context ApiService *ModelRegistryServiceAPIService name *string - externalID *string - parentResourceID *string + externalId *string + parentResourceId *string } // Name of entity to search. @@ -1566,14 +1566,14 @@ func (r ApiFindModelArtifactRequest) Name(name string) ApiFindModelArtifactReque } // External ID of entity to search. -func (r ApiFindModelArtifactRequest) ExternalID(externalID string) ApiFindModelArtifactRequest { - r.externalID = &externalID +func (r ApiFindModelArtifactRequest) ExternalId(externalId string) ApiFindModelArtifactRequest { + r.externalId = &externalId return r } // ID of the parent resource to use for search. -func (r ApiFindModelArtifactRequest) ParentResourceID(parentResourceID string) ApiFindModelArtifactRequest { - r.parentResourceID = &parentResourceID +func (r ApiFindModelArtifactRequest) ParentResourceId(parentResourceId string) ApiFindModelArtifactRequest { + r.parentResourceId = &parentResourceId return r } @@ -1621,11 +1621,11 @@ func (a *ModelRegistryServiceAPIService) FindModelArtifactExecute(r ApiFindModel if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } - if r.parentResourceID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "parentResourceID", r.parentResourceID, "") + if r.parentResourceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "parentResourceId", r.parentResourceId, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1728,8 +1728,8 @@ type ApiFindModelVersionRequest struct { ctx context.Context ApiService *ModelRegistryServiceAPIService name *string - externalID *string - parentResourceID *string + externalId *string + parentResourceId *string } // Name of entity to search. @@ -1739,14 +1739,14 @@ func (r ApiFindModelVersionRequest) Name(name string) ApiFindModelVersionRequest } // External ID of entity to search. -func (r ApiFindModelVersionRequest) ExternalID(externalID string) ApiFindModelVersionRequest { - r.externalID = &externalID +func (r ApiFindModelVersionRequest) ExternalId(externalId string) ApiFindModelVersionRequest { + r.externalId = &externalId return r } // ID of the parent resource to use for search. -func (r ApiFindModelVersionRequest) ParentResourceID(parentResourceID string) ApiFindModelVersionRequest { - r.parentResourceID = &parentResourceID +func (r ApiFindModelVersionRequest) ParentResourceId(parentResourceId string) ApiFindModelVersionRequest { + r.parentResourceId = &parentResourceId return r } @@ -1794,11 +1794,11 @@ func (a *ModelRegistryServiceAPIService) FindModelVersionExecute(r ApiFindModelV if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } - if r.parentResourceID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "parentResourceID", r.parentResourceID, "") + if r.parentResourceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "parentResourceId", r.parentResourceId, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1901,7 +1901,7 @@ type ApiFindRegisteredModelRequest struct { ctx context.Context ApiService *ModelRegistryServiceAPIService name *string - externalID *string + externalId *string } // Name of entity to search. @@ -1911,8 +1911,8 @@ func (r ApiFindRegisteredModelRequest) Name(name string) ApiFindRegisteredModelR } // External ID of entity to search. -func (r ApiFindRegisteredModelRequest) ExternalID(externalID string) ApiFindRegisteredModelRequest { - r.externalID = &externalID +func (r ApiFindRegisteredModelRequest) ExternalId(externalId string) ApiFindRegisteredModelRequest { + r.externalId = &externalId return r } @@ -1960,8 +1960,8 @@ func (a *ModelRegistryServiceAPIService) FindRegisteredModelExecute(r ApiFindReg if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2053,7 +2053,7 @@ type ApiFindServingEnvironmentRequest struct { ctx context.Context ApiService *ModelRegistryServiceAPIService name *string - externalID *string + externalId *string } // Name of entity to search. @@ -2063,8 +2063,8 @@ func (r ApiFindServingEnvironmentRequest) Name(name string) ApiFindServingEnviro } // External ID of entity to search. -func (r ApiFindServingEnvironmentRequest) ExternalID(externalID string) ApiFindServingEnvironmentRequest { - r.externalID = &externalID +func (r ApiFindServingEnvironmentRequest) ExternalId(externalId string) ApiFindServingEnvironmentRequest { + r.externalId = &externalId return r } @@ -2112,8 +2112,8 @@ func (a *ModelRegistryServiceAPIService) FindServingEnvironmentExecute(r ApiFind if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2206,7 +2206,7 @@ type ApiGetEnvironmentInferenceServicesRequest struct { ApiService *ModelRegistryServiceAPIService servingenvironmentId string name *string - externalID *string + externalId *string pageSize *string orderBy *OrderByField sortOrder *SortOrder @@ -2220,8 +2220,8 @@ func (r ApiGetEnvironmentInferenceServicesRequest) Name(name string) ApiGetEnvir } // External ID of entity to search. -func (r ApiGetEnvironmentInferenceServicesRequest) ExternalID(externalID string) ApiGetEnvironmentInferenceServicesRequest { - r.externalID = &externalID +func (r ApiGetEnvironmentInferenceServicesRequest) ExternalId(externalId string) ApiGetEnvironmentInferenceServicesRequest { + r.externalId = &externalId return r } @@ -2296,8 +2296,8 @@ func (a *ModelRegistryServiceAPIService) GetEnvironmentInferenceServicesExecute( if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") @@ -2674,7 +2674,7 @@ type ApiGetInferenceServiceServesRequest struct { ApiService *ModelRegistryServiceAPIService inferenceserviceId string name *string - externalID *string + externalId *string pageSize *string orderBy *OrderByField sortOrder *SortOrder @@ -2688,8 +2688,8 @@ func (r ApiGetInferenceServiceServesRequest) Name(name string) ApiGetInferenceSe } // External ID of entity to search. -func (r ApiGetInferenceServiceServesRequest) ExternalID(externalID string) ApiGetInferenceServiceServesRequest { - r.externalID = &externalID +func (r ApiGetInferenceServiceServesRequest) ExternalId(externalId string) ApiGetInferenceServiceServesRequest { + r.externalId = &externalId return r } @@ -2764,8 +2764,8 @@ func (a *ModelRegistryServiceAPIService) GetInferenceServiceServesExecute(r ApiG if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") @@ -3644,7 +3644,7 @@ type ApiGetModelVersionArtifactsRequest struct { ApiService *ModelRegistryServiceAPIService modelversionId string name *string - externalID *string + externalId *string pageSize *string orderBy *OrderByField sortOrder *SortOrder @@ -3658,8 +3658,8 @@ func (r ApiGetModelVersionArtifactsRequest) Name(name string) ApiGetModelVersion } // External ID of entity to search. -func (r ApiGetModelVersionArtifactsRequest) ExternalID(externalID string) ApiGetModelVersionArtifactsRequest { - r.externalID = &externalID +func (r ApiGetModelVersionArtifactsRequest) ExternalId(externalId string) ApiGetModelVersionArtifactsRequest { + r.externalId = &externalId return r } @@ -3732,8 +3732,8 @@ func (a *ModelRegistryServiceAPIService) GetModelVersionArtifactsExecute(r ApiGe if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") @@ -4135,7 +4135,7 @@ type ApiGetRegisteredModelVersionsRequest struct { ApiService *ModelRegistryServiceAPIService registeredmodelId string name *string - externalID *string + externalId *string pageSize *string orderBy *OrderByField sortOrder *SortOrder @@ -4149,8 +4149,8 @@ func (r ApiGetRegisteredModelVersionsRequest) Name(name string) ApiGetRegistered } // External ID of entity to search. -func (r ApiGetRegisteredModelVersionsRequest) ExternalID(externalID string) ApiGetRegisteredModelVersionsRequest { - r.externalID = &externalID +func (r ApiGetRegisteredModelVersionsRequest) ExternalId(externalId string) ApiGetRegisteredModelVersionsRequest { + r.externalId = &externalId return r } @@ -4225,8 +4225,8 @@ func (a *ModelRegistryServiceAPIService) GetRegisteredModelVersionsExecute(r Api if r.name != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "") } - if r.externalID != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "externalID", r.externalID, "") + if r.externalId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "externalId", r.externalId, "") } if r.pageSize != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") diff --git a/pkg/openapi/model_base_artifact.go b/pkg/openapi/model_base_artifact.go index 8e29c4da..caf57ab4 100644 --- a/pkg/openapi/model_base_artifact.go +++ b/pkg/openapi/model_base_artifact.go @@ -24,7 +24,7 @@ type BaseArtifact struct { // 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"` // 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"` @@ -123,36 +123,36 @@ 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) { +// 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 + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseArtifact) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseArtifact) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + 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) { +// 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 +// 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. @@ -363,8 +363,8 @@ func (o BaseArtifact) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri diff --git a/pkg/openapi/model_base_artifact_create.go b/pkg/openapi/model_base_artifact_create.go index 1973667d..a15cc9e8 100644 --- a/pkg/openapi/model_base_artifact_create.go +++ b/pkg/openapi/model_base_artifact_create.go @@ -24,7 +24,7 @@ type BaseArtifactCreate struct { // 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"` // 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"` @@ -117,36 +117,36 @@ 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) { +// 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 + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseArtifactCreate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseArtifactCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + 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) { +// 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 +// 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. @@ -261,8 +261,8 @@ func (o BaseArtifactCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri diff --git a/pkg/openapi/model_base_artifact_update.go b/pkg/openapi/model_base_artifact_update.go index 9cf629ab..eb35c9bc 100644 --- a/pkg/openapi/model_base_artifact_update.go +++ b/pkg/openapi/model_base_artifact_update.go @@ -24,7 +24,7 @@ type BaseArtifactUpdate struct { // 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"` // 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"` @@ -115,36 +115,36 @@ 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) { +// 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 + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseArtifactUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseArtifactUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + 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) { +// 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 +// 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. @@ -227,8 +227,8 @@ func (o BaseArtifactUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri diff --git a/pkg/openapi/model_base_execution.go b/pkg/openapi/model_base_execution.go index db2a8a5c..6037cf88 100644 --- a/pkg/openapi/model_base_execution.go +++ b/pkg/openapi/model_base_execution.go @@ -25,7 +25,7 @@ type BaseExecution struct { // 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"` // 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. @@ -153,36 +153,36 @@ 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) { +// 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 + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseExecution) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseExecution) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + 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) { +// 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 +// 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. @@ -332,8 +332,8 @@ func (o BaseExecution) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_base_execution_create.go b/pkg/openapi/model_base_execution_create.go index 4adbf4ff..d8edb691 100644 --- a/pkg/openapi/model_base_execution_create.go +++ b/pkg/openapi/model_base_execution_create.go @@ -25,7 +25,7 @@ type BaseExecutionCreate struct { // 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"` // 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"` } @@ -147,36 +147,36 @@ 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) { +// 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 + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseExecutionCreate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseExecutionCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + 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) { +// 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 +// 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. @@ -230,8 +230,8 @@ func (o BaseExecutionCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_base_execution_update.go b/pkg/openapi/model_base_execution_update.go index aa3716cd..4d1082f2 100644 --- a/pkg/openapi/model_base_execution_update.go +++ b/pkg/openapi/model_base_execution_update.go @@ -24,7 +24,7 @@ type BaseExecutionUpdate struct { // 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"` } @@ -113,36 +113,36 @@ 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) { +// 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 + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseExecutionUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseExecutionUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + 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) { +// 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 +// 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. @@ -193,8 +193,8 @@ func (o BaseExecutionUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.LastKnownState) { toSerialize["lastKnownState"] = o.LastKnownState diff --git a/pkg/openapi/model_base_resource.go b/pkg/openapi/model_base_resource.go index 37e2fd02..e13d90d9 100644 --- a/pkg/openapi/model_base_resource.go +++ b/pkg/openapi/model_base_resource.go @@ -24,7 +24,7 @@ type BaseResource struct { // 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"` // 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. @@ -116,36 +116,36 @@ 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) { +// 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 + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseResource) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseResource) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + 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) { +// 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 +// 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. @@ -292,8 +292,8 @@ func (o BaseResource) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_base_resource_create.go b/pkg/openapi/model_base_resource_create.go index a8e15895..2a520d1b 100644 --- a/pkg/openapi/model_base_resource_create.go +++ b/pkg/openapi/model_base_resource_create.go @@ -24,7 +24,7 @@ type BaseResourceCreate struct { // 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"` // 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"` } @@ -110,36 +110,36 @@ 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) { +// 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 + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseResourceCreate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseResourceCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + 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) { +// 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 +// 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. @@ -190,8 +190,8 @@ func (o BaseResourceCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_base_resource_update.go b/pkg/openapi/model_base_resource_update.go index 64044329..0e0de158 100644 --- a/pkg/openapi/model_base_resource_update.go +++ b/pkg/openapi/model_base_resource_update.go @@ -24,7 +24,7 @@ type BaseResourceUpdate struct { // 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"` } // NewBaseResourceUpdate instantiates a new BaseResourceUpdate object @@ -108,36 +108,36 @@ func (o *BaseResourceUpdate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *BaseResourceUpdate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *BaseResourceUpdate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *BaseResourceUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *BaseResourceUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *BaseResourceUpdate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *BaseResourceUpdate) 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 *BaseResourceUpdate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *BaseResourceUpdate) SetExternalId(v string) { + o.ExternalId = &v } func (o BaseResourceUpdate) MarshalJSON() ([]byte, error) { @@ -156,8 +156,8 @@ func (o BaseResourceUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } return toSerialize, nil } diff --git a/pkg/openapi/model_doc_artifact.go b/pkg/openapi/model_doc_artifact.go index f34fddd0..4a6c2b11 100644 --- a/pkg/openapi/model_doc_artifact.go +++ b/pkg/openapi/model_doc_artifact.go @@ -25,7 +25,7 @@ type DocArtifact struct { // 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"` // 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"` @@ -150,36 +150,36 @@ func (o *DocArtifact) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *DocArtifact) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// 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.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *DocArtifact) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *DocArtifact) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// 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 } -// SetExternalID gets a reference to the given string and assigns it to the ExternalID field. -func (o *DocArtifact) SetExternalID(v string) { - o.ExternalID = &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 } // GetUri returns the Uri field value if set, zero value otherwise. @@ -391,8 +391,8 @@ func (o DocArtifact) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri diff --git a/pkg/openapi/model_inference_service.go b/pkg/openapi/model_inference_service.go index 10eb0f16..e55148ae 100644 --- a/pkg/openapi/model_inference_service.go +++ b/pkg/openapi/model_inference_service.go @@ -24,7 +24,7 @@ type InferenceService struct { // 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"` // 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. @@ -131,36 +131,36 @@ func (o *InferenceService) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *InferenceService) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// 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.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *InferenceService) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *InferenceService) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// 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 } -// SetExternalID gets a reference to the given string and assigns it to the ExternalID field. -func (o *InferenceService) SetExternalID(v string) { - o.ExternalID = &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 } // GetName returns the Name field value if set, zero value otherwise. @@ -451,8 +451,8 @@ func (o InferenceService) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_inference_service_create.go b/pkg/openapi/model_inference_service_create.go index 58368c25..d0c7d07e 100644 --- a/pkg/openapi/model_inference_service_create.go +++ b/pkg/openapi/model_inference_service_create.go @@ -24,7 +24,7 @@ type InferenceServiceCreate struct { // 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"` // 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. @@ -125,36 +125,36 @@ func (o *InferenceServiceCreate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *InferenceServiceCreate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *InferenceServiceCreate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *InferenceServiceCreate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *InferenceServiceCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *InferenceServiceCreate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *InferenceServiceCreate) 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 *InferenceServiceCreate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *InferenceServiceCreate) SetExternalId(v string) { + o.ExternalId = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -349,8 +349,8 @@ func (o InferenceServiceCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_inference_service_update.go b/pkg/openapi/model_inference_service_update.go index c2b2d758..0b0c6e22 100644 --- a/pkg/openapi/model_inference_service_update.go +++ b/pkg/openapi/model_inference_service_update.go @@ -24,7 +24,7 @@ type InferenceServiceUpdate struct { // 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"` // 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. @@ -117,36 +117,36 @@ func (o *InferenceServiceUpdate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *InferenceServiceUpdate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *InferenceServiceUpdate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *InferenceServiceUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *InferenceServiceUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *InferenceServiceUpdate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *InferenceServiceUpdate) 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 *InferenceServiceUpdate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *InferenceServiceUpdate) SetExternalId(v string) { + o.ExternalId = &v } // GetModelVersionId returns the ModelVersionId field value if set, zero value otherwise. @@ -261,8 +261,8 @@ func (o InferenceServiceUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.ModelVersionId) { toSerialize["modelVersionId"] = o.ModelVersionId diff --git a/pkg/openapi/model_model_artifact.go b/pkg/openapi/model_model_artifact.go index c0992e75..166a6646 100644 --- a/pkg/openapi/model_model_artifact.go +++ b/pkg/openapi/model_model_artifact.go @@ -25,7 +25,7 @@ type ModelArtifact struct { // 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"` // 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"` @@ -160,36 +160,36 @@ func (o *ModelArtifact) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ModelArtifact) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// 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.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ModelArtifact) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ModelArtifact) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// 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 } -// SetExternalID gets a reference to the given string and assigns it to the ExternalID field. -func (o *ModelArtifact) SetExternalID(v string) { - o.ExternalID = &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 } // GetUri returns the Uri field value if set, zero value otherwise. @@ -561,8 +561,8 @@ func (o ModelArtifact) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri diff --git a/pkg/openapi/model_model_artifact_create.go b/pkg/openapi/model_model_artifact_create.go index 16924f75..c0056e87 100644 --- a/pkg/openapi/model_model_artifact_create.go +++ b/pkg/openapi/model_model_artifact_create.go @@ -24,7 +24,7 @@ type ModelArtifactCreate struct { // 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"` // 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"` @@ -127,36 +127,36 @@ func (o *ModelArtifactCreate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// 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.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ModelArtifactCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// 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 } -// SetExternalID gets a reference to the given string and assigns it to the ExternalID field. -func (o *ModelArtifactCreate) SetExternalID(v string) { - o.ExternalID = &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 } // GetUri returns the Uri field value if set, zero value otherwise. @@ -431,8 +431,8 @@ func (o ModelArtifactCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri diff --git a/pkg/openapi/model_model_artifact_update.go b/pkg/openapi/model_model_artifact_update.go index 60d38ea8..b4773055 100644 --- a/pkg/openapi/model_model_artifact_update.go +++ b/pkg/openapi/model_model_artifact_update.go @@ -24,7 +24,7 @@ type ModelArtifactUpdate struct { // 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"` // 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"` @@ -125,36 +125,36 @@ func (o *ModelArtifactUpdate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ModelArtifactUpdate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ModelArtifactUpdate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *ModelArtifactUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ModelArtifactUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ModelArtifactUpdate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *ModelArtifactUpdate) 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 *ModelArtifactUpdate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ModelArtifactUpdate) SetExternalId(v string) { + o.ExternalId = &v } // GetUri returns the Uri field value if set, zero value otherwise. @@ -397,8 +397,8 @@ func (o ModelArtifactUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Uri) { toSerialize["uri"] = o.Uri diff --git a/pkg/openapi/model_model_version.go b/pkg/openapi/model_model_version.go index b4f5a79f..70bf0ba0 100644 --- a/pkg/openapi/model_model_version.go +++ b/pkg/openapi/model_model_version.go @@ -24,7 +24,7 @@ type ModelVersion struct { // 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"` // 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"` @@ -123,36 +123,36 @@ func (o *ModelVersion) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ModelVersion) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// 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.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ModelVersion) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ModelVersion) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// 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 } -// SetExternalID gets a reference to the given string and assigns it to the ExternalID field. -func (o *ModelVersion) SetExternalID(v string) { - o.ExternalID = &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 } // GetName returns the Name field value if set, zero value otherwise. @@ -363,8 +363,8 @@ func (o ModelVersion) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_model_version_create.go b/pkg/openapi/model_model_version_create.go index 6786dd96..292de603 100644 --- a/pkg/openapi/model_model_version_create.go +++ b/pkg/openapi/model_model_version_create.go @@ -20,13 +20,13 @@ var _ MappedNullable = &ModelVersionCreate{} // ModelVersionCreate Represents a ModelVersion belonging to a RegisteredModel. type ModelVersionCreate struct { // ID of the `RegisteredModel` to which this version belongs. - RegisteredModelID string `json:"registeredModelID"` + RegisteredModelId string `json:"registeredModelId"` // 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"` // 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"` @@ -38,7 +38,7 @@ type ModelVersionCreate struct { // 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 NewModelVersionCreate(registeredModelID string) *ModelVersionCreate { +func NewModelVersionCreate(registeredModelId string) *ModelVersionCreate { this := ModelVersionCreate{} var state ModelVersionState = MODELVERSIONSTATE_LIVE this.State = &state @@ -55,28 +55,28 @@ func NewModelVersionCreateWithDefaults() *ModelVersionCreate { return &this } -// GetRegisteredModelID returns the RegisteredModelID field value -func (o *ModelVersionCreate) GetRegisteredModelID() string { +// GetRegisteredModelId returns the RegisteredModelId field value +func (o *ModelVersionCreate) GetRegisteredModelId() string { if o == nil { var ret string return ret } - return o.RegisteredModelID + return o.RegisteredModelId } -// GetRegisteredModelIDOk returns a tuple with the RegisteredModelID field value +// GetRegisteredModelIdOk returns a tuple with the RegisteredModelId field value // and a boolean to check if the value has been set. -func (o *ModelVersionCreate) GetRegisteredModelIDOk() (*string, bool) { +func (o *ModelVersionCreate) GetRegisteredModelIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.RegisteredModelID, true + return &o.RegisteredModelId, true } -// SetRegisteredModelID sets field value -func (o *ModelVersionCreate) SetRegisteredModelID(v string) { - o.RegisteredModelID = v +// SetRegisteredModelId sets field value +func (o *ModelVersionCreate) SetRegisteredModelId(v string) { + o.RegisteredModelId = v } // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. @@ -143,36 +143,36 @@ func (o *ModelVersionCreate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ModelVersionCreate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ModelVersionCreate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *ModelVersionCreate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ModelVersionCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ModelVersionCreate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *ModelVersionCreate) 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 *ModelVersionCreate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ModelVersionCreate) SetExternalId(v string) { + o.ExternalId = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -281,15 +281,15 @@ func (o ModelVersionCreate) MarshalJSON() ([]byte, error) { func (o ModelVersionCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["registeredModelID"] = o.RegisteredModelID + toSerialize["registeredModelId"] = o.RegisteredModelId 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.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_model_version_update.go b/pkg/openapi/model_model_version_update.go index f9de3d7b..b79b0006 100644 --- a/pkg/openapi/model_model_version_update.go +++ b/pkg/openapi/model_model_version_update.go @@ -24,7 +24,7 @@ type ModelVersionUpdate struct { // 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"` State *ModelVersionState `json:"state,omitempty"` // Name of the author. Author *string `json:"author,omitempty"` @@ -115,36 +115,36 @@ func (o *ModelVersionUpdate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ModelVersionUpdate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ModelVersionUpdate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *ModelVersionUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ModelVersionUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ModelVersionUpdate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *ModelVersionUpdate) 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 *ModelVersionUpdate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ModelVersionUpdate) SetExternalId(v string) { + o.ExternalId = &v } // GetState returns the State field value if set, zero value otherwise. @@ -227,8 +227,8 @@ func (o ModelVersionUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.State) { toSerialize["state"] = o.State diff --git a/pkg/openapi/model_order_by_field.go b/pkg/openapi/model_order_by_field.go index d33ec83a..3874b5e8 100644 --- a/pkg/openapi/model_order_by_field.go +++ b/pkg/openapi/model_order_by_field.go @@ -22,14 +22,14 @@ type OrderByField string const ( ORDERBYFIELD_CREATE_TIME OrderByField = "CREATE_TIME" ORDERBYFIELD_LAST_UPDATE_TIME OrderByField = "LAST_UPDATE_TIME" - ORDERBYFIELD_ID OrderByField = "ID" + ORDERBYFIELD_ID OrderByField = "Id" ) // All allowed values of OrderByField enum var AllowedOrderByFieldEnumValues = []OrderByField{ "CREATE_TIME", "LAST_UPDATE_TIME", - "ID", + "Id", } func (v *OrderByField) UnmarshalJSON(src []byte) error { diff --git a/pkg/openapi/model_registered_model.go b/pkg/openapi/model_registered_model.go index b045ab46..01ff9184 100644 --- a/pkg/openapi/model_registered_model.go +++ b/pkg/openapi/model_registered_model.go @@ -24,7 +24,7 @@ type RegisteredModel struct { // 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"` // 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. @@ -121,36 +121,36 @@ func (o *RegisteredModel) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *RegisteredModel) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// 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.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *RegisteredModel) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *RegisteredModel) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// 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 } -// SetExternalID gets a reference to the given string and assigns it to the ExternalID field. -func (o *RegisteredModel) SetExternalID(v string) { - o.ExternalID = &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 } // GetName returns the Name field value if set, zero value otherwise. @@ -329,8 +329,8 @@ func (o RegisteredModel) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_registered_model_create.go b/pkg/openapi/model_registered_model_create.go index 98311afc..a7914e4a 100644 --- a/pkg/openapi/model_registered_model_create.go +++ b/pkg/openapi/model_registered_model_create.go @@ -24,7 +24,7 @@ type RegisteredModelCreate struct { // 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"` // 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"` @@ -115,36 +115,36 @@ func (o *RegisteredModelCreate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *RegisteredModelCreate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *RegisteredModelCreate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *RegisteredModelCreate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *RegisteredModelCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *RegisteredModelCreate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *RegisteredModelCreate) 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 *RegisteredModelCreate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *RegisteredModelCreate) SetExternalId(v string) { + o.ExternalId = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -227,8 +227,8 @@ func (o RegisteredModelCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_registered_model_update.go b/pkg/openapi/model_registered_model_update.go index bf19ca66..ebf56ff7 100644 --- a/pkg/openapi/model_registered_model_update.go +++ b/pkg/openapi/model_registered_model_update.go @@ -24,7 +24,7 @@ type RegisteredModelUpdate struct { // 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"` State *RegisteredModelState `json:"state,omitempty"` } @@ -113,36 +113,36 @@ func (o *RegisteredModelUpdate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *RegisteredModelUpdate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *RegisteredModelUpdate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *RegisteredModelUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *RegisteredModelUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *RegisteredModelUpdate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *RegisteredModelUpdate) 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 *RegisteredModelUpdate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *RegisteredModelUpdate) SetExternalId(v string) { + o.ExternalId = &v } // GetState returns the State field value if set, zero value otherwise. @@ -193,8 +193,8 @@ func (o RegisteredModelUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.State) { toSerialize["state"] = o.State diff --git a/pkg/openapi/model_serve_model.go b/pkg/openapi/model_serve_model.go index 338aa802..562d40a3 100644 --- a/pkg/openapi/model_serve_model.go +++ b/pkg/openapi/model_serve_model.go @@ -25,7 +25,7 @@ type ServeModel struct { // 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"` // 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. @@ -156,36 +156,36 @@ func (o *ServeModel) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ServeModel) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// 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.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ServeModel) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ServeModel) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// 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 } -// SetExternalID gets a reference to the given string and assigns it to the ExternalID field. -func (o *ServeModel) SetExternalID(v string) { - o.ExternalID = &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 } // GetName returns the Name field value if set, zero value otherwise. @@ -359,8 +359,8 @@ func (o ServeModel) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_serve_model_create.go b/pkg/openapi/model_serve_model_create.go index dcacef1a..7a35298d 100644 --- a/pkg/openapi/model_serve_model_create.go +++ b/pkg/openapi/model_serve_model_create.go @@ -25,7 +25,7 @@ type ServeModelCreate struct { // 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"` // 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`. @@ -150,36 +150,36 @@ func (o *ServeModelCreate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ServeModelCreate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ServeModelCreate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *ServeModelCreate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ServeModelCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ServeModelCreate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *ServeModelCreate) 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 *ServeModelCreate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ServeModelCreate) SetExternalId(v string) { + o.ExternalId = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -257,8 +257,8 @@ func (o ServeModelCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_serve_model_update.go b/pkg/openapi/model_serve_model_update.go index c21e64d8..cb780482 100644 --- a/pkg/openapi/model_serve_model_update.go +++ b/pkg/openapi/model_serve_model_update.go @@ -25,7 +25,7 @@ type ServeModelUpdate struct { // 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"` } // NewServeModelUpdate instantiates a new ServeModelUpdate object @@ -145,36 +145,36 @@ func (o *ServeModelUpdate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ServeModelUpdate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ServeModelUpdate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *ServeModelUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ServeModelUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ServeModelUpdate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *ServeModelUpdate) 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 *ServeModelUpdate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ServeModelUpdate) SetExternalId(v string) { + o.ExternalId = &v } func (o ServeModelUpdate) MarshalJSON() ([]byte, error) { @@ -196,8 +196,8 @@ func (o ServeModelUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } return toSerialize, nil } diff --git a/pkg/openapi/model_serving_environment.go b/pkg/openapi/model_serving_environment.go index c6874536..5ac5e250 100644 --- a/pkg/openapi/model_serving_environment.go +++ b/pkg/openapi/model_serving_environment.go @@ -24,7 +24,7 @@ type ServingEnvironment struct { // 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"` // 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. @@ -116,36 +116,36 @@ func (o *ServingEnvironment) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ServingEnvironment) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// 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.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ServingEnvironment) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ServingEnvironment) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// 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 } -// SetExternalID gets a reference to the given string and assigns it to the ExternalID field. -func (o *ServingEnvironment) SetExternalID(v string) { - o.ExternalID = &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 } // GetName returns the Name field value if set, zero value otherwise. @@ -292,8 +292,8 @@ func (o ServingEnvironment) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_serving_environment_create.go b/pkg/openapi/model_serving_environment_create.go index 27001c3a..a5f7488b 100644 --- a/pkg/openapi/model_serving_environment_create.go +++ b/pkg/openapi/model_serving_environment_create.go @@ -24,7 +24,7 @@ type ServingEnvironmentCreate struct { // 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"` // 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"` } @@ -110,36 +110,36 @@ func (o *ServingEnvironmentCreate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ServingEnvironmentCreate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ServingEnvironmentCreate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *ServingEnvironmentCreate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ServingEnvironmentCreate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ServingEnvironmentCreate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *ServingEnvironmentCreate) 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 *ServingEnvironmentCreate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ServingEnvironmentCreate) SetExternalId(v string) { + o.ExternalId = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -190,8 +190,8 @@ func (o ServingEnvironmentCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } if !IsNil(o.Name) { toSerialize["name"] = o.Name diff --git a/pkg/openapi/model_serving_environment_update.go b/pkg/openapi/model_serving_environment_update.go index 1da97af9..2edeb169 100644 --- a/pkg/openapi/model_serving_environment_update.go +++ b/pkg/openapi/model_serving_environment_update.go @@ -24,7 +24,7 @@ type ServingEnvironmentUpdate struct { // 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"` } // NewServingEnvironmentUpdate instantiates a new ServingEnvironmentUpdate object @@ -108,36 +108,36 @@ func (o *ServingEnvironmentUpdate) SetDescription(v string) { o.Description = &v } -// GetExternalID returns the ExternalID field value if set, zero value otherwise. -func (o *ServingEnvironmentUpdate) GetExternalID() string { - if o == nil || IsNil(o.ExternalID) { +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *ServingEnvironmentUpdate) GetExternalId() string { + if o == nil || IsNil(o.ExternalId) { var ret string return ret } - return *o.ExternalID + return *o.ExternalId } -// GetExternalIDOk returns a tuple with the ExternalID 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 *ServingEnvironmentUpdate) GetExternalIDOk() (*string, bool) { - if o == nil || IsNil(o.ExternalID) { +func (o *ServingEnvironmentUpdate) GetExternalIdOk() (*string, bool) { + if o == nil || IsNil(o.ExternalId) { return nil, false } - return o.ExternalID, true + return o.ExternalId, true } -// HasExternalID returns a boolean if a field has been set. -func (o *ServingEnvironmentUpdate) HasExternalID() bool { - if o != nil && !IsNil(o.ExternalID) { +// HasExternalId returns a boolean if a field has been set. +func (o *ServingEnvironmentUpdate) 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 *ServingEnvironmentUpdate) SetExternalID(v string) { - o.ExternalID = &v +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *ServingEnvironmentUpdate) SetExternalId(v string) { + o.ExternalId = &v } func (o ServingEnvironmentUpdate) MarshalJSON() ([]byte, error) { @@ -156,8 +156,8 @@ func (o ServingEnvironmentUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.Description) { toSerialize["description"] = o.Description } - if !IsNil(o.ExternalID) { - toSerialize["externalID"] = o.ExternalID + if !IsNil(o.ExternalId) { + toSerialize["externalId"] = o.ExternalId } return toSerialize, nil } diff --git a/test/scripts/rest.sh b/test/scripts/rest.sh index 4c0d612c..3a1ab600 100755 --- a/test/scripts/rest.sh +++ b/test/scripts/rest.sh @@ -1,19 +1,19 @@ #!/bin/bash make_post_extract_id() { - local url="$1" - local data="$2" - local id=$(curl -s -X POST "$url" \ - -H 'accept: application/json' \ - -H 'Content-Type: application/json' \ - -d "$data" | jq -r '.id') + local url="$1" + local data="$2" + local id=$(curl -s -X POST "$url" \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d "$data" | jq -r '.id') - if [ -z "$id" ]; then - echo "Error: Failed to extract ID from response" - exit 1 - fi + if [ -z "$id" ]; then + echo "Error: Failed to extract ID from response" + exit 1 + fi - echo "$id" + echo "$id" } # TODO: finalize using openshift-ci values. @@ -30,7 +30,7 @@ rm_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha2/registere }') if [ $? -ne 0 ]; then - exit 1 + exit 1 fi echo "Registered Model ID: $rm_id" @@ -38,11 +38,11 @@ mv_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha2/model_ver "description": "lorem ipsum model version", "name": "v1", "author": "John Doe", - "registeredModelID": "'"$rm_id"'" + "registeredModelId": "'"$rm_id"'" }') if [ $? -ne 0 ]; then - exit 1 + exit 1 fi echo "Model Version ID: $mv_id" @@ -59,7 +59,7 @@ ma_id=$(make_post_extract_id "$MR_HOSTNAME/api/model_registry/v1alpha2/model_ver }') if [ $? -ne 0 ]; then - exit 1 + exit 1 fi echo "Model Artifact ID: $ma_id" @@ -91,7 +91,7 @@ EOF # TODO this will continue once we have MC PR merged from: https://github.com/opendatahub-io/odh-model-controller/pull/135 iss_mr=$(curl -s -X 'GET' "$MR_HOSTNAME/api/model_registry/v1alpha2/inference_services" \ - -H 'accept: application/json') + -H 'accept: application/json') echo "InferenceService entities on MR:" echo "$iss_mr"