From 85a062b2e2739cf9bcbfc9b7dd46eb657cda38de Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 25 Mar 2024 15:14:12 +0000 Subject: [PATCH] workaround generation issue with kiota Signed-off-by: Andrea Peruffo --- api/openapi/model-registry.yaml | 29 +- pkg/openapi/model_model_artifact_create.go | 364 ++++++++++----------- pkg/openapi/model_model_artifact_update.go | 146 ++++----- 3 files changed, 280 insertions(+), 259 deletions(-) diff --git a/api/openapi/model-registry.yaml b/api/openapi/model-registry.yaml index c6de5f24..6e4082b8 100644 --- a/api/openapi/model-registry.yaml +++ b/api/openapi/model-registry.yaml @@ -1078,7 +1078,7 @@ components: author: description: Name of the author. type: string - WithBaseArtifactUpdate: + WithBaseArtifactUpdate: type: object properties: uri: @@ -1293,18 +1293,39 @@ components: type: string ModelArtifactUpdate: description: An ML model artifact. + type: object allOf: - - $ref: "#/components/schemas/WithBaseArtifactUpdate" - $ref: "#/components/schemas/WithBaseResourceUpdate" - $ref: "#/components/schemas/WithModelArtifactUpdate" + # TODO: WORKAROUND: WithBaseArtifactUpdate got picked up as direct parent - inlining it for now + # - $ref: "#/components/schemas/WithBaseArtifactUpdate" + - type: object + properties: + uri: + description: |- + The uniform resource identifier of the physical artifact. + May be empty if there is no physical artifact. + type: string + state: + $ref: "#/components/schemas/ArtifactState" ModelArtifactCreate: description: An ML model artifact. type: object allOf: - - $ref: "#/components/schemas/WithBaseArtifactUpdate" + - $ref: "#/components/schemas/WithModelArtifactUpdate" - $ref: "#/components/schemas/WithBaseResourceCreate" - $ref: "#/components/schemas/WithBaseResourceUpdate" - - $ref: "#/components/schemas/WithModelArtifactUpdate" + # TODO: WORKAROUND: WithBaseArtifactUpdate got picked up as direct parent - inlining it for now + # - $ref: "#/components/schemas/WithBaseArtifactUpdate" + - type: object + properties: + uri: + description: |- + The uniform resource identifier of the physical artifact. + May be empty if there is no physical artifact. + type: string + state: + $ref: "#/components/schemas/ArtifactState" Error: description: Error code and message. required: diff --git a/pkg/openapi/model_model_artifact_create.go b/pkg/openapi/model_model_artifact_create.go index d1038298..f317491c 100644 --- a/pkg/openapi/model_model_artifact_create.go +++ b/pkg/openapi/model_model_artifact_create.go @@ -19,17 +19,6 @@ var _ MappedNullable = &ModelArtifactCreate{} // ModelArtifactCreate An ML model artifact. type ModelArtifactCreate struct { - // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. - Uri *string `json:"uri,omitempty"` - State *ArtifactState `json:"state,omitempty"` - // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. - Name *string `json:"name,omitempty"` - // User provided custom properties which are not defined by its type. - CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` - // An optional description about the resource. - Description *string `json:"description,omitempty"` - // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. - ExternalId *string `json:"externalId,omitempty"` // Name of the model format. ModelFormatName *string `json:"modelFormatName,omitempty"` // Storage secret name. @@ -40,6 +29,17 @@ type ModelArtifactCreate struct { ModelFormatVersion *string `json:"modelFormatVersion,omitempty"` // Name of the service account with storage secret. ServiceAccountName *string `json:"serviceAccountName,omitempty"` + // The client provided name of the artifact. This field is optional. If set, it must be unique among all the artifacts of the same artifact type within a database instance and cannot be changed once set. + Name *string `json:"name,omitempty"` + // User provided custom properties which are not defined by its type. + CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` + // An optional description about the resource. + Description *string `json:"description,omitempty"` + // The external id that come from the clients’ system. This field is optional. If set, it must be unique among all resources within a database instance. + ExternalId *string `json:"externalId,omitempty"` + // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. + Uri *string `json:"uri,omitempty"` + State *ArtifactState `json:"state,omitempty"` } // NewModelArtifactCreate instantiates a new ModelArtifactCreate object @@ -63,68 +63,164 @@ func NewModelArtifactCreateWithDefaults() *ModelArtifactCreate { return &this } -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetUri() string { - if o == nil || IsNil(o.Uri) { +// GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetModelFormatName() string { + if o == nil || IsNil(o.ModelFormatName) { var ret string return ret } - return *o.Uri + return *o.ModelFormatName } -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// GetModelFormatNameOk returns a tuple with the ModelFormatName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { +func (o *ModelArtifactCreate) GetModelFormatNameOk() (*string, bool) { + if o == nil || IsNil(o.ModelFormatName) { return nil, false } - return o.Uri, true + return o.ModelFormatName, true } -// HasUri returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasUri() bool { - if o != nil && !IsNil(o.Uri) { +// HasModelFormatName returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasModelFormatName() bool { + if o != nil && !IsNil(o.ModelFormatName) { return true } return false } -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *ModelArtifactCreate) SetUri(v string) { - o.Uri = &v +// SetModelFormatName gets a reference to the given string and assigns it to the ModelFormatName field. +func (o *ModelArtifactCreate) SetModelFormatName(v string) { + o.ModelFormatName = &v } -// GetState returns the State field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState +// GetStorageKey returns the StorageKey field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetStorageKey() string { + if o == nil || IsNil(o.StorageKey) { + var ret string return ret } - return *o.State + return *o.StorageKey } -// GetStateOk returns a tuple with the State field value if set, nil otherwise +// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { +func (o *ModelArtifactCreate) GetStorageKeyOk() (*string, bool) { + if o == nil || IsNil(o.StorageKey) { return nil, false } - return o.State, true + return o.StorageKey, true } -// HasState returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasState() bool { - if o != nil && !IsNil(o.State) { +// HasStorageKey returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasStorageKey() bool { + if o != nil && !IsNil(o.StorageKey) { return true } return false } -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *ModelArtifactCreate) SetState(v ArtifactState) { - o.State = &v +// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field. +func (o *ModelArtifactCreate) SetStorageKey(v string) { + o.StorageKey = &v +} + +// GetStoragePath returns the StoragePath field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetStoragePath() string { + if o == nil || IsNil(o.StoragePath) { + var ret string + return ret + } + return *o.StoragePath +} + +// GetStoragePathOk returns a tuple with the StoragePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelArtifactCreate) GetStoragePathOk() (*string, bool) { + if o == nil || IsNil(o.StoragePath) { + return nil, false + } + return o.StoragePath, true +} + +// HasStoragePath returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasStoragePath() bool { + if o != nil && !IsNil(o.StoragePath) { + return true + } + + return false +} + +// SetStoragePath gets a reference to the given string and assigns it to the StoragePath field. +func (o *ModelArtifactCreate) SetStoragePath(v string) { + o.StoragePath = &v +} + +// GetModelFormatVersion returns the ModelFormatVersion field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetModelFormatVersion() string { + if o == nil || IsNil(o.ModelFormatVersion) { + var ret string + return ret + } + return *o.ModelFormatVersion +} + +// GetModelFormatVersionOk returns a tuple with the ModelFormatVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelArtifactCreate) GetModelFormatVersionOk() (*string, bool) { + if o == nil || IsNil(o.ModelFormatVersion) { + return nil, false + } + return o.ModelFormatVersion, true +} + +// HasModelFormatVersion returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasModelFormatVersion() bool { + if o != nil && !IsNil(o.ModelFormatVersion) { + return true + } + + return false +} + +// SetModelFormatVersion gets a reference to the given string and assigns it to the ModelFormatVersion field. +func (o *ModelArtifactCreate) SetModelFormatVersion(v string) { + o.ModelFormatVersion = &v +} + +// GetServiceAccountName returns the ServiceAccountName field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetServiceAccountName() string { + if o == nil || IsNil(o.ServiceAccountName) { + var ret string + return ret + } + return *o.ServiceAccountName +} + +// GetServiceAccountNameOk returns a tuple with the ServiceAccountName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelArtifactCreate) GetServiceAccountNameOk() (*string, bool) { + if o == nil || IsNil(o.ServiceAccountName) { + return nil, false + } + return o.ServiceAccountName, true +} + +// HasServiceAccountName returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasServiceAccountName() bool { + if o != nil && !IsNil(o.ServiceAccountName) { + return true + } + + return false +} + +// SetServiceAccountName gets a reference to the given string and assigns it to the ServiceAccountName field. +func (o *ModelArtifactCreate) SetServiceAccountName(v string) { + o.ServiceAccountName = &v } // GetName returns the Name field value if set, zero value otherwise. @@ -255,164 +351,68 @@ func (o *ModelArtifactCreate) SetExternalId(v string) { o.ExternalId = &v } -// GetModelFormatName returns the ModelFormatName field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetModelFormatName() string { - if o == nil || IsNil(o.ModelFormatName) { - var ret string - return ret - } - return *o.ModelFormatName -} - -// GetModelFormatNameOk returns a tuple with the ModelFormatName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetModelFormatNameOk() (*string, bool) { - if o == nil || IsNil(o.ModelFormatName) { - return nil, false - } - return o.ModelFormatName, true -} - -// HasModelFormatName returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasModelFormatName() bool { - if o != nil && !IsNil(o.ModelFormatName) { - return true - } - - return false -} - -// SetModelFormatName gets a reference to the given string and assigns it to the ModelFormatName field. -func (o *ModelArtifactCreate) SetModelFormatName(v string) { - o.ModelFormatName = &v -} - -// GetStorageKey returns the StorageKey field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetStorageKey() string { - if o == nil || IsNil(o.StorageKey) { - var ret string - return ret - } - return *o.StorageKey -} - -// GetStorageKeyOk returns a tuple with the StorageKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetStorageKeyOk() (*string, bool) { - if o == nil || IsNil(o.StorageKey) { - return nil, false - } - return o.StorageKey, true -} - -// HasStorageKey returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasStorageKey() bool { - if o != nil && !IsNil(o.StorageKey) { - return true - } - - return false -} - -// SetStorageKey gets a reference to the given string and assigns it to the StorageKey field. -func (o *ModelArtifactCreate) SetStorageKey(v string) { - o.StorageKey = &v -} - -// GetStoragePath returns the StoragePath field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetStoragePath() string { - if o == nil || IsNil(o.StoragePath) { - var ret string - return ret - } - return *o.StoragePath -} - -// GetStoragePathOk returns a tuple with the StoragePath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetStoragePathOk() (*string, bool) { - if o == nil || IsNil(o.StoragePath) { - return nil, false - } - return o.StoragePath, true -} - -// HasStoragePath returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasStoragePath() bool { - if o != nil && !IsNil(o.StoragePath) { - return true - } - - return false -} - -// SetStoragePath gets a reference to the given string and assigns it to the StoragePath field. -func (o *ModelArtifactCreate) SetStoragePath(v string) { - o.StoragePath = &v -} - -// GetModelFormatVersion returns the ModelFormatVersion field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetModelFormatVersion() string { - if o == nil || IsNil(o.ModelFormatVersion) { +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetUri() string { + if o == nil || IsNil(o.Uri) { var ret string return ret } - return *o.ModelFormatVersion + return *o.Uri } -// GetModelFormatVersionOk returns a tuple with the ModelFormatVersion field value if set, nil otherwise +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetModelFormatVersionOk() (*string, bool) { - if o == nil || IsNil(o.ModelFormatVersion) { +func (o *ModelArtifactCreate) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { return nil, false } - return o.ModelFormatVersion, true + return o.Uri, true } -// HasModelFormatVersion returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasModelFormatVersion() bool { - if o != nil && !IsNil(o.ModelFormatVersion) { +// HasUri returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasUri() bool { + if o != nil && !IsNil(o.Uri) { return true } return false } -// SetModelFormatVersion gets a reference to the given string and assigns it to the ModelFormatVersion field. -func (o *ModelArtifactCreate) SetModelFormatVersion(v string) { - o.ModelFormatVersion = &v +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *ModelArtifactCreate) SetUri(v string) { + o.Uri = &v } -// GetServiceAccountName returns the ServiceAccountName field value if set, zero value otherwise. -func (o *ModelArtifactCreate) GetServiceAccountName() string { - if o == nil || IsNil(o.ServiceAccountName) { - var ret string +// GetState returns the State field value if set, zero value otherwise. +func (o *ModelArtifactCreate) GetState() ArtifactState { + if o == nil || IsNil(o.State) { + var ret ArtifactState return ret } - return *o.ServiceAccountName + return *o.State } -// GetServiceAccountNameOk returns a tuple with the ServiceAccountName field value if set, nil otherwise +// GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ModelArtifactCreate) GetServiceAccountNameOk() (*string, bool) { - if o == nil || IsNil(o.ServiceAccountName) { +func (o *ModelArtifactCreate) GetStateOk() (*ArtifactState, bool) { + if o == nil || IsNil(o.State) { return nil, false } - return o.ServiceAccountName, true + return o.State, true } -// HasServiceAccountName returns a boolean if a field has been set. -func (o *ModelArtifactCreate) HasServiceAccountName() bool { - if o != nil && !IsNil(o.ServiceAccountName) { +// HasState returns a boolean if a field has been set. +func (o *ModelArtifactCreate) HasState() bool { + if o != nil && !IsNil(o.State) { return true } return false } -// SetServiceAccountName gets a reference to the given string and assigns it to the ServiceAccountName field. -func (o *ModelArtifactCreate) SetServiceAccountName(v string) { - o.ServiceAccountName = &v +// SetState gets a reference to the given ArtifactState and assigns it to the State field. +func (o *ModelArtifactCreate) SetState(v ArtifactState) { + o.State = &v } func (o ModelArtifactCreate) MarshalJSON() ([]byte, error) { @@ -425,11 +425,20 @@ func (o ModelArtifactCreate) MarshalJSON() ([]byte, error) { func (o ModelArtifactCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri + if !IsNil(o.ModelFormatName) { + toSerialize["modelFormatName"] = o.ModelFormatName } - if !IsNil(o.State) { - toSerialize["state"] = o.State + if !IsNil(o.StorageKey) { + toSerialize["storageKey"] = o.StorageKey + } + if !IsNil(o.StoragePath) { + toSerialize["storagePath"] = o.StoragePath + } + if !IsNil(o.ModelFormatVersion) { + toSerialize["modelFormatVersion"] = o.ModelFormatVersion + } + if !IsNil(o.ServiceAccountName) { + toSerialize["serviceAccountName"] = o.ServiceAccountName } if !IsNil(o.Name) { toSerialize["name"] = o.Name @@ -443,20 +452,11 @@ func (o ModelArtifactCreate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExternalId) { toSerialize["externalId"] = o.ExternalId } - if !IsNil(o.ModelFormatName) { - toSerialize["modelFormatName"] = o.ModelFormatName - } - if !IsNil(o.StorageKey) { - toSerialize["storageKey"] = o.StorageKey - } - if !IsNil(o.StoragePath) { - toSerialize["storagePath"] = o.StoragePath - } - if !IsNil(o.ModelFormatVersion) { - toSerialize["modelFormatVersion"] = o.ModelFormatVersion + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri } - if !IsNil(o.ServiceAccountName) { - toSerialize["serviceAccountName"] = o.ServiceAccountName + if !IsNil(o.State) { + toSerialize["state"] = o.State } return toSerialize, nil } diff --git a/pkg/openapi/model_model_artifact_update.go b/pkg/openapi/model_model_artifact_update.go index 7351915e..8ead8fef 100644 --- a/pkg/openapi/model_model_artifact_update.go +++ b/pkg/openapi/model_model_artifact_update.go @@ -19,9 +19,6 @@ var _ MappedNullable = &ModelArtifactUpdate{} // ModelArtifactUpdate An ML model artifact. type ModelArtifactUpdate struct { - // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. - Uri *string `json:"uri,omitempty"` - State *ArtifactState `json:"state,omitempty"` // User provided custom properties which are not defined by its type. CustomProperties *map[string]MetadataValue `json:"customProperties,omitempty"` // An optional description about the resource. @@ -38,6 +35,9 @@ type ModelArtifactUpdate struct { ModelFormatVersion *string `json:"modelFormatVersion,omitempty"` // Name of the service account with storage secret. ServiceAccountName *string `json:"serviceAccountName,omitempty"` + // The uniform resource identifier of the physical artifact. May be empty if there is no physical artifact. + Uri *string `json:"uri,omitempty"` + State *ArtifactState `json:"state,omitempty"` } // NewModelArtifactUpdate instantiates a new ModelArtifactUpdate object @@ -61,70 +61,6 @@ func NewModelArtifactUpdateWithDefaults() *ModelArtifactUpdate { return &this } -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *ModelArtifactUpdate) GetUri() string { - if o == nil || IsNil(o.Uri) { - var ret string - return ret - } - return *o.Uri -} - -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelArtifactUpdate) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { - return nil, false - } - return o.Uri, true -} - -// HasUri returns a boolean if a field has been set. -func (o *ModelArtifactUpdate) HasUri() bool { - if o != nil && !IsNil(o.Uri) { - return true - } - - return false -} - -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *ModelArtifactUpdate) SetUri(v string) { - o.Uri = &v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *ModelArtifactUpdate) GetState() ArtifactState { - if o == nil || IsNil(o.State) { - var ret ArtifactState - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ModelArtifactUpdate) GetStateOk() (*ArtifactState, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *ModelArtifactUpdate) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given ArtifactState and assigns it to the State field. -func (o *ModelArtifactUpdate) SetState(v ArtifactState) { - o.State = &v -} - // GetCustomProperties returns the CustomProperties field value if set, zero value otherwise. func (o *ModelArtifactUpdate) GetCustomProperties() map[string]MetadataValue { if o == nil || IsNil(o.CustomProperties) { @@ -381,6 +317,70 @@ func (o *ModelArtifactUpdate) SetServiceAccountName(v string) { o.ServiceAccountName = &v } +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *ModelArtifactUpdate) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelArtifactUpdate) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *ModelArtifactUpdate) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *ModelArtifactUpdate) SetUri(v string) { + o.Uri = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ModelArtifactUpdate) GetState() ArtifactState { + if o == nil || IsNil(o.State) { + var ret ArtifactState + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ModelArtifactUpdate) GetStateOk() (*ArtifactState, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ModelArtifactUpdate) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given ArtifactState and assigns it to the State field. +func (o *ModelArtifactUpdate) SetState(v ArtifactState) { + o.State = &v +} + func (o ModelArtifactUpdate) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -391,12 +391,6 @@ func (o ModelArtifactUpdate) MarshalJSON() ([]byte, error) { func (o ModelArtifactUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri - } - if !IsNil(o.State) { - toSerialize["state"] = o.State - } if !IsNil(o.CustomProperties) { toSerialize["customProperties"] = o.CustomProperties } @@ -421,6 +415,12 @@ func (o ModelArtifactUpdate) ToMap() (map[string]interface{}, error) { if !IsNil(o.ServiceAccountName) { toSerialize["serviceAccountName"] = o.ServiceAccountName } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } return toSerialize, nil }